mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
CW-898 fix fast scanner (#1957)
* wip * Minor fixes * i hate this * update fast scanner * Update fast_scanner, fix: CW-876 * update fast_scanner (androidx camera / camera2) * bring back sleep
This commit is contained in:
parent
5fae4bc5d1
commit
448b48063f
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
import 'package:cake_wallet/core/execution_state.dart';
|
import 'package:cake_wallet/core/execution_state.dart';
|
||||||
import 'package:cake_wallet/entities/qr_scanner.dart';
|
import 'package:cake_wallet/entities/qr_scanner.dart';
|
||||||
import 'package:cake_wallet/store/settings_store.dart';
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
|
import 'package:cw_core/utils/print_verbose.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:hive/hive.dart';
|
import 'package:hive/hive.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
@ -215,7 +216,6 @@ abstract class NodeCreateOrEditViewModelBase with Store {
|
||||||
await PermissionHandler.checkPermission(Permission.camera, context);
|
await PermissionHandler.checkPermission(Permission.camera, context);
|
||||||
if (!isCameraPermissionGranted) return;
|
if (!isCameraPermissionGranted) return;
|
||||||
String code = await presentQRScanner(context);
|
String code = await presentQRScanner(context);
|
||||||
|
|
||||||
if (code.isEmpty) {
|
if (code.isEmpty) {
|
||||||
throw Exception('Unexpected scan QR code value: value is empty');
|
throw Exception('Unexpected scan QR code value: value is empty');
|
||||||
}
|
}
|
||||||
|
@ -228,12 +228,12 @@ abstract class NodeCreateOrEditViewModelBase with Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
final userInfo = uri.userInfo;
|
final userInfo = uri.userInfo;
|
||||||
|
final rpcUser = userInfo.length == 2 ? userInfo[0] : '';
|
||||||
|
final rpcPassword = userInfo.length == 2 ? userInfo[1] : '';
|
||||||
final ipAddress = uri.host;
|
final ipAddress = uri.host;
|
||||||
final port = uri.hasPort ? uri.port.toString() : '';
|
final port = uri.hasPort ? uri.port.toString() : '';
|
||||||
final path = uri.path;
|
final path = uri.path;
|
||||||
final queryParams = uri.queryParameters; // Currently not used
|
final queryParams = uri.queryParameters; // Currently not used
|
||||||
final rpcUser = userInfo.split(':').first;
|
|
||||||
final rpcPassword = userInfo.split(':').length > 1 ? userInfo.split(':')[1] : '';
|
|
||||||
|
|
||||||
await Future.delayed(Duration(milliseconds: 345));
|
await Future.delayed(Duration(milliseconds: 345));
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ dependencies:
|
||||||
fast_scanner:
|
fast_scanner:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/MrCyjaneK/fast_scanner
|
url: https://github.com/MrCyjaneK/fast_scanner
|
||||||
ref: c5a08720216a508bf1fe3d062ad19d2836545a42
|
ref: 69b3276b090fa6ac01b4483ca3adca93a8e615be
|
||||||
http: ^1.1.0
|
http: ^1.1.0
|
||||||
path_provider: ^2.0.11
|
path_provider: ^2.0.11
|
||||||
mobx: ^2.1.4
|
mobx: ^2.1.4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue