mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
Merge branch 'cake-tech:dev' into dev
This commit is contained in:
@@ -268,6 +268,15 @@ class Node {
|
||||
bool get useSocksProxy => socksProxyAddress == null ? false : socksProxyAddress!.isNotEmpty;
|
||||
|
||||
Uri get uri {
|
||||
try {
|
||||
return _uri;
|
||||
} catch (e) {
|
||||
printV(e);
|
||||
return Uri();
|
||||
}
|
||||
}
|
||||
|
||||
Uri get _uri {
|
||||
switch (type) {
|
||||
case WalletType.monero:
|
||||
case WalletType.zcash:
|
||||
|
||||
@@ -165,6 +165,15 @@ class Node extends HiveObject with Keyable {
|
||||
bool get useSocksProxy => socksProxyAddress == null ? false : socksProxyAddress!.isNotEmpty;
|
||||
|
||||
Uri get uri {
|
||||
try {
|
||||
return _uri;
|
||||
} catch (e) {
|
||||
printV(e);
|
||||
return Uri();
|
||||
}
|
||||
}
|
||||
|
||||
Uri get _uri {
|
||||
switch (type) {
|
||||
case WalletType.monero:
|
||||
case WalletType.zcash:
|
||||
|
||||
@@ -132,7 +132,10 @@ abstract class WalletKitServiceBase with Store {
|
||||
debugPrint('Intializing walletKit');
|
||||
if (!isInitialized) {
|
||||
try {
|
||||
await _walletKit.init();
|
||||
await _walletKit.init().timeout(
|
||||
const Duration(seconds: 8),
|
||||
onTimeout: () => throw TimeoutException('walletKit init timed out'),
|
||||
);
|
||||
debugPrint('Initialized');
|
||||
isInitialized = true;
|
||||
} catch (e) {
|
||||
@@ -206,7 +209,7 @@ abstract class WalletKitServiceBase with Store {
|
||||
name: 'accountsChanged',
|
||||
data: [chain.publicKey],
|
||||
),
|
||||
);
|
||||
).timeout(const Duration(seconds: 3));
|
||||
}
|
||||
} on ReownSignError catch (e) {
|
||||
if (e.code == 6) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:cake_wallet/core/amount_parsing_proxy.dart';
|
||||
import 'package:cake_wallet/di.dart';
|
||||
import 'package:cake_wallet/entities/preferences_key.dart';
|
||||
@@ -6,6 +8,7 @@ import 'package:cake_wallet/src/screens/wallet_connect/services/walletkit_servic
|
||||
import 'package:cake_wallet/themes/core/theme_store.dart';
|
||||
import 'package:cake_wallet/utils/exception_handler.dart';
|
||||
import 'package:cw_core/transaction_info.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:cw_core/balance.dart';
|
||||
@@ -63,13 +66,22 @@ abstract class AppStoreBase with Store {
|
||||
this.wallet!.setExceptionHandler(ExceptionHandler.onError);
|
||||
|
||||
if (isWalletConnectCompatibleChain(wallet.type)) {
|
||||
await getIt.get<WalletKitService>().onDispose();
|
||||
getIt.get<WalletKitService>().create();
|
||||
await getIt.get<WalletKitService>().init();
|
||||
unawaited(_setupWalletConnect());
|
||||
}
|
||||
await getIt.get<SharedPreferences>().setString(PreferencesKey.currentWalletName, wallet.name);
|
||||
await getIt
|
||||
.get<SharedPreferences>()
|
||||
.setInt(PreferencesKey.currentWalletType, serializeToInt(wallet.type));
|
||||
}
|
||||
|
||||
Future<void> _setupWalletConnect() async {
|
||||
try {
|
||||
final wcService = getIt.get<WalletKitService>();
|
||||
await wcService.onDispose();
|
||||
wcService.create();
|
||||
await wcService.init();
|
||||
} catch (e, s) {
|
||||
printV('WalletConnect setup failed: $e\n$s');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,15 +14,15 @@ TYPES=($MONERO_COM $CAKEWALLET)
|
||||
APP_ANDROID_TYPE=$1
|
||||
|
||||
MONERO_COM_NAME="Monero.com"
|
||||
MONERO_COM_VERSION="6.2.0"
|
||||
MONERO_COM_BUILD_NUMBER=4159
|
||||
MONERO_COM_VERSION="6.2.1"
|
||||
MONERO_COM_BUILD_NUMBER=4161
|
||||
MONERO_COM_BUNDLE_ID="com.monero.app"
|
||||
MONERO_COM_PACKAGE="com.monero.app"
|
||||
MONERO_COM_SCHEME="monero.com"
|
||||
|
||||
CAKEWALLET_NAME="Cake Wallet"
|
||||
CAKEWALLET_VERSION="6.2.0"
|
||||
CAKEWALLET_BUILD_NUMBER=4411
|
||||
CAKEWALLET_VERSION="6.2.1"
|
||||
CAKEWALLET_BUILD_NUMBER=4413
|
||||
CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet"
|
||||
CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet"
|
||||
CAKEWALLET_SCHEME="cakewallet"
|
||||
|
||||
@@ -12,13 +12,13 @@ TYPES=($MONERO_COM $CAKEWALLET)
|
||||
APP_IOS_TYPE=$1
|
||||
|
||||
MONERO_COM_NAME="Monero.com"
|
||||
MONERO_COM_VERSION="6.2.0"
|
||||
MONERO_COM_BUILD_NUMBER=165
|
||||
MONERO_COM_VERSION="6.2.1"
|
||||
MONERO_COM_BUILD_NUMBER=167
|
||||
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
||||
|
||||
CAKEWALLET_NAME="Cake Wallet"
|
||||
CAKEWALLET_VERSION="6.2.0"
|
||||
CAKEWALLET_BUILD_NUMBER=421
|
||||
CAKEWALLET_VERSION="6.2.1"
|
||||
CAKEWALLET_BUILD_NUMBER=423
|
||||
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user