Update details.js

This commit is contained in:
Marcos Rodriguez Velez 2024-05-05 05:15:24 -04:00
parent 18f290dffd
commit 86131e667d
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7

View File

@ -50,6 +50,7 @@ import loc, { formatBalanceWithoutSuffix } from '../../loc';
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
import SaveFileButton from '../../components/SaveFileButton';
import { useSettings } from '../../components/Context/SettingsContext';
import { HeaderRightButton } from '../../components/HeaderRightButton';
const styles = StyleSheet.create({
scrollViewContent: {
@ -195,16 +196,16 @@ const WalletDetails = () => {
});
}, [walletName, saveToDisk, wallet, hideTransactionsInWalletsList, useWithHardwareWallet, isBIP47Enabled, goBack]);
const HeaderRightButton = useMemo(
const SaveButton = useMemo(
() => <HeaderRightButton title={loc.wallets.details_save} onPress={handleSave} disabled={isLoading} testID="Save" />,
[isLoading, handleSave],
);
useEffect(() => {
setOptions({
headerRight: () => HeaderRightButton,
headerRight: () => SaveButton,
});
}, [HeaderRightButton, setOptions]);
}, [SaveButton, setOptions]);
useEffect(() => {
if (wallets.some(w => w.getID() === walletID)) {