Skip to content

Commit

Permalink
fix(ui-ux): fixed address book forgets saved addresses when user swit…
Browse files Browse the repository at this point in the history
…ch to custom provider
  • Loading branch information
fullstackninja864 committed Dec 8, 2023
1 parent 9aa2fb6 commit 3011ace
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,12 @@ export function ServiceProviderScreen({ navigation }: Props): JSX.Element {
))}
</View>
{showActionButtons && (
<View style={tailwind("mt-48", { "mt-36": isSmallScreen })}>
<View
style={tailwind("mt-48", {
"mt-36": isSmallScreen,
"mt-10": customProviders.length > 1,
})}
>
<View style={tailwind("mt-2 px-5 mb-5")}>
<Text
style={tailwind(
Expand Down
10 changes: 5 additions & 5 deletions shared/contexts/WalletDataProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useFeatureFlagContext } from "@contexts/FeatureFlagContext";
import { useWhaleApiClient } from "@waveshq/walletkit-ui/dist/contexts";

export function WalletDataProvider(
props: PropsWithChildren<any>
props: PropsWithChildren<any>,
): JSX.Element | null {
const blockCount = useSelector((state: RootState) => state.block.count);
const client = useWhaleApiClient();
Expand All @@ -36,7 +36,7 @@ export function WalletDataProvider(
fetchDexPrice({
client,
denomination: "USDT",
})
}),
);
});
}, [blockCount, network]);
Expand All @@ -47,7 +47,7 @@ export function WalletDataProvider(
if (isFeatureAvailable("local_storage")) {
dispatch(fetchUserPreferences(network));
}
}, [network, wallets]);
}, [network, wallets, isFeatureAvailable]);

/* Global polling based on blockCount, network and address */
useEffect(() => {
Expand All @@ -56,13 +56,13 @@ export function WalletDataProvider(
fetchTokens({
client,
address,
})
}),
);
dispatch(
fetchVaults({
client,
address,
})
}),
);
});
}, [blockCount, network, address]);
Expand Down

0 comments on commit 3011ace

Please sign in to comment.