|
|
|
@ -38,7 +38,7 @@ export class Transaction extends Unit {
|
|
|
|
|
armoredSignature: transaction2.validationSignature // parse detached signature
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
return await (result1.signatures[0].verified) && await (result2.signatures[0].verified);
|
|
|
|
|
return await (result1.signatures[0].verified) && await (result2.signatures[0].verified)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async up() {
|
|
|
|
@ -58,14 +58,14 @@ export class Transaction extends Unit {
|
|
|
|
|
// and remove the two matching items
|
|
|
|
|
transactions = transactions.whereNotIn("combinedHash", [transaction1.combinedHash, transaction2.combinedHash])
|
|
|
|
|
// insert grouped items into groupedTransactions
|
|
|
|
|
groupedTransactions.push([transaction1, transaction2]);
|
|
|
|
|
groupedTransactions.push([transaction1, transaction2])
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
for (const group of groupedTransactions) {
|
|
|
|
|
await this.blockchain.submitTransactions(group);
|
|
|
|
|
await this.firebase.ref("transaction").child(group[0].firebaseID).remove();
|
|
|
|
|
await this.firebase.ref("transaction").child(group[1].firebaseID).remove();
|
|
|
|
|
await this.blockchain.submitTransactions(group)
|
|
|
|
|
await this.firebase.ref("transaction").child(group[0].firebaseID).remove()
|
|
|
|
|
await this.firebase.ref("transaction").child(group[1].firebaseID).remove()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|