Skip to content

Commit

Permalink
Fix bug when importing settings clears fetched assets
Browse files Browse the repository at this point in the history
  • Loading branch information
amacar committed Apr 29, 2020
1 parent 6dec8d6 commit f44c4f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/v2/services/Store/StoreProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import {
MEMBERSHIP_CONTRACTS
} from 'v2/features/PurchaseMembership/config';
import { DEFAULT_NETWORK } from 'v2/config';
import { useEffectOnce } from 'v2/vendor';

import { getAccountsAssetsBalances, nestedToBigNumberJS } from './BalanceService';
import { getStoreAccounts, getPendingTransactionsFromAccounts } from './helpers';
Expand Down Expand Up @@ -238,9 +237,9 @@ export const StoreProvider: React.FC = ({ children }) => {
}, [currentAccounts]);

// fetch assets from api
useEffectOnce(() => {
useEffect(() => {
MyCryptoApiService.instance.getAssets().then(addAssetsFromAPI);
});
}, [assets.length]);

// A change to pending txs is detected
useEffect(() => {
Expand Down

0 comments on commit f44c4f2

Please sign in to comment.