File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -447,7 +447,7 @@ export default class SendTransaction extends EventEmitter {
447
447
// This just returns if the transaction is not a CREATE_TOKEN_TX
448
448
await addCreatedTokenFromTx ( transaction as CreateTokenTransaction , storage ) ;
449
449
// Add new transaction to the wallet's storage.
450
- await wallet . onNewTx ( { history : historyTx } ) ;
450
+ wallet . enqueueOnNewTx ( { history : historyTx } ) ;
451
451
} ) ( this . wallet , this . storage , this . transaction ) ;
452
452
}
453
453
this . emit ( 'send-tx-success' , this . transaction ) ;
Original file line number Diff line number Diff line change @@ -675,7 +675,7 @@ class HathorWallet extends EventEmitter {
675
675
// So we will enqueue this message to be processed later
676
676
this . wsTxQueue . enqueue ( wsData ) ;
677
677
} else {
678
- this . newTxPromise = this . newTxPromise . then ( ( ) => this . onNewTx ( wsData ) ) ;
678
+ this . enqueueOnNewTx ( wsData ) ;
679
679
}
680
680
}
681
681
}
@@ -1330,6 +1330,14 @@ class HathorWallet extends EventEmitter {
1330
1330
this . emit ( 'state' , state ) ;
1331
1331
}
1332
1332
1333
+ /**
1334
+ * Enqueue the call for onNewTx with the given data.
1335
+ * @param {{ history: import('../types').IHistoryTx } } wsData
1336
+ */
1337
+ enqueueOnNewTx ( wsData ) {
1338
+ this . newTxPromise = this . newTxPromise . then ( ( ) => this . onNewTx ( wsData ) ) ;
1339
+ }
1340
+
1333
1341
/**
1334
1342
* @param {{ history: import('../types').IHistoryTx } } wsData
1335
1343
*/
You can’t perform that action at this time.
0 commit comments