mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 06:52:41 +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 = {
|
this.state = {
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
qrCodeHeight: height > width ? height / 2.5 : width / 2,
|
qrCodeHeight: height > width ? width - 40 : width / 2,
|
||||||
wallet,
|
wallet,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ export default class WalletExport extends Component {
|
||||||
|
|
||||||
onLayout = () => {
|
onLayout = () => {
|
||||||
const { height } = Dimensions.get('window');
|
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() {
|
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 (
|
return (
|
||||||
<SafeBlueArea style={{ flex: 1, paddingTop: 20 }}>
|
<SafeBlueArea style={{ flex: 1, paddingTop: 20 }}>
|
||||||
<View style={{ alignItems: 'center', flex: 1, justifyContent: 'center', paddingHorizontal: 0 }} onLayout={this.onLayout}>
|
<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}
|
color={BlueApp.settings.foregroundColor}
|
||||||
backgroundColor={BlueApp.settings.brandingColor}
|
backgroundColor={BlueApp.settings.brandingColor}
|
||||||
logo={require('../../img/qr-code.png')}
|
logo={require('../../img/qr-code.png')}
|
||||||
ecl={'Q'}
|
ecl={'H'}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -34,7 +34,7 @@ export default class WalletXpub extends Component {
|
||||||
wallet,
|
wallet,
|
||||||
xpub: wallet.getXpub(),
|
xpub: wallet.getXpub(),
|
||||||
xpubText: 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 = () => {
|
onLayout = () => {
|
||||||
const { height } = Dimensions.get('window');
|
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() {
|
render() {
|
||||||
|
@ -88,7 +88,7 @@ export default class WalletXpub extends Component {
|
||||||
backgroundColor={BlueApp.settings.brandingColor}
|
backgroundColor={BlueApp.settings.brandingColor}
|
||||||
logo={require('../../img/qr-code.png')}
|
logo={require('../../img/qr-code.png')}
|
||||||
size={this.state.qrCodeHeight}
|
size={this.state.qrCodeHeight}
|
||||||
ecl={'Q'}
|
ecl={'H'}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue