Skip to content

Commit

Permalink
fix: cleaning of tokens and nano-contract registered after reload (#506)
Browse files Browse the repository at this point in the history
* fix: cleaning of tokens and nano-contract registered after reload
  • Loading branch information
alexruzenhack authored and andreabadesso committed Jul 18, 2024
1 parent d690160 commit af7f765
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/reducers/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1298,13 +1298,20 @@ export const onExceptionCaptured = (state, { payload }) => {
};

/**
* On wallet reload, tokens data will be reloaded as well.
* On wallet reload, tokens and nano contract data will be
* reloaded as well.
*
* Some flows can request a wallet reload such as:
* - Disable wallet service
* - Change network settings
* - Loose network connection
*/
export const onReloadWalletRequested = (state) => ({
...state,
tokensHistory: initialState.tokensHistory,
tokensBalance: initialState.tokensBalance,
loadHistoryStatus: initialState.loadHistoryStatus,
nanoContract: initialState.nanoContract,
});

const onWalletReloading = (state) => ({
Expand Down

0 comments on commit af7f765

Please sign in to comment.