mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 10:12:01 +01:00
65be52ed3d
* ADD: Wallet Details screen * FIX: Fixed receive and send calls * FIX: improve splash image and colors * FIX: Modified Encrypted Storage prompt to avoid cancellation * FIX: improved tx refresh strategy * FIX: HDBread tx confirmations calculation
35 lines
850 B
JavaScript
35 lines
850 B
JavaScript
import { AlertIOS } from 'react-native';
|
|
|
|
module.exports = (title, text, isCancelable = true) => {
|
|
return new Promise((resolve, reject) => {
|
|
const buttons = isCancelable
|
|
? [
|
|
{
|
|
text: 'Cancel',
|
|
onPress: () => {
|
|
reject(Error('Cancel Pressed'));
|
|
},
|
|
style: 'cancel',
|
|
},
|
|
{
|
|
text: 'OK',
|
|
onPress: password => {
|
|
console.log('OK Pressed, password: ' + password);
|
|
resolve(password);
|
|
},
|
|
},
|
|
]
|
|
: [
|
|
{
|
|
text: 'OK',
|
|
onPress: password => {
|
|
console.log('OK Pressed, password: ' + password);
|
|
resolve(password);
|
|
},
|
|
},
|
|
];
|
|
|
|
AlertIOS.prompt(title, text, buttons, 'secure-text');
|
|
});
|
|
};
|