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;
goBack: () => void;
};
onManageFundsPressed?: (id: string) => void;
onManageFundsPressed?: (id?: string) => void;
onWalletBalanceVisibilityChange?: (isShouldBeVisible: boolean) => void;
actionKeys: {
CopyToClipboard: 'copyToClipboard';
@ -103,10 +103,11 @@ const TransactionsNavigationHeader: React.FC<TransactionsNavigationHeaderProps>
onWalletUnitChange?.(updatedWallet);
};
const handleManageFundsPressed = (actionKeyID: string) => {
const handleManageFundsPressed = (actionKeyID?: string) => {
if (onManageFundsPressed) {
onManageFundsPressed(actionKeyID);
}
if (actionKeyID) {
onManageFundsPressed(actionKeyID);
}}
};
const handleOnPaymentCodeButtonPressed = () => {
@ -260,13 +261,13 @@ const TransactionsNavigationHeader: React.FC<TransactionsNavigationHeaderProps>
style={styles.manageFundsButton}
accessibilityRole="button"
accessibilityLabel={loc.lnd.title}
onPress={handleManageFundsPressed}
onPress={() => handleManageFundsPressed()}
>
<Text style={styles.manageFundsButtonText}>{loc.lnd.title}</Text>
</TouchableOpacity>
)}
{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>
</TouchableOpacity>
)}

View File

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