BlueWallet/security-alert.js
Igor Korsakov 6f581a2f2e
Eject (#126)
* OPS: randombytes work
* OPS: porting to RN android: added prompt, refactoring
* OPS: better android prompt
* FIX: scan qr callback
* FIX: correct fee sat calculation for HD & classic segwit wallets
* FIX: Fixed height for button in empty transaction list
* FIX: keyboard issue on fee selection modal
* FIX: slow QR code generation for HD backup screen
* ADD: wallet reorder
* FIX: TypeError: undefined is not an object (evaluating 'recommendedFees.halfHourFee') #133
* FIX: android appstore link
* OPS: Code to Migrate Expo json
* REF: renamed blitzhub to lndhub
* OPS: Migration: move expo files instead of parsing
* FIX: lndhub uri usage
* FIX: no security alert on android (it was ios specific)
* REF: better tx list rendering and sorting
* ADD: verify tx on coinb.in
* FIX: Tap to dismiss is not working #137
* REF: Removed Wallet gradients duplication.
* REF: about screen
* FIX: bech32 qr scan in send screen
* FIX: better bip21 handling
* Use of dayjs for transaction details
* REF: QR code content follows BIP21
* ADD: fee in local currency when send
* FIX: Refresh wallet info on page focus
2018-12-11 22:52:46 +00:00

25 lines
781 B
JavaScript

import { AsyncStorage, Platform, Alert } from 'react-native';
async function start() {
const key = 'security_alert_num_times';
let times = await AsyncStorage.getItem(key);
times = times || 0;
console.log({ times });
if (times < 3 && Platform.OS === 'ios') {
Alert.alert(
'Security alert',
'If you used BlueWallet prior to version 3.1.0 you are advised to re-create wallets ' +
'and transfer all funds from old wallets to new ones, as older versions might have security issues',
[
{ text: 'Remind me later', onPress: () => AsyncStorage.setItem(key, '0') },
{ text: 'Ok', onPress: () => AsyncStorage.setItem(key, parseInt(times) + 1 + '') },
],
{ cancelable: false },
);
}
}
module.exports.start = start;