fix: await relayer init 4real
@@ -27,15 +27,18 @@ export default class Relayer {
},
})
+ return new Promise(async (resolve, reject) => {
await this.circuit.tx.multiFinalityVerifierSubstrateLike
.setOperational(true, this.gatewayId)
.signAndSend(keyring.alice, result => {
if (result.isError) {
- Relayer.debug(`error: ${result.status.toString()}`)
+ reject(Error(result.status.toString()))
} else if (result.isFinalized) {
Relayer.debug(`gateway ${this.gatewayId.toString()} operational`)
+ resolve(undefined)
}
})
+ })
}
async submit(
