mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
Update lndCreateInvoice.js
This commit is contained in:
parent
cf29590356
commit
eff16acc30
1 changed files with 8 additions and 6 deletions
|
@ -16,7 +16,7 @@ import {
|
|||
import { Icon } from 'react-native-elements';
|
||||
import { useFocusEffect, useNavigation, useRoute } from '@react-navigation/native';
|
||||
|
||||
import { BlueAlertWalletExportReminder, BlueDismissKeyboardInputAccessory, BlueLoading } from '../../BlueComponents';
|
||||
import { BlueDismissKeyboardInputAccessory, BlueLoading } from '../../BlueComponents';
|
||||
import navigationStyle from '../../components/navigationStyle';
|
||||
import AmountInput from '../../components/AmountInput';
|
||||
import * as NavigationService from '../../NavigationService';
|
||||
|
@ -32,6 +32,7 @@ import { useTheme } from '../../components/themes';
|
|||
import Button from '../../components/Button';
|
||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
|
||||
import { btcToSatoshi, fiatToBTC, satoshiToBTC } from '../../blue_modules/currency';
|
||||
import { presentWalletExportReminder } from '../../helpers/presentWalletExportReminder';
|
||||
|
||||
const LNDCreateInvoice = () => {
|
||||
const { wallets, saveToDisk, setSelectedWalletID } = useContext(BlueStorageContext);
|
||||
|
@ -117,9 +118,11 @@ const LNDCreateInvoice = () => {
|
|||
if (wallet.current.getUserHasSavedExport()) {
|
||||
renderReceiveDetails();
|
||||
} else {
|
||||
BlueAlertWalletExportReminder({
|
||||
onSuccess: () => renderReceiveDetails(),
|
||||
onFailure: () => {
|
||||
presentWalletExportReminder()
|
||||
.then(() => {
|
||||
renderReceiveDetails();
|
||||
})
|
||||
.catch(() => {
|
||||
getParent().pop();
|
||||
NavigationService.navigate('WalletExportRoot', {
|
||||
screen: 'WalletExport',
|
||||
|
@ -127,8 +130,7 @@ const LNDCreateInvoice = () => {
|
|||
walletID,
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
triggerHapticFeedback(HapticFeedbackTypes.NotificationError);
|
||||
|
|
Loading…
Add table
Reference in a new issue