mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 07:15:35 +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 { Icon } from 'react-native-elements';
|
||||||
import { useFocusEffect, useNavigation, useRoute } from '@react-navigation/native';
|
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 navigationStyle from '../../components/navigationStyle';
|
||||||
import AmountInput from '../../components/AmountInput';
|
import AmountInput from '../../components/AmountInput';
|
||||||
import * as NavigationService from '../../NavigationService';
|
import * as NavigationService from '../../NavigationService';
|
||||||
|
@ -32,6 +32,7 @@ import { useTheme } from '../../components/themes';
|
||||||
import Button from '../../components/Button';
|
import Button from '../../components/Button';
|
||||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
|
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
|
||||||
import { btcToSatoshi, fiatToBTC, satoshiToBTC } from '../../blue_modules/currency';
|
import { btcToSatoshi, fiatToBTC, satoshiToBTC } from '../../blue_modules/currency';
|
||||||
|
import { presentWalletExportReminder } from '../../helpers/presentWalletExportReminder';
|
||||||
|
|
||||||
const LNDCreateInvoice = () => {
|
const LNDCreateInvoice = () => {
|
||||||
const { wallets, saveToDisk, setSelectedWalletID } = useContext(BlueStorageContext);
|
const { wallets, saveToDisk, setSelectedWalletID } = useContext(BlueStorageContext);
|
||||||
|
@ -117,9 +118,11 @@ const LNDCreateInvoice = () => {
|
||||||
if (wallet.current.getUserHasSavedExport()) {
|
if (wallet.current.getUserHasSavedExport()) {
|
||||||
renderReceiveDetails();
|
renderReceiveDetails();
|
||||||
} else {
|
} else {
|
||||||
BlueAlertWalletExportReminder({
|
presentWalletExportReminder()
|
||||||
onSuccess: () => renderReceiveDetails(),
|
.then(() => {
|
||||||
onFailure: () => {
|
renderReceiveDetails();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
getParent().pop();
|
getParent().pop();
|
||||||
NavigationService.navigate('WalletExportRoot', {
|
NavigationService.navigate('WalletExportRoot', {
|
||||||
screen: 'WalletExport',
|
screen: 'WalletExport',
|
||||||
|
@ -127,8 +130,7 @@ const LNDCreateInvoice = () => {
|
||||||
walletID,
|
walletID,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
triggerHapticFeedback(HapticFeedbackTypes.NotificationError);
|
triggerHapticFeedback(HapticFeedbackTypes.NotificationError);
|
||||||
|
|
Loading…
Add table
Reference in a new issue