Skip to content

Commit 18920d6

Browse files
committed
FIX: error in scanQR decoding breaks the whole scanning flow (closes #8180)
1 parent 848a514 commit 18920d6

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

loc/en.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"seed": "Seed",
1919
"success": "Success",
2020
"wallet_key": "Wallet key",
21-
"invalid_animated_qr_code_fragment": "Invalid animated QR Code fragment. Please try again.",
2221
"close": "Close",
2322
"change_input_currency": "Change input currency",
2423
"refresh": "Refresh",

screen/send/ScanQRCode.tsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import loc from '../../loc';
1515
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
1616
import CameraScreen from '../../components/CameraScreen';
1717
import SafeArea from '../../components/SafeArea';
18-
import presentAlert from '../../components/Alert';
1918
import { SendDetailsStackParamList } from '../../navigation/SendDetailsStackParamList.ts';
2019
import { BlueSpacing40 } from '../../components/BlueSpacing';
2120
import { BlueLoading } from '../../components/BlueLoading.tsx';
@@ -117,12 +116,8 @@ const ScanQRCode = () => {
117116
setUrTotal(100);
118117
setUrHave(Math.floor(decoder.estimatedPercentComplete() * 100));
119118
}
120-
} catch (error) {
121-
setIsLoading(true);
122-
presentAlert({
123-
title: loc.errors.error,
124-
message: loc._.invalid_animated_qr_code_fragment,
125-
});
119+
} catch (error: any) {
120+
console.log('Invalid animated qr code fragment: ' + error.message + ' (continuing scanning)');
126121
}
127122
};
128123

@@ -159,13 +154,8 @@ const ScanQRCode = () => {
159154
} else {
160155
setAnimatedQRCodeData(animatedQRCodeData);
161156
}
162-
} catch (error) {
163-
setIsLoading(true);
164-
165-
presentAlert({
166-
title: loc.errors.error,
167-
message: loc._.invalid_animated_qr_code_fragment,
168-
});
157+
} catch (error: any) {
158+
console.log('Invalid animated qr code fragment: ' + error.message + ' (continuing scanning)');
169159
}
170160
};
171161

0 commit comments

Comments
 (0)