Skip to content

Commit

Permalink
fix: getWallet was called twice
Browse files Browse the repository at this point in the history
  • Loading branch information
R0BIN0 committed Dec 7, 2023
1 parent 1d55590 commit c7dc413
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/Wallet/Wallet.logic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ export const useWallet = () => {
// State
const [state, dispatch] = useReducer(reducer, { ...initialState });

// UseEffect
useEffect(() => {
getWalletAsync();
if (!params.blockchain) return;
dispatchCtx(setBlockchain(params.blockchain as Blockchain));
}, [params]);

useEffect(() => {
navigate(`/wallet/${currentBlockchain}/${params.id}`);
getWalletAsync();
}, [currentBlockchain]);

const toggleLoader = (isLoading: boolean) => {
Expand Down

0 comments on commit c7dc413

Please sign in to comment.