You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/ledger-button-core/src/internal/pending-transaction/controller/DefaultPendingTransactionController.test.ts
Copy file name to clipboardExpand all lines: packages/ledger-button-core/src/internal/pending-transaction/controller/DefaultPendingTransactionController.ts
+18-11Lines changed: 18 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ export class DefaultPendingTransactionController
70
70
preferredCurrency!==undefined&&
71
71
context.preferredFiatCurrency!==preferredCurrency
72
72
){
73
-
this.emitCurrentState();
73
+
voidthis.emitCurrentState();
74
74
}
75
75
preferredCurrency=context.preferredFiatCurrency;
76
76
});
@@ -118,15 +118,17 @@ export class DefaultPendingTransactionController
118
118
return;
119
119
}
120
120
121
-
constconfirmedHashes=result.unsafeCoerce();
121
+
constsettledOutcomes=result.unsafeCoerce();
122
122
123
-
for(consthashofconfirmedHashes){
124
-
this.storageService.remove(hash);
123
+
if(settledOutcomes.length>0){
124
+
for(const{ hash }ofsettledOutcomes){
125
+
this.storageService.remove(hash);
126
+
}
125
127
}
126
128
127
-
this.emitCurrentState();
129
+
awaitthis.emitUpdate();
128
130
129
-
if(confirmedHashes.length>0){
131
+
if(settledOutcomes.length>0){
130
132
this.refreshSelectedAccount();
131
133
}
132
134
@@ -146,10 +148,15 @@ export class DefaultPendingTransactionController
0 commit comments