@@ -292,10 +292,9 @@ export default class SmartTransactionsController extends PollingControllerV1<
292
292
smartTransaction : SmartTransaction ,
293
293
chainId : string ,
294
294
) : void {
295
- const currentChainId = chainId || this . config . chainId ;
296
295
const { smartTransactionsState } = this . state ;
297
296
const { smartTransactions } = smartTransactionsState ;
298
- const currentSmartTransactions = smartTransactions [ currentChainId ] ;
297
+ const currentSmartTransactions = smartTransactions [ chainId ] ;
299
298
const currentIndex = currentSmartTransactions ?. findIndex (
300
299
( stx ) => stx . uuid === smartTransaction . uuid ,
301
300
) ;
@@ -331,7 +330,7 @@ export default class SmartTransactionsController extends PollingControllerV1<
331
330
...smartTransactionsState ,
332
331
smartTransactions : {
333
332
...smartTransactionsState . smartTransactions ,
334
- [ currentChainId ] : nextSmartTransactions ,
333
+ [ chainId ] : nextSmartTransactions ,
335
334
} ,
336
335
} ,
337
336
} ) ;
@@ -349,21 +348,21 @@ export default class SmartTransactionsController extends PollingControllerV1<
349
348
...currentSmartTransaction ,
350
349
...smartTransaction ,
351
350
} ;
352
- this . confirmSmartTransaction ( nextSmartTransaction , currentChainId ) ;
351
+ this . confirmSmartTransaction ( nextSmartTransaction , chainId ) ;
353
352
}
354
353
355
354
this . update ( {
356
355
smartTransactionsState : {
357
356
...smartTransactionsState ,
358
357
smartTransactions : {
359
358
...smartTransactionsState . smartTransactions ,
360
- [ currentChainId ] : smartTransactionsState . smartTransactions [
361
- currentChainId
362
- ] . map ( ( item , index ) => {
363
- return index === currentIndex
364
- ? { ... item , ... smartTransaction }
365
- : item ;
366
- } ) ,
359
+ [ chainId ] : smartTransactionsState . smartTransactions [ chainId ] . map (
360
+ ( item , index ) => {
361
+ return index === currentIndex
362
+ ? { ... item , ... smartTransaction }
363
+ : item ;
364
+ } ,
365
+ ) ,
367
366
} ,
368
367
} ,
369
368
} ) ;
0 commit comments