Skip to content

Commit

Permalink
fix(wallet): do not mutate previously emitted inFlight transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
mkazlauskas committed Jun 21, 2022
1 parent 0be80b8 commit 67e9939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/wallet/src/services/TransactionsTracker.ts
Expand Up @@ -205,7 +205,7 @@ export const createTransactionsTracker = (
return [...inFlight, tx];
}
const idx = inFlight.indexOf(tx);
return [...inFlight.splice(0, idx), ...inFlight.splice(idx + 1)];
return [...inFlight.slice(0, idx), ...inFlight.slice(idx + 1)];
}, [] as Cardano.NewTxAlonzo[]),
tap((inFlight) => newTransactionsStore.set(inFlight)),
startWith([])
Expand Down

0 comments on commit 67e9939

Please sign in to comment.