From 122a8ae943771f668522f63e6c271e8aa479db83 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Thu, 10 Jan 2019 14:58:22 +0000 Subject: [PATCH] FIX: sometimes export QR is unreadable --- screen/wallets/export.js | 16 +++------------- screen/wallets/xpub.js | 6 +++--- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/screen/wallets/export.js b/screen/wallets/export.js index e99401aa2..9658e12ba 100644 --- a/screen/wallets/export.js +++ b/screen/wallets/export.js @@ -31,7 +31,7 @@ export default class WalletExport extends Component { this.state = { isLoading: true, - qrCodeHeight: height > width ? height / 2.5 : width / 2, + qrCodeHeight: height > width ? width - 40 : width / 2, wallet, }; } @@ -50,7 +50,7 @@ export default class WalletExport extends Component { onLayout = () => { const { height } = Dimensions.get('window'); - this.setState({ qrCodeHeight: height > width ? height / 2.5 : width / 2 }); + this.setState({ qrCodeHeight: height > width ? width - 40 : width / 2 }); }; render() { @@ -62,16 +62,6 @@ export default class WalletExport extends Component { ); } - /* - - - WIF stands for Wallet Import Format. Backup your WIF (also shown on QR) in a safe place. - - - - - */ - return ( @@ -99,7 +89,7 @@ export default class WalletExport extends Component { color={BlueApp.settings.foregroundColor} backgroundColor={BlueApp.settings.brandingColor} logo={require('../../img/qr-code.png')} - ecl={'Q'} + ecl={'H'} /> ); } else { diff --git a/screen/wallets/xpub.js b/screen/wallets/xpub.js index edd0ba0c4..b43f1bef2 100644 --- a/screen/wallets/xpub.js +++ b/screen/wallets/xpub.js @@ -34,7 +34,7 @@ export default class WalletXpub extends Component { wallet, xpub: wallet.getXpub(), xpubText: wallet.getXpub(), - qrCodeHeight: height > width ? height / 2.5 : width / 2, + qrCodeHeight: height > width ? width - 40 : width / 2, }; } @@ -58,7 +58,7 @@ export default class WalletXpub extends Component { onLayout = () => { const { height } = Dimensions.get('window'); - this.setState({ qrCodeHeight: height > width ? height / 2.5 : width / 2 }); + this.setState({ qrCodeHeight: height > width ? width - 40 : width / 2 }); }; render() { @@ -88,7 +88,7 @@ export default class WalletXpub extends Component { backgroundColor={BlueApp.settings.brandingColor} logo={require('../../img/qr-code.png')} size={this.state.qrCodeHeight} - ecl={'Q'} + ecl={'H'} /> ); } else {