From 402dedef7f198c462d5a3a250e1a9e0e6c1b58b6 Mon Sep 17 00:00:00 2001 From: lukaw3d Date: Fri, 12 Jul 2024 02:51:24 +0200 Subject: [PATCH] Check account nonce when continuously refreshing balance --- .changelog/2002.trivial.md | 1 + src/app/state/account/saga.ts | 1 + 2 files changed, 2 insertions(+) create mode 100644 .changelog/2002.trivial.md diff --git a/.changelog/2002.trivial.md b/.changelog/2002.trivial.md new file mode 100644 index 0000000000..a308e9b569 --- /dev/null +++ b/.changelog/2002.trivial.md @@ -0,0 +1 @@ +Check account nonce when continuously refreshing balance diff --git a/src/app/state/account/saga.ts b/src/app/state/account/saga.ts index b45d2f89c1..3a1b14746d 100644 --- a/src/app/state/account/saga.ts +++ b/src/app/state/account/saga.ts @@ -132,6 +132,7 @@ export function* fetchingOnAccountPage() { const staleBalances = yield* select(selectAccount) const hasPendingTxs = yield* select(hasAccountUnknownPendingTransactions) if ( + staleBalances.nonce !== refreshedAccount.nonce || // If a new transaction fails it won't change balances staleBalances.available !== refreshedAccount.available || staleBalances.delegations !== refreshedAccount.delegations || staleBalances.debonding !== refreshedAccount.debonding ||