From 9bed2c37763117266a8faea3de28c02a1011ff44 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Fri, 3 May 2019 13:36:11 +0100 Subject: [PATCH] FIX: android build --- App.js | 2 +- package-lock.json | 6 +++--- package.json | 2 +- screen/lnd/lndCreateInvoice.js | 4 ++-- screen/lnd/lndViewInvoice.js | 4 ++-- screen/lnd/scanLndInvoice.js | 12 ++++++------ screen/send/confirm.js | 2 +- screen/send/details.js | 4 ++-- screen/send/success.js | 2 +- screen/wallets/add.js | 4 ++-- screen/wallets/details.js | 4 ++-- screen/wallets/import.js | 4 ++-- screen/wallets/list.js | 2 +- screen/wallets/reorderWallets.js | 6 +++--- screen/wallets/selectWallet.js | 2 +- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/App.js b/App.js index 67c4c65d7..72a17defe 100644 --- a/App.js +++ b/App.js @@ -195,7 +195,7 @@ export default class App extends React.Component { renderClipboardContentModal = () => { return ( ReactNativeHapticFeedback.trigger('impactLight', false)} + onModalShow={() => ReactNativeHapticFeedback.trigger('impactLight', { ignoreAndroidSystemSettings: false })} isVisible={this.state.isClipboardContentModalVisible} style={styles.bottomModal} onBackdropPress={() => { diff --git a/package-lock.json b/package-lock.json index 202c0cc15..4a06f19f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3030,9 +3030,9 @@ } }, "@react-native-community/slider": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-1.1.0.tgz", - "integrity": "sha512-73kn+OaPJ4e5gvxlG97GLSmCzUq/twQHfvqA+/6OjKfScOtPCs4em8e4V0mn2hSje/PNLtSqnjzNUNviB4f0+w==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-1.0.4.tgz", + "integrity": "sha512-L02BSwDTHGc5BPrtllMTOKSKg9QyJbz001pIkD2FGmUFA9Nfvs0cne36N4nnrR5jQhSzwnmnQpzXkQ/yzQxwMg==" }, "@react-navigation/core": { "version": "3.4.1", diff --git a/package.json b/package.json index 281d7d13d..ebf4af55e 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "dependencies": { "@babel/preset-env": "7.4.4", "@react-native-community/async-storage": "1.3.3", - "@react-native-community/slider": "1.1.0", + "@react-native-community/slider": "1.0.4", "@remobile/react-native-qrcode-local-image": "1.0.4", "bignumber.js": "8.1.1", "bip21": "2.0.2", diff --git a/screen/lnd/lndCreateInvoice.js b/screen/lnd/lndCreateInvoice.js index 5c44df3f5..99ed69a3e 100644 --- a/screen/lnd/lndCreateInvoice.js +++ b/screen/lnd/lndCreateInvoice.js @@ -31,14 +31,14 @@ export default class LNDCreateInvoice extends Component { try { const invoiceRequest = await this.state.fromWallet.addInvoice(this.state.amount, this.state.description); EV(EV.enum.TRANSACTIONS_COUNT_CHANGED); - ReactNativeHapticFeedback.trigger('notificationSuccess', false); + ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false }); this.props.navigation.navigate('LNDViewInvoice', { invoice: invoiceRequest, fromWallet: this.state.fromWallet, isModal: true, }); } catch (_error) { - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); this.setState({ isLoading: false }); alert('Error'); } diff --git a/screen/lnd/lndViewInvoice.js b/screen/lnd/lndViewInvoice.js index ed733c08c..dda5b2934 100644 --- a/screen/lnd/lndViewInvoice.js +++ b/screen/lnd/lndViewInvoice.js @@ -64,7 +64,7 @@ export default class LNDViewInvoice extends Component { if (updatedUserInvoice.ispaid) { // we fetched the invoice, and it is paid :-) this.setState({ isFetchingInvoices: false }); - ReactNativeHapticFeedback.trigger('notificationSuccess', false); + ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false }); clearInterval(this.fetchInvoiceInterval); this.fetchInvoiceInterval = undefined; EV(EV.enum.REMOTE_TRANSACTIONS_COUNT_CHANGED); // remote because we want to refetch from server tx list and balance @@ -75,7 +75,7 @@ export default class LNDViewInvoice extends Component { if (invoiceExpiration < now && !updatedUserInvoice.ispaid) { // invoice expired :-( this.setState({ isFetchingInvoices: false }); - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); clearInterval(this.fetchInvoiceInterval); this.fetchInvoiceInterval = undefined; EV(EV.enum.TRANSACTIONS_COUNT_CHANGED); diff --git a/screen/lnd/scanLndInvoice.js b/screen/lnd/scanLndInvoice.js index 00d0d3b3a..24c3c96b5 100644 --- a/screen/lnd/scanLndInvoice.js +++ b/screen/lnd/scanLndInvoice.js @@ -38,7 +38,7 @@ export default class ScanLndInvoice extends React.Component { super(props); if (!BlueApp.getWallets().some(item => item.type === LightningCustodianWallet.type)) { - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); alert('Before paying a Lightning invoice, you must first add a Lightning wallet.'); props.navigation.dismiss(); } else { @@ -93,7 +93,7 @@ export default class ScanLndInvoice extends React.Component { processInvoice = data => { this.setState({ isLoading: true }, async () => { if (!this.state.fromWallet) { - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); alert('Before paying a Lightning invoice, you must first add a Lightning wallet.'); return this.props.navigation.goBack(); } @@ -133,7 +133,7 @@ export default class ScanLndInvoice extends React.Component { } catch (Err) { Keyboard.dismiss(); this.setState({ isLoading: false }); - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); alert(Err.message); } }); @@ -157,14 +157,14 @@ export default class ScanLndInvoice extends React.Component { let expiresIn = (decoded.timestamp * 1 + decoded.expiry * 1) * 1000; // ms if (+new Date() > expiresIn) { this.setState({ isLoading: false }); - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); return alert('Invoice expired'); } const currentUserInvoices = fromWallet.user_invoices_raw; // not fetching invoices, as we assume they were loaded previously if (currentUserInvoices.some(invoice => invoice.payment_hash === decoded.payment_hash)) { this.setState({ isLoading: false }); - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); return alert(loc.lnd.sameWalletAsInvoiceError); } @@ -173,7 +173,7 @@ export default class ScanLndInvoice extends React.Component { } catch (Err) { console.log(Err.message); this.setState({ isLoading: false }); - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); return alert(Err.message); } diff --git a/screen/send/confirm.js b/screen/send/confirm.js index f031b6edc..c06a15c6c 100644 --- a/screen/send/confirm.js +++ b/screen/send/confirm.js @@ -59,7 +59,7 @@ export default class Confirm extends Component { }); } } catch (error) { - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); this.setState({ isLoading: false }); alert(error.message); } diff --git a/screen/send/details.js b/screen/send/details.js index 526607143..99e2afa46 100644 --- a/screen/send/details.js +++ b/screen/send/details.js @@ -347,7 +347,7 @@ export default class SendDetails extends Component { if (error) { this.setState({ isLoading: false }); alert(error); - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); return; } @@ -411,7 +411,7 @@ export default class SendDetails extends Component { await BlueApp.saveToDisk(); } catch (err) { console.log(err); - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); alert(err); this.setState({ isLoading: false }); return; diff --git a/screen/send/success.js b/screen/send/success.js index 5bca848d1..3e4417954 100644 --- a/screen/send/success.js +++ b/screen/send/success.js @@ -26,7 +26,7 @@ export default class Success extends Component { async componentDidMount() { console.log('send/create - componentDidMount'); - ReactNativeHapticFeedback.trigger('notificationSuccess', false); + ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false }); } render() { diff --git a/screen/wallets/add.js b/screen/wallets/add.js index 30828433b..d894bd05b 100644 --- a/screen/wallets/add.js +++ b/screen/wallets/add.js @@ -215,7 +215,7 @@ export default class WalletsAdd extends Component { await BlueApp.saveToDisk(); EV(EV.enum.WALLETS_COUNT_CHANGED); A(A.ENUM.CREATED_WALLET); - ReactNativeHapticFeedback.trigger('notificationSuccess', false); + ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false }); this.props.navigation.dismiss(); }; @@ -260,7 +260,7 @@ export default class WalletsAdd extends Component { await BlueApp.saveToDisk(); EV(EV.enum.WALLETS_COUNT_CHANGED); A(A.ENUM.CREATED_WALLET); - ReactNativeHapticFeedback.trigger('notificationSuccess', false); + ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false }); if (w.type === HDSegwitP2SHWallet.type) { this.props.navigation.navigate('PleaseBackup', { secret: w.getSecret(), diff --git a/screen/wallets/details.js b/screen/wallets/details.js index 8a6ef265e..024c1307f 100644 --- a/screen/wallets/details.js +++ b/screen/wallets/details.js @@ -180,7 +180,7 @@ export default class WalletDetails extends Component { { - ReactNativeHapticFeedback.trigger('notificationWarning', false); + ReactNativeHapticFeedback.trigger('notificationWarning', { ignoreAndroidSystemSettings: false }); Alert.alert( loc.wallets.details.delete + ' ' + loc.wallets.details.title, loc.wallets.details.are_you_sure, @@ -191,7 +191,7 @@ export default class WalletDetails extends Component { this.props.navigation.setParams({ isLoading: true }); this.setState({ isLoading: true }, async () => { BlueApp.deleteWallet(this.state.wallet); - ReactNativeHapticFeedback.trigger('notificationSuccess', false); + ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false }); await BlueApp.saveToDisk(); EV(EV.enum.TRANSACTIONS_COUNT_CHANGED); EV(EV.enum.WALLETS_COUNT_CHANGED); diff --git a/screen/wallets/import.js b/screen/wallets/import.js index 222ed6a1a..5acea3060 100644 --- a/screen/wallets/import.js +++ b/screen/wallets/import.js @@ -60,7 +60,7 @@ export default class WalletsImport extends Component { alert('This wallet has been previously imported.'); } else { alert(loc.wallets.import.success); - ReactNativeHapticFeedback.trigger('notificationSuccess', false); + ReactNativeHapticFeedback.trigger('notificationSuccess', { ignoreAndroidSystemSettings: false }); w.setLabel(loc.wallets.import.imported + ' ' + w.typeReadable); BlueApp.wallets.push(w); await BlueApp.saveToDisk(); @@ -189,7 +189,7 @@ export default class WalletsImport extends Component { } alert(loc.wallets.import.error); - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); // Plan: // 1. check if its HDSegwitP2SHWallet (BIP49) // 2. check if its HDLegacyP2PKHWallet (BIP44) diff --git a/screen/wallets/list.js b/screen/wallets/list.js index ce451c4d4..290f00eab 100644 --- a/screen/wallets/list.js +++ b/screen/wallets/list.js @@ -232,7 +232,7 @@ export default class WalletsList extends Component { if (BlueApp.getWallets().length > 1) { this.props.navigation.navigate('ReorderWallets'); } else { - ReactNativeHapticFeedback.trigger('notificationError', false); + ReactNativeHapticFeedback.trigger('notificationError', { ignoreAndroidSystemSettings: false }); } }; diff --git a/screen/wallets/reorderWallets.js b/screen/wallets/reorderWallets.js index 278258a9f..e3bcd184c 100644 --- a/screen/wallets/reorderWallets.js +++ b/screen/wallets/reorderWallets.js @@ -161,14 +161,14 @@ export default class ReorderWallets extends Component { data={this.state.data} renderRow={this._renderItem} onChangeOrder={() => { - ReactNativeHapticFeedback.trigger('impactMedium', false); + ReactNativeHapticFeedback.trigger('impactMedium', { ignoreAndroidSystemSettings: false }); this.setState({ hasMovedARow: true }); }} onActivateRow={() => { - ReactNativeHapticFeedback.trigger('selection', false); + ReactNativeHapticFeedback.trigger('selection', { ignoreAndroidSystemSettings: false }); }} onReleaseRow={() => { - ReactNativeHapticFeedback.trigger('impactLight', false); + ReactNativeHapticFeedback.trigger('impactLight', { ignoreAndroidSystemSettings: false }); }} /> diff --git a/screen/wallets/selectWallet.js b/screen/wallets/selectWallet.js index 9d0a6e72f..4f83fd03b 100644 --- a/screen/wallets/selectWallet.js +++ b/screen/wallets/selectWallet.js @@ -36,7 +36,7 @@ export default class SelectWallet extends Component { return ( { - ReactNativeHapticFeedback.trigger('selection', false); + ReactNativeHapticFeedback.trigger('selection', { ignoreAndroidSystemSettings: false }); this.props.navigation.getParam('onWalletSelect')(item); }} >