FIX: minor issue with scanQrWif

This commit is contained in:
Overtorment 2019-10-11 23:36:46 +01:00
parent e55faaa6ae
commit fdf2d4d40f

View File

@ -25,6 +25,12 @@ export default class ScanQrWif extends React.Component {
onBarCodeScanned = async ret => {
if (RNCamera.Constants.CameraStatus === RNCamera.Constants.CameraStatus.READY) this.cameraRef.pausePreview();
if (+new Date() - this.lastTimeIveBeenHere < 6000) {
this.lastTimeIveBeenHere = +new Date();
return;
}
this.lastTimeIveBeenHere = +new Date();
this.setState({ isLoading: true });
if (ret.data[0] === '6') {
// password-encrypted, need to ask for password and decrypt
console.log('trying to decrypt...');