mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-20 10:14:08 +01:00
fix null check when user exits out of qr code scanner (#2002)
This commit is contained in:
@@ -100,6 +100,7 @@ class AnimatedURPage extends BasePage {
|
||||
switch (urQrType) {
|
||||
case "ur:xmr-txunsigned": // ur:xmr-txsigned
|
||||
final ur = await presentQRScanner(context);
|
||||
if (ur == null) return;
|
||||
final result = await monero!.commitTransactionUR(animatedURmodel.wallet, ur);
|
||||
if (result) {
|
||||
Navigator.of(context).pop(true);
|
||||
@@ -107,6 +108,7 @@ class AnimatedURPage extends BasePage {
|
||||
break;
|
||||
case "ur:xmr-output": // xmr-keyimage
|
||||
final ur = await presentQRScanner(context);
|
||||
if (ur == null) return;
|
||||
final result = await monero!.importKeyImagesUR(animatedURmodel.wallet, ur);
|
||||
if (result) {
|
||||
Navigator.of(context).pop(true);
|
||||
|
||||
@@ -233,6 +233,7 @@ class AddressTextField<T extends Currency> extends StatelessWidget{
|
||||
await PermissionHandler.checkPermission(Permission.camera, context);
|
||||
if (!isCameraPermissionGranted) return;
|
||||
final code = await presentQRScanner(context);
|
||||
if (code == null) return;
|
||||
if (code.isEmpty) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user