diff --git a/ActionMultisig.js b/ActionMultisig.js index b151752..dc9ac38 100644 --- a/ActionMultisig.js +++ b/ActionMultisig.js @@ -48,7 +48,7 @@ MOM.packMe = async function (keypair) { // 由前端调用,后台不创建 return this } -MOM.checkMultiSig = function (account) { +MOM.checkMultiSig = async function (account) { let json = this.getJson(({ exclude: ['hash', 'blockHash', 'actorSignature', 'json'] })) let sigers = Object.keys(this.json) // 公钥列表 // 交易发起人的签名在prepare的verifySig里已经检查过合法性, @@ -176,7 +176,7 @@ MOM.executeMe = async function () { // 多重签名账户执行转账 case 'emitTransfer': { let sender = await wo.Account.getOne({ Account: { address: this.actorAddress } }) - if (sender && this.checkMultiSig(sender) && this.toAddress != this.actorAddress && sender.balance >= this.amount + this.fee) { + if (sender && await this.checkMultiSig(sender) && this.toAddress != this.actorAddress && sender.balance >= this.amount + this.fee) { await sender.setMe({ Account: { balance: sender.balance - this.amount - this.fee }, cond: { address: sender.address } }) let getter = await wo.Account.getOne({ Account: { address: this.toAddress } }) if (getter) {