mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-21 14:34:55 +01:00
FIX: sometimes export QR is unreadable
This commit is contained in:
parent
d8b63c6950
commit
122a8ae943
2 changed files with 6 additions and 16 deletions
|
@ -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 {
|
|||
);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
<BlueText style={{marginBottom: 10}}>
|
||||
WIF stands for Wallet Import Format. Backup your WIF (also shown on QR) in a safe place.
|
||||
</BlueText>
|
||||
|
||||
<Divider style={{ backgroundColor: '#ebebeb', marginBottom:20, }} />
|
||||
|
||||
*/
|
||||
|
||||
return (
|
||||
<SafeBlueArea style={{ flex: 1, paddingTop: 20 }}>
|
||||
<View style={{ alignItems: 'center', flex: 1, justifyContent: 'center', paddingHorizontal: 0 }} onLayout={this.onLayout}>
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue