add 'async' to checkMultiSig
This commit is contained in:
parent
c9f04b24eb
commit
e59f2d92f5
@ -48,7 +48,7 @@ MOM.packMe = async function (keypair) { // 由前端调用,后台不创建
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
MOM.checkMultiSig = function (account) {
|
MOM.checkMultiSig = async function (account) {
|
||||||
let json = this.getJson(({ exclude: ['hash', 'blockHash', 'actorSignature', 'json'] }))
|
let json = this.getJson(({ exclude: ['hash', 'blockHash', 'actorSignature', 'json'] }))
|
||||||
let sigers = Object.keys(this.json) // 公钥列表
|
let sigers = Object.keys(this.json) // 公钥列表
|
||||||
// 交易发起人的签名在prepare的verifySig里已经检查过合法性,
|
// 交易发起人的签名在prepare的verifySig里已经检查过合法性,
|
||||||
@ -176,7 +176,7 @@ MOM.executeMe = async function () {
|
|||||||
// 多重签名账户执行转账
|
// 多重签名账户执行转账
|
||||||
case 'emitTransfer': {
|
case 'emitTransfer': {
|
||||||
let sender = await wo.Account.getOne({ Account: { address: this.actorAddress } })
|
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 } })
|
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 } })
|
let getter = await wo.Account.getOne({ Account: { address: this.toAddress } })
|
||||||
if (getter) {
|
if (getter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user