From e59f2d92f57d8172f3d486dc29bd60b5b82c79d6 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Fri, 21 Feb 2020 15:44:14 +0800 Subject: [PATCH] add 'async' to checkMultiSig --- ActionMultisig.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {