Skip to content

Commit f9dd1f1

Browse files
fix(ui-ux): fixed address book forgets saved addresses when user switch to custom provider (#4156)
1 parent 9aa2fb6 commit f9dd1f1

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

mobile-app/app/screens/AppNavigator/screens/Settings/screens/ServiceProviderScreen.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,12 @@ export function ServiceProviderScreen({ navigation }: Props): JSX.Element {
192192
))}
193193
</View>
194194
{showActionButtons && (
195-
<View style={tailwind("mt-48", { "mt-36": isSmallScreen })}>
195+
<View
196+
style={tailwind("mt-48", {
197+
"mt-36": isSmallScreen,
198+
"mt-10": customProviders.length > 1,
199+
})}
200+
>
196201
<View style={tailwind("mt-2 px-5 mb-5")}>
197202
<Text
198203
style={tailwind(

shared/contexts/WalletDataProvider.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { useFeatureFlagContext } from "@contexts/FeatureFlagContext";
1818
import { useWhaleApiClient } from "@waveshq/walletkit-ui/dist/contexts";
1919

2020
export function WalletDataProvider(
21-
props: PropsWithChildren<any>
21+
props: PropsWithChildren<any>,
2222
): JSX.Element | null {
2323
const blockCount = useSelector((state: RootState) => state.block.count);
2424
const client = useWhaleApiClient();
@@ -36,7 +36,7 @@ export function WalletDataProvider(
3636
fetchDexPrice({
3737
client,
3838
denomination: "USDT",
39-
})
39+
}),
4040
);
4141
});
4242
}, [blockCount, network]);
@@ -47,7 +47,7 @@ export function WalletDataProvider(
4747
if (isFeatureAvailable("local_storage")) {
4848
dispatch(fetchUserPreferences(network));
4949
}
50-
}, [network, wallets]);
50+
}, [network, wallets, isFeatureAvailable]);
5151

5252
/* Global polling based on blockCount, network and address */
5353
useEffect(() => {
@@ -56,13 +56,13 @@ export function WalletDataProvider(
5656
fetchTokens({
5757
client,
5858
address,
59-
})
59+
}),
6060
);
6161
dispatch(
6262
fetchVaults({
6363
client,
6464
address,
65-
})
65+
}),
6666
);
6767
});
6868
}, [blockCount, network, address]);

0 commit comments

Comments
 (0)