mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 21:35:21 +01:00
Updated QR Code scan call
This commit is contained in:
parent
418e69cdc7
commit
54c71c0ee1
@ -24,14 +24,14 @@ export default class ScanQrWif extends React.Component {
|
||||
type: Camera.Constants.Type.back,
|
||||
};
|
||||
|
||||
async onBarCodeRead(ret) {
|
||||
async onBarCodeScanned(ret) {
|
||||
if (+new Date() - this.lastTimeIveBeenHere < 3000) {
|
||||
this.lastTimeIveBeenHere = +new Date();
|
||||
return;
|
||||
}
|
||||
this.lastTimeIveBeenHere = +new Date();
|
||||
|
||||
console.log('onBarCodeRead', ret);
|
||||
console.log('onBarCodeScanned', ret);
|
||||
if (ret.data[0] === '6') {
|
||||
// password-encrypted, need to ask for password and decrypt
|
||||
console.log('trying to decrypt...');
|
||||
@ -170,7 +170,7 @@ export default class ScanQrWif extends React.Component {
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Camera style={{ flex: 1 }} type={this.state.type} onBarCodeRead={ret => this.onBarCodeRead(ret)}>
|
||||
<Camera style={{ flex: 1 }} type={this.state.type} onBarCodeScanned={ret => this.onBarCodeScanned(ret)}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
|
Loading…
Reference in New Issue
Block a user