Update SettingsProvider.tsx

This commit is contained in:
Marcos Rodriguez Velez 2024-10-30 23:33:59 -04:00
parent 751e453e20
commit a4e95b00d5

View File

@ -13,7 +13,6 @@ import { isBalanceDisplayAllowed, setBalanceDisplayAllowed } from '../WidgetComm
import { useStorage } from '../../hooks/context/useStorage';
import { BitcoinUnit } from '../../models/bitcoinUnits';
import { TotalWalletsBalanceKey, TotalWalletsBalancePreferredUnit } from '../TotalWalletsBalance';
import { LayoutAnimation } from 'react-native';
import { BLOCK_EXPLORERS, getBlockExplorerUrl, saveBlockExplorer, BlockExplorer, normalizeUrl } from '../../models/blockExplorer';
const getDoNotTrackStorage = async () => {
@ -27,7 +26,6 @@ export const setTotalBalanceViewEnabledStorage = async (value: boolean) => {
await DefaultPreference.setName(GROUP_IO_BLUEWALLET);
await DefaultPreference.set(TotalWalletsBalanceKey, value ? 'true' : 'false');
console.debug('setTotalBalanceViewEnabledStorage value:', value);
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
} catch (e) {
console.error('Error setting TotalBalanceViewEnabled:', e);
}
@ -50,7 +48,6 @@ export const setTotalBalancePreferredUnitStorageFunc = async (unit: BitcoinUnit)
try {
await DefaultPreference.setName(GROUP_IO_BLUEWALLET);
await DefaultPreference.set(TotalWalletsBalancePreferredUnit, unit);
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
} catch (e) {
console.error('Error setting TotalBalancePreferredUnit:', e);
}
@ -295,7 +292,6 @@ export const SettingsProvider: React.FC<{ children: React.ReactNode }> = React.m
try {
console.debug('setIsHandOffUseEnabledAsyncStorage', value);
setIsHandOffUseEnabled(value);
setIsHandOffUseEnabledState(value);
} catch (e) {
console.error('Error setting isHandOffUseEnabled:', e);
}