批量处理上链交易时, 等待上一次交易确认再往下走
This commit is contained in:
parent
ccfa3b599e
commit
18b07df824
@ -123,7 +123,9 @@ class LPassportWallet {
|
||||
if (action.type === orderbook.ActionType.TRANSACTION) {
|
||||
const builtTx = await action.buildTransaction()
|
||||
console.log(`Submitting ${action.purpose} transaction`)
|
||||
await this.signer.sendTransaction(builtTx);
|
||||
const res = await this.signer.sendTransaction(builtTx);
|
||||
// console.log(res)
|
||||
await this.web3Provider.waitForTransaction(res.hash)
|
||||
}
|
||||
|
||||
// For an order to be created (and subsequently filled), Immutable needs a valid signature for the order data.
|
||||
@ -197,7 +199,8 @@ class LPassportWallet {
|
||||
if (action.type === orderbook.ActionType.TRANSACTION) {
|
||||
const builtTx = await action.buildTransaction();
|
||||
console.log(`Submitting ${action.purpose} transaction`);
|
||||
await this.signer.sendTransaction(builtTx);
|
||||
const res = await this.signer.sendTransaction(builtTx);
|
||||
await this.web3Provider.waitForTransaction(res.hash)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -231,7 +234,8 @@ class LPassportWallet {
|
||||
if (action.type === orderbook.ActionType.TRANSACTION) {
|
||||
const builtTx = await action.buildTransaction();
|
||||
console.log(`Submitting ${action.purpose} transaction`);
|
||||
await this.signer.sendTransaction(builtTx);
|
||||
const res = await this.signer.sendTransaction(builtTx);
|
||||
await this.web3Provider.waitForTransaction(res.hash)
|
||||
}
|
||||
}
|
||||
console.log(
|
||||
|
Loading…
x
Reference in New Issue
Block a user