BlueWallet/helpers/presentWalletExportReminder.ts

18 lines
579 B
TypeScript
Raw Normal View History

2024-03-24 21:29:58 +01:00
import { Alert } from 'react-native';
import loc from '../loc';
export const presentWalletExportReminder = (): Promise<void> => {
return new Promise<void>((resolve, reject) => {
Alert.alert(
loc.wallets.details_title,
loc.pleasebackup.ask,
[
{ text: loc.pleasebackup.ask_yes, onPress: () => resolve(), style: 'default' },
{ text: loc.pleasebackup.ask_no, onPress: () => reject(new Error('User has denied saving the wallet backup.')) },
{ text: loc._.cancel, style: 'cancel' },
2024-03-24 21:29:58 +01:00
],
{ cancelable: true },
2024-03-24 21:29:58 +01:00
);
});
};