FIX: Lint

This commit is contained in:
Marcos Rodriguez Velez 2024-04-29 11:51:02 -04:00
parent 97bbe554ea
commit 38f0f7264e
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7
2 changed files with 13 additions and 14 deletions

View File

@ -19,7 +19,7 @@ interface TransactionsNavigationHeaderProps {
navigate: (route: string, params?: any) => void; navigate: (route: string, params?: any) => void;
goBack: () => void; goBack: () => void;
}; };
onManageFundsPressed?: (id: string) => void; onManageFundsPressed?: (id?: string) => void;
onWalletBalanceVisibilityChange?: (isShouldBeVisible: boolean) => void; onWalletBalanceVisibilityChange?: (isShouldBeVisible: boolean) => void;
actionKeys: { actionKeys: {
CopyToClipboard: 'copyToClipboard'; CopyToClipboard: 'copyToClipboard';
@ -103,10 +103,11 @@ const TransactionsNavigationHeader: React.FC<TransactionsNavigationHeaderProps>
onWalletUnitChange?.(updatedWallet); onWalletUnitChange?.(updatedWallet);
}; };
const handleManageFundsPressed = (actionKeyID: string) => { const handleManageFundsPressed = (actionKeyID?: string) => {
if (onManageFundsPressed) { if (onManageFundsPressed) {
onManageFundsPressed(actionKeyID); if (actionKeyID) {
} onManageFundsPressed(actionKeyID);
}}
}; };
const handleOnPaymentCodeButtonPressed = () => { const handleOnPaymentCodeButtonPressed = () => {
@ -260,13 +261,13 @@ const TransactionsNavigationHeader: React.FC<TransactionsNavigationHeaderProps>
style={styles.manageFundsButton} style={styles.manageFundsButton}
accessibilityRole="button" accessibilityRole="button"
accessibilityLabel={loc.lnd.title} accessibilityLabel={loc.lnd.title}
onPress={handleManageFundsPressed} onPress={() => handleManageFundsPressed()}
> >
<Text style={styles.manageFundsButtonText}>{loc.lnd.title}</Text> <Text style={styles.manageFundsButtonText}>{loc.lnd.title}</Text>
</TouchableOpacity> </TouchableOpacity>
)} )}
{wallet.type === MultisigHDWallet.type && ( {wallet.type === MultisigHDWallet.type && (
<TouchableOpacity style={styles.manageFundsButton} accessibilityRole="button" onPress={handleManageFundsPressed}> <TouchableOpacity style={styles.manageFundsButton} accessibilityRole="button" onPress={() => handleManageFundsPressed()}>
<Text style={styles.manageFundsButtonText}>{loc.multisig.manage_keys}</Text> <Text style={styles.manageFundsButtonText}>{loc.multisig.manage_keys}</Text>
</TouchableOpacity> </TouchableOpacity>
)} )}

View File

@ -438,14 +438,12 @@ const WalletTransactions = ({ navigation }) => {
navigate('SelectWallet', { onWalletSelect, chainType: Chain.ONCHAIN }); navigate('SelectWallet', { onWalletSelect, chainType: Chain.ONCHAIN });
} }
} else if (id === actionKeys.RefillWithExternalWallet) { } else if (id === actionKeys.RefillWithExternalWallet) {
if (wallet.getUserHasSavedExport()) { navigate('ReceiveDetailsRoot', {
navigate('ReceiveDetailsRoot', { screen: 'ReceiveDetails',
screen: 'ReceiveDetails', params: {
params: { walletID: wallet.getID(),
walletID: wallet.getID(), },
}, });
});
}
} }
}; };