@@ -199,15 +199,9 @@ export default class BridgeStatusController extends StaticIntervalPollingControl
199
199
} ,
200
200
hasApprovalTx : Boolean ( quoteResponse . approval ) ,
201
201
} ;
202
- this . update ( ( _state ) => {
203
- _state . bridgeStatusState = {
204
- ...bridgeStatusState ,
205
- txHistory : {
206
- ...bridgeStatusState . txHistory ,
207
- // Use the txMeta.id as the key so we can reference the txMeta in TransactionController
208
- [ bridgeTxMeta . id ] : txHistoryItem ,
209
- } ,
210
- } ;
202
+ this . update ( ( state ) => {
203
+ // Use the txMeta.id as the key so we can reference the txMeta in TransactionController
204
+ state . bridgeStatusState . txHistory [ bridgeTxMeta . id ] = txHistoryItem ;
211
205
} ) ;
212
206
213
207
this . #pollingTokensByTxMetaId[ bridgeTxMeta . id ] = this . startPolling ( {
@@ -266,13 +260,8 @@ export default class BridgeStatusController extends StaticIntervalPollingControl
266
260
// we need to keep track of the account that this is associated with as well so that we don't show it in Activity list for other accounts
267
261
// First stab at this will not stop polling when you are on a different account
268
262
this . update ( ( state ) => {
269
- state . bridgeStatusState = {
270
- ...bridgeStatusState ,
271
- txHistory : {
272
- ...bridgeStatusState . txHistory ,
273
- [ bridgeTxMetaId ] : newBridgeHistoryItem ,
274
- } ,
275
- } ;
263
+ state . bridgeStatusState . txHistory [ bridgeTxMetaId ] =
264
+ newBridgeHistoryItem ;
276
265
} ) ;
277
266
278
267
const pollingToken = this . #pollingTokensByTxMetaId[ bridgeTxMetaId ] ;
@@ -330,22 +319,8 @@ export default class BridgeStatusController extends StaticIntervalPollingControl
330
319
}
331
320
332
321
this . update ( ( state ) => {
333
- state . bridgeStatusState = {
334
- ...bridgeStatusState ,
335
- txHistory : {
336
- ...bridgeStatusState . txHistory ,
337
- [ bridgeTxMetaId ] : {
338
- ...bridgeStatusState . txHistory [ bridgeTxMetaId ] ,
339
- status : {
340
- ...bridgeStatusState . txHistory [ bridgeTxMetaId ] . status ,
341
- srcChain : {
342
- ...bridgeStatusState . txHistory [ bridgeTxMetaId ] . status . srcChain ,
343
- txHash : srcTxHash ,
344
- } ,
345
- } ,
346
- } ,
347
- } ,
348
- } ;
322
+ state . bridgeStatusState . txHistory [ bridgeTxMetaId ] . status . srcChain . txHash =
323
+ srcTxHash ;
349
324
} ) ;
350
325
} ;
351
326
0 commit comments