Skip to content

Commit 45d559e

Browse files
authored
Merge pull request #194 from lightninglabs/dismiss-swap
loop: fix dismiss swap icon not working
2 parents a0ebcde + c7834e3 commit 45d559e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/store/stores/swapStore.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
autorun,
33
entries,
4+
IObservableArray,
45
makeAutoObservable,
56
observable,
67
ObservableMap,
@@ -28,7 +29,7 @@ export default class SwapStore {
2829
swappedChannels: ObservableMap<string, string[]> = observable.map();
2930

3031
/** the ids of failed swaps that have been dismissed */
31-
dismissedSwapIds: string[] = [];
32+
dismissedSwapIds: IObservableArray<string> = observable.array([]);
3233

3334
constructor(store: Store) {
3435
makeAutoObservable(this, {}, { deep: false, autoBind: true });
@@ -192,7 +193,7 @@ export default class SwapStore {
192193
const swapState = this._store.storage.get<PersistentSwapState>('swapState');
193194
if (swapState) {
194195
this.swappedChannels = observable.map<string, string[]>(swapState.swappedChannels);
195-
this.dismissedSwapIds = swapState.dismissedSwapIds;
196+
this.dismissedSwapIds = observable.array(swapState.dismissedSwapIds);
196197
this._store.log.info('loaded swapState', swapState);
197198
}
198199
}

0 commit comments

Comments
 (0)