File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -185,19 +185,17 @@ class Nf3 {
185
185
const signed = await this . web3 . eth . accounts . signTransaction ( tx , this . ethereumSigningKey ) ;
186
186
// rather than waiting until we have a receipt, wait until we have enough confirmation blocks
187
187
// then return the receipt.
188
- let mined ; // indicates receipt is mined
189
- const confirmationPromise = new Promise ( resolve => {
188
+ // TODO does this still work if there is a chain reorg or do we have to handle that?
189
+ return new Promise ( resolve => {
190
190
this . web3 . eth
191
191
. sendSignedTransaction ( signed . rawTransaction )
192
192
. on ( 'confirmation' , ( number , receipt ) => {
193
193
console . log ( `Confirmed ${ number } ${ receipt . transactionHash } ` ) ;
194
194
if ( number === 12 ) resolve ( receipt ) ;
195
195
} ) ;
196
196
} ) ;
197
- await confirmationPromise ;
198
- return mined ;
199
197
}
200
- // TODO a wait for confirmations to the wallet functionality
198
+ // TODO add wait for confirmations to the wallet functionality
201
199
return this . web3 . eth . sendTransaction ( tx ) ;
202
200
}
203
201
You can’t perform that action at this time.
0 commit comments