Merge remote-tracking branch 'origin/main' into CW-453-silent-payments

This commit is contained in:
Rafael Saes 2024-05-06 17:33:34 -03:00
commit 657e9ac6fc
54 changed files with 1200 additions and 727 deletions

View file

@ -42,7 +42,7 @@ jobs:
- name: Flutter action - name: Flutter action
uses: subosito/flutter-action@v1 uses: subosito/flutter-action@v1
with: with:
flutter-version: "3.10.x" flutter-version: "3.19.5"
channel: stable channel: stable
- name: Install package dependencies - name: Install package dependencies

View file

@ -2,3 +2,7 @@
uri: api.trongrid.io uri: api.trongrid.io
is_default: true is_default: true
useSSL: true useSSL: true
-
uri: tron-rpc.publicnode.com:443
is_default: false
useSSL: true

View file

@ -28,7 +28,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
required String password, required String password,
required WalletInfo walletInfo, required WalletInfo walletInfo,
required Box<UnspentCoinsInfo> unspentCoinsInfo, required Box<UnspentCoinsInfo> unspentCoinsInfo,
required Uint8List seedBytes, Uint8List? seedBytes,
String? mnemonic, String? mnemonic,
String? xpub, String? xpub,
String? addressPageType, String? addressPageType,
@ -68,10 +68,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
mainHd: hd, mainHd: hd,
sideHd: accountHD.derive(1), sideHd: accountHD.derive(1),
network: networkParam ?? network, network: networkParam ?? network,
masterHd: bitcoin.HDWallet.fromSeed( masterHd: hd,
seedBytes,
network: network == BitcoinNetwork.testnet ? bitcoin.testnet : bitcoin.bitcoin,
),
); );
autorun((_) { autorun((_) {

View file

@ -226,10 +226,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.1" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -463,6 +463,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.1" version: "4.8.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
ledger_bitcoin: ledger_bitcoin:
dependency: "direct main" dependency: "direct main"
description: description:
@ -500,26 +524,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.15" version: "0.12.16+1"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.0" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.11.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -564,10 +588,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.9.0"
path_provider: path_provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -761,10 +785,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
sp_scanner: sp_scanner:
dependency: "direct main" dependency: "direct main"
description: description:
@ -778,18 +802,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@ -818,10 +842,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.1" version: "0.6.1"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -862,8 +886,16 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
watcher: vm_service:
dependency: transitive dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
watcher:
dependency: "direct overridden"
description: description:
name: watcher name: watcher
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
@ -911,5 +943,5 @@ packages:
source: hosted source: hosted
version: "2.2.0" version: "2.2.0"
sdks: sdks:
dart: ">=3.0.6 <4.0.0" dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.10.0" flutter: ">=3.10.0"

View file

@ -50,11 +50,14 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.1.11 build_runner: ^2.4.7
build_resolvers: ^2.0.9 build_resolvers: ^2.0.9
mobx_codegen: ^2.0.7 mobx_codegen: ^2.0.7
hive_generator: ^1.1.3 hive_generator: ^1.1.3
dependency_overrides:
watcher: ^1.1.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View file

@ -41,10 +41,13 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.1.11 build_runner: ^2.4.7
mobx_codegen: ^2.0.7 mobx_codegen: ^2.0.7
hive_generator: ^1.1.3 hive_generator: ^1.1.3
dependency_overrides:
watcher: ^1.1.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View file

@ -0,0 +1,22 @@
import 'dart:io';
import 'package:flutter/services.dart';
const MethodChannel _channel = MethodChannel('com.cake_wallet/native_utils');
Future<void> setDefaultMinimumWindowSize() async {
if (!Platform.isMacOS) return;
try {
final result = await _channel.invokeMethod(
'setMinWindowSize',
{'width': 500, 'height': 700},
) as bool;
if (!result) {
print("Failed to set minimum window size.");
}
} on PlatformException catch (e) {
print("Failed to set minimum window size: '${e.message}'.");
}
}

View file

@ -149,10 +149,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.1" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -331,6 +331,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.1" version: "4.8.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@ -343,26 +367,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.15" version: "0.12.16+1"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.0" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.11.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -407,10 +431,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.9.0"
path_provider: path_provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -564,26 +588,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@ -612,10 +636,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.1" version: "0.6.1"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -640,8 +664,16 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
watcher: vm_service:
dependency: transitive dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
watcher:
dependency: "direct overridden"
description: description:
name: watcher name: watcher
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
@ -681,5 +713,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.0.0 <4.0.0" dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.10.0" flutter: ">=3.10.0"

View file

@ -28,11 +28,13 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.1.11 build_runner: ^2.4.7
build_resolvers: ^2.0.9 build_resolvers: ^2.0.9
mobx_codegen: ^2.0.7 mobx_codegen: ^2.0.7
hive_generator: ^2.0.1 hive_generator: ^2.0.1
dependency_overrides:
watcher: ^1.1.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View file

@ -24,11 +24,13 @@ dependency_overrides:
git: git:
url: https://github.com/cake-tech/web3dart.git url: https://github.com/cake-tech/web3dart.git
ref: cake ref: cake
watcher: ^1.1.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.1.11 build_runner: ^2.4.7
flutter: flutter:
# assets: # assets:
# - images/a_dot_burr.jpeg # - images/a_dot_burr.jpeg

View file

@ -36,11 +36,12 @@ dependency_overrides:
git: git:
url: https://github.com/cake-tech/ledger-flutter.git url: https://github.com/cake-tech/ledger-flutter.git
ref: cake ref: cake
watcher: ^1.1.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.1.11 build_runner: ^2.4.7
mobx_codegen: ^2.0.7 mobx_codegen: ^2.0.7
hive_generator: ^1.1.3 hive_generator: ^1.1.3
flutter_lints: ^2.0.0 flutter_lints: ^2.0.0

View file

@ -149,10 +149,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.1" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -338,6 +338,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.0" version: "4.8.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@ -350,26 +374,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.15" version: "0.12.16+1"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.0" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.11.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -406,10 +430,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.9.0"
path_provider: path_provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -563,26 +587,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@ -611,10 +635,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.1" version: "0.6.1"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -639,8 +663,16 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
watcher: vm_service:
dependency: transitive dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
watcher:
dependency: "direct overridden"
description: description:
name: watcher name: watcher
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
@ -680,5 +712,5 @@ packages:
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
sdks: sdks:
dart: ">=3.0.0 <4.0.0" dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.7.0" flutter: ">=3.7.0"

View file

@ -24,11 +24,14 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.1.11 build_runner: ^2.4.7
mobx_codegen: ^2.0.7 mobx_codegen: ^2.0.7
build_resolvers: ^2.0.9 build_resolvers: ^2.0.9
hive_generator: ^1.1.3 hive_generator: ^1.1.3
dependency_overrides:
watcher: ^1.1.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View file

@ -53,10 +53,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.1" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -201,6 +201,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.7" version: "0.6.7"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
lints: lints:
dependency: transitive dependency: transitive
description: description:
@ -213,26 +237,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.15" version: "0.12.16+1"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.0" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.11.0"
mobx: mobx:
dependency: transitive dependency: transitive
description: description:
@ -245,10 +269,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.9.0"
path_provider: path_provider:
dependency: transitive dependency: transitive
description: description:
@ -354,26 +378,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
string_scanner: string_scanner:
dependency: transitive dependency: transitive
description: description:
@ -394,10 +418,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.1" version: "0.6.1"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -414,6 +438,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
win32: win32:
dependency: transitive dependency: transitive
description: description:
@ -431,5 +463,5 @@ packages:
source: hosted source: hosted
version: "0.2.0+3" version: "0.2.0+3"
sdks: sdks:
dart: ">=3.0.6 <4.0.0" dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.7.0" flutter: ">=3.7.0"

View file

@ -149,10 +149,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.1" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -354,6 +354,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.0" version: "4.8.0"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@ -366,26 +390,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.15" version: "0.12.16+1"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.0" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.11.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -422,10 +446,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.9.0"
path_provider: path_provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -587,26 +611,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@ -635,10 +659,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.1" version: "0.6.1"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -663,8 +687,16 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
watcher: vm_service:
dependency: transitive dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
watcher:
dependency: "direct overridden"
description: description:
name: watcher name: watcher
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
@ -704,5 +736,5 @@ packages:
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
sdks: sdks:
dart: ">=3.0.6 <4.0.0" dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.7.0" flutter: ">=3.7.0"

View file

@ -26,11 +26,14 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.1.11 build_runner: ^2.4.7
build_resolvers: ^2.0.9 build_resolvers: ^2.0.9
mobx_codegen: ^2.0.7 mobx_codegen: ^2.0.7
hive_generator: ^1.1.3 hive_generator: ^1.1.3
dependency_overrides:
watcher: ^1.1.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View file

@ -173,10 +173,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.1" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -399,6 +399,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.1" version: "4.8.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
libcrypto: libcrypto:
dependency: "direct main" dependency: "direct main"
description: description:
@ -419,26 +443,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.15" version: "0.12.16+1"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.2.0" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.11.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -492,10 +516,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.9.0"
path_provider: path_provider:
dependency: transitive dependency: transitive
description: description:
@ -713,26 +737,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: source_span name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@ -761,10 +785,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.1" version: "0.6.1"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@ -789,8 +813,16 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
watcher: vm_service:
dependency: transitive dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
watcher:
dependency: "direct overridden"
description: description:
name: watcher name: watcher
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
@ -830,5 +862,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.0.0 <4.0.0" dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.10.0" flutter: ">=3.10.0"

View file

@ -32,10 +32,13 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
build_runner: ^2.1.11 build_runner: ^2.4.7
mobx_codegen: ^2.0.7 mobx_codegen: ^2.0.7
hive_generator: ^1.1.3 hive_generator: ^1.1.3
dependency_overrides:
watcher: ^1.1.0
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View file

@ -28,12 +28,14 @@ dependency_overrides:
git: git:
url: https://github.com/cake-tech/web3dart.git url: https://github.com/cake-tech/web3dart.git
ref: cake ref: cake
watcher: ^1.1.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^2.0.0 flutter_lints: ^2.0.0
build_runner: ^2.1.11 build_runner: ^2.4.7
# For information on the generic Dart part of this file, see the # For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec # following page: https://dart.dev/tools/pub/pubspec

View file

@ -26,10 +26,13 @@ dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^2.0.0 flutter_lints: ^2.0.0
build_runner: ^2.1.11 build_runner: ^2.4.7
mobx_codegen: ^2.0.7 mobx_codegen: ^2.0.7
hive_generator: ^1.1.3 hive_generator: ^1.1.3
dependency_overrides:
watcher: ^1.1.0
flutter: flutter:
# assets: # assets:
# - images/a_dot_burr.jpeg # - images/a_dot_burr.jpeg

View file

@ -367,7 +367,7 @@ class TronClient {
) async { ) async {
// This is introduce to server as a limit in cases where feeLimit is 0 // This is introduce to server as a limit in cases where feeLimit is 0
// The transaction signing will fail if the feeLimit is explicitly 0. // The transaction signing will fail if the feeLimit is explicitly 0.
int defaultFeeLimit = 100000; int defaultFeeLimit = 269000;
final block = await _provider!.request(TronRequestGetNowBlock()); final block = await _provider!.request(TronRequestGetNowBlock());
// Create the transfer contract // Create the transfer contract
@ -401,8 +401,9 @@ class TronClient {
final tronBalanceInt = tronBalance.toInt(); final tronBalanceInt = tronBalance.toInt();
if (feeLimit > tronBalanceInt) { if (feeLimit > tronBalanceInt) {
final feeInTrx = TronHelper.fromSun(BigInt.parse(feeLimit.toString()));
throw Exception( throw Exception(
'You don\'t have enough TRX to cover the transaction fee for this transaction. Kindly top up.', 'You don\'t have enough TRX to cover the transaction fee for this transaction. Kindly top up.\nTransaction fee: $feeInTrx TRX',
); );
} }
@ -442,6 +443,9 @@ class TronClient {
if (!request.isSuccess) { if (!request.isSuccess) {
log("Tron TRC20 error: ${request.error} \n ${request.respose}"); log("Tron TRC20 error: ${request.error} \n ${request.respose}");
throw Exception(
'An error occured while creating the transfer request. Please try again.',
);
} }
final feeLimit = await getFeeLimit( final feeLimit = await getFeeLimit(
@ -454,8 +458,9 @@ class TronClient {
final tronBalanceInt = tronBalance.toInt(); final tronBalanceInt = tronBalance.toInt();
if (feeLimit > tronBalanceInt) { if (feeLimit > tronBalanceInt) {
final feeInTrx = TronHelper.fromSun(BigInt.parse(feeLimit.toString()));
throw Exception( throw Exception(
'You don\'t have enough TRX to cover the transaction fee for this transaction. Kindly top up.', 'You don\'t have enough TRX to cover the transaction fee for this transaction. Kindly top up. Transaction fee: $feeInTrx TRX',
); );
} }

View file

@ -42,12 +42,7 @@ class AuthService with Store {
Future<void> setPassword(String password) async { Future<void> setPassword(String password) async {
final key = generateStoreKeyFor(key: SecretStoreKey.pinCodePassword); final key = generateStoreKeyFor(key: SecretStoreKey.pinCodePassword);
final encodedPassword = encodedPinCode(pin: password); final encodedPassword = encodedPinCode(pin: password);
// secure storage has a weird bug on macOS, where overwriting a key doesn't work, unless await writeSecureStorage(secureStorage, key: key, value: encodedPassword);
// we delete what's there first:
if (Platform.isMacOS) {
await secureStorage.delete(key: key);
}
await secureStorage.write(key: key, value: encodedPassword);
} }
Future<bool> canAuthenticate() async { Future<bool> canAuthenticate() async {
@ -74,7 +69,11 @@ class AuthService with Store {
void saveLastAuthTime() { void saveLastAuthTime() {
int timestamp = DateTime.now().millisecondsSinceEpoch; int timestamp = DateTime.now().millisecondsSinceEpoch;
secureStorage.write(key: SecureKey.lastAuthTimeMilliseconds, value: timestamp.toString()); writeSecureStorage(
secureStorage,
key: SecureKey.lastAuthTimeMilliseconds,
value: timestamp.toString(),
);
} }
Future<bool> requireAuth() async { Future<bool> requireAuth() async {

View file

@ -1,6 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:cake_wallet/core/secure_storage.dart';
import 'package:cake_wallet/themes/theme_list.dart'; import 'package:cake_wallet/themes/theme_list.dart';
import 'package:cake_wallet/utils/device_info.dart'; import 'package:cake_wallet/utils/device_info.dart';
import 'package:cw_core/wallet_type.dart'; import 'package:cw_core/wallet_type.dart';
@ -373,16 +374,15 @@ class BackupService {
final backupPasswordKey = generateStoreKeyFor(key: SecretStoreKey.backupPassword); final backupPasswordKey = generateStoreKeyFor(key: SecretStoreKey.backupPassword);
final backupPassword = keychainJSON[backupPasswordKey] as String; final backupPassword = keychainJSON[backupPasswordKey] as String;
await _flutterSecureStorage.delete(key: backupPasswordKey); await writeSecureStorage(_flutterSecureStorage, key: backupPasswordKey, value: backupPassword);
await _flutterSecureStorage.write(key: backupPasswordKey, value: backupPassword);
keychainWalletsInfo.forEach((dynamic rawInfo) async { keychainWalletsInfo.forEach((dynamic rawInfo) async {
final info = rawInfo as Map<String, dynamic>; final info = rawInfo as Map<String, dynamic>;
await importWalletKeychainInfo(info); await importWalletKeychainInfo(info);
}); });
await _flutterSecureStorage.delete(key: pinCodeKey); await writeSecureStorage(_flutterSecureStorage,
await _flutterSecureStorage.write(key: pinCodeKey, value: encodedPinCode(pin: decodedPin)); key: pinCodeKey, value: encodedPinCode(pin: decodedPin));
keychainDumpFile.deleteSync(); keychainDumpFile.deleteSync();
} }
@ -401,16 +401,15 @@ class BackupService {
final backupPasswordKey = generateStoreKeyFor(key: SecretStoreKey.backupPassword); final backupPasswordKey = generateStoreKeyFor(key: SecretStoreKey.backupPassword);
final backupPassword = keychainJSON[backupPasswordKey] as String; final backupPassword = keychainJSON[backupPasswordKey] as String;
await _flutterSecureStorage.delete(key: backupPasswordKey); await writeSecureStorage(_flutterSecureStorage, key: backupPasswordKey, value: backupPassword);
await _flutterSecureStorage.write(key: backupPasswordKey, value: backupPassword);
keychainWalletsInfo.forEach((dynamic rawInfo) async { keychainWalletsInfo.forEach((dynamic rawInfo) async {
final info = rawInfo as Map<String, dynamic>; final info = rawInfo as Map<String, dynamic>;
await importWalletKeychainInfo(info); await importWalletKeychainInfo(info);
}); });
await _flutterSecureStorage.delete(key: pinCodeKey); await writeSecureStorage(_flutterSecureStorage,
await _flutterSecureStorage.write(key: pinCodeKey, value: encodedPinCode(pin: decodedPin)); key: pinCodeKey, value: encodedPinCode(pin: decodedPin));
keychainDumpFile.deleteSync(); keychainDumpFile.deleteSync();
} }

View file

@ -20,8 +20,7 @@ class KeyService {
key: SecretStoreKey.moneroWalletPassword, walletName: walletName); key: SecretStoreKey.moneroWalletPassword, walletName: walletName);
final encodedPassword = encodeWalletPassword(password: password); final encodedPassword = encodeWalletPassword(password: password);
await _secureStorage.delete(key: key); await writeSecureStorage(_secureStorage, key: key, value: encodedPassword);
await _secureStorage.write(key: key, value: encodedPassword);
} }
Future<void> deleteWalletPassword({required String walletName}) async { Future<void> deleteWalletPassword({required String walletName}) async {

View file

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
// For now, we can create a utility function to handle this. // For now, we can create a utility function to handle this.
// //
@ -25,3 +26,13 @@ Future<String?> readSecureStorage(FlutterSecureStorage secureStorage, String key
return result; return result;
} }
Future<void> writeSecureStorage(FlutterSecureStorage secureStorage,
{required String key, required String value}) async {
// delete the value before writing on macOS because of a weird bug
// https://github.com/mogol/flutter_secure_storage/issues/581
if (Platform.isMacOS) {
await secureStorage.delete(key: key);
}
await secureStorage.write(key: key, value: value);
}

View file

@ -1,32 +1,29 @@
import 'package:local_auth/local_auth.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:cake_wallet/generated/i18n.dart'; import 'package:flutter_local_authentication/flutter_local_authentication.dart';
class BiometricAuth { class BiometricAuth {
final _localAuth = LocalAuthentication(); final _flutterLocalAuthenticationPlugin = FlutterLocalAuthentication();
Future<bool> isAuthenticated() async { Future<bool> isAuthenticated() async {
try { try {
return await _localAuth.authenticate( final authenticated = await _flutterLocalAuthenticationPlugin.authenticate();
localizedReason: S.current.biometric_auth_reason, return authenticated;
options: AuthenticationOptions( } catch (e) {
biometricOnly: true,
useErrorDialogs: true,
stickyAuth: false));
} on PlatformException catch (e) {
print(e); print(e);
} }
return false; return false;
} }
Future<bool> canCheckBiometrics() async { Future<bool> canCheckBiometrics() async {
bool canAuthenticate;
try { try {
return await _localAuth.canCheckBiometrics; canAuthenticate = await _flutterLocalAuthenticationPlugin.canAuthenticate();
} on PlatformException catch (e) { await _flutterLocalAuthenticationPlugin.setTouchIDAuthenticationAllowableReuseDuration(0);
print(e); } catch (error) {
print("Exception checking support. $error");
canAuthenticate = false;
} }
return false; return canAuthenticate;
} }
} }

View file

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'dart:convert'; import 'dart:convert';
import 'package:cake_wallet/core/secure_storage.dart';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -147,8 +148,8 @@ Future<void> ios_migrate_pin() async {
final key = generateStoreKeyFor(key: SecretStoreKey.pinCodePassword); final key = generateStoreKeyFor(key: SecretStoreKey.pinCodePassword);
final encodedPassword = encodedPinCode(pin: pinPassword); final encodedPassword = encodedPinCode(pin: pinPassword);
await flutterSecureStorage.delete(key: key); await writeSecureStorage(flutterSecureStorage, key: key, value: encodedPassword);
await flutterSecureStorage.write(key: key, value: encodedPassword);
await prefs.setBool('ios_migration_pin_completed', true); await prefs.setBool('ios_migration_pin_completed', true);
} }

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/core/secure_storage.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/cake_hive.dart';
@ -10,8 +11,7 @@ Future<List<int>> getEncryptionKey(
key = CakeHive.generateSecureKey(); key = CakeHive.generateSecureKey();
final keyStringified = key.join(','); final keyStringified = key.join(',');
String storageKey = 'transactionDescriptionsBoxKey'; String storageKey = 'transactionDescriptionsBoxKey';
await secureStorage.delete(key: storageKey); await writeSecureStorage(secureStorage, key: storageKey, value: keyStringified);
await secureStorage.write(key: storageKey, value: keyStringified);
} else { } else {
key = stringifiedKey.split(',').map((i) => int.parse(i)).toList(); key = stringifiedKey.split(',').map((i) => int.parse(i)).toList();
} }

View file

@ -5,6 +5,7 @@ import 'package:cake_wallet/entities/openalias_record.dart';
import 'package:cake_wallet/entities/parsed_address.dart'; import 'package:cake_wallet/entities/parsed_address.dart';
import 'package:cake_wallet/entities/unstoppable_domain_address.dart'; import 'package:cake_wallet/entities/unstoppable_domain_address.dart';
import 'package:cake_wallet/entities/emoji_string_extension.dart'; import 'package:cake_wallet/entities/emoji_string_extension.dart';
import 'package:cake_wallet/exchange/provider/thorchain_exchange.provider.dart';
import 'package:cake_wallet/mastodon/mastodon_api.dart'; import 'package:cake_wallet/mastodon/mastodon_api.dart';
import 'package:cake_wallet/nostr/nostr_api.dart'; import 'package:cake_wallet/nostr/nostr_api.dart';
import 'package:cake_wallet/store/settings_store.dart'; import 'package:cake_wallet/store/settings_store.dart';
@ -71,8 +72,8 @@ class AddressResolver {
return emailRegex.hasMatch(address); return emailRegex.hasMatch(address);
} }
// TODO: refactor this to take Crypto currency instead of ticker, or at least pass in the tag as well Future<ParsedAddress> resolve(BuildContext context, String text, CryptoCurrency currency) async {
Future<ParsedAddress> resolve(BuildContext context, String text, String ticker) async { final ticker = currency.title;
try { try {
if (text.startsWith('@') && !text.substring(1).contains('@')) { if (text.startsWith('@') && !text.substring(1).contains('@')) {
if (settingsStore.lookupsTwitter) { if (settingsStore.lookupsTwitter) {
@ -116,8 +117,7 @@ class AddressResolver {
await MastodonAPI.lookupUserByUserName(userName: userName, apiHost: hostName); await MastodonAPI.lookupUserByUserName(userName: userName, apiHost: hostName);
if (mastodonUser != null) { if (mastodonUser != null) {
String? addressFromBio = extractAddressByType( String? addressFromBio = extractAddressByType(raw: mastodonUser.note, type: currency);
raw: mastodonUser.note, type: CryptoCurrency.fromString(ticker));
if (addressFromBio != null) { if (addressFromBio != null) {
return ParsedAddress.fetchMastodonAddress( return ParsedAddress.fetchMastodonAddress(
@ -131,8 +131,8 @@ class AddressResolver {
if (pinnedPosts.isNotEmpty) { if (pinnedPosts.isNotEmpty) {
final userPinnedPostsText = pinnedPosts.map((item) => item.content).join('\n'); final userPinnedPostsText = pinnedPosts.map((item) => item.content).join('\n');
String? addressFromPinnedPost = extractAddressByType( String? addressFromPinnedPost =
raw: userPinnedPostsText, type: CryptoCurrency.fromString(ticker)); extractAddressByType(raw: userPinnedPostsText, type: currency);
if (addressFromPinnedPost != null) { if (addressFromPinnedPost != null) {
return ParsedAddress.fetchMastodonAddress( return ParsedAddress.fetchMastodonAddress(
@ -162,6 +162,16 @@ class AddressResolver {
} }
} }
} }
final thorChainAddress = await ThorChainExchangeProvider.lookupAddressByName(text);
if (thorChainAddress != null) {
String? address =
thorChainAddress[ticker] ?? (ticker == 'RUNE' ? thorChainAddress['THOR'] : null);
if (address != null) {
return ParsedAddress.thorChainAddress(address: address, name: text);
}
}
final formattedName = OpenaliasRecord.formatDomainName(text); final formattedName = OpenaliasRecord.formatDomainName(text);
final domainParts = formattedName.split('.'); final domainParts = formattedName.split('.');
final name = domainParts.last; final name = domainParts.last;
@ -204,7 +214,7 @@ class AddressResolver {
if (nostrUserData != null) { if (nostrUserData != null) {
String? addressFromBio = extractAddressByType( String? addressFromBio = extractAddressByType(
raw: nostrUserData.about, type: CryptoCurrency.fromString(ticker)); raw: nostrUserData.about, type: currency);
if (addressFromBio != null) { if (addressFromBio != null) {
return ParsedAddress.nostrAddress( return ParsedAddress.nostrAddress(
address: addressFromBio, address: addressFromBio,

View file

@ -11,7 +11,8 @@ enum ParseFrom {
ens, ens,
contact, contact,
mastodon, mastodon,
nostr nostr,
thorChain
} }
class ParsedAddress { class ParsedAddress {
@ -133,6 +134,14 @@ class ParsedAddress {
); );
} }
factory ParsedAddress.thorChainAddress({required String address, required String name}) {
return ParsedAddress(
addresses: [address],
name: name,
parseFrom: ParseFrom.thorChain,
);
}
final List<String> addresses; final List<String> addresses;
final String name; final String name;
final String description; final String description;

View file

@ -34,11 +34,13 @@ class ThorChainExchangeProvider extends ExchangeProvider {
static final isRefundAddressSupported = [CryptoCurrency.eth]; static final isRefundAddressSupported = [CryptoCurrency.eth];
static const _baseURL = 'thornode.ninerealms.com'; static const _baseNodeURL = 'thornode.ninerealms.com';
static const _baseURL = 'midgard.ninerealms.com';
static const _quotePath = '/thorchain/quote/swap'; static const _quotePath = '/thorchain/quote/swap';
static const _txInfoPath = '/thorchain/tx/status/'; static const _txInfoPath = '/thorchain/tx/status/';
static const _affiliateName = 'cakewallet'; static const _affiliateName = 'cakewallet';
static const _affiliateBps = '175'; static const _affiliateBps = '175';
static const _nameLookUpPath= 'v2/thorname/lookup/';
final Box<Trade> tradesStore; final Box<Trade> tradesStore;
@ -154,7 +156,7 @@ class ThorChainExchangeProvider extends ExchangeProvider {
Future<Trade> findTradeById({required String id}) async { Future<Trade> findTradeById({required String id}) async {
if (id.isEmpty) throw Exception('Trade id is empty'); if (id.isEmpty) throw Exception('Trade id is empty');
final formattedId = id.startsWith('0x') ? id.substring(2) : id; final formattedId = id.startsWith('0x') ? id.substring(2) : id;
final uri = Uri.https(_baseURL, '$_txInfoPath$formattedId'); final uri = Uri.https(_baseNodeURL, '$_txInfoPath$formattedId');
final response = await http.get(uri); final response = await http.get(uri);
if (response.statusCode == 404) { if (response.statusCode == 404) {
@ -206,8 +208,35 @@ class ThorChainExchangeProvider extends ExchangeProvider {
); );
} }
static Future<Map<String, String>?>? lookupAddressByName(String name) async {
final uri = Uri.https(_baseURL, '$_nameLookUpPath$name');
final response = await http.get(uri);
if (response.statusCode != 200) {
return null;
}
final body = json.decode(response.body) as Map<String, dynamic>;
final entries = body['entries'] as List<dynamic>?;
if (entries == null || entries.isEmpty) {
return null;
}
Map<String, String> chainToAddressMap = {};
for (final entry in entries) {
final chain = entry['chain'] as String;
final address = entry['address'] as String;
chainToAddressMap[chain] = address;
}
return chainToAddressMap;
}
Future<Map<String, dynamic>> _getSwapQuote(Map<String, String> params) async { Future<Map<String, dynamic>> _getSwapQuote(Map<String, String> params) async {
Uri uri = Uri.https(_baseURL, _quotePath, params); Uri uri = Uri.https(_baseNodeURL, _quotePath, params);
final response = await http.get(uri); final response = await http.get(uri);

View file

@ -751,6 +751,50 @@ class HaMaterialLocalizations extends GlobalMaterialLocalizations {
@override @override
String get scrimOnTapHintRaw => "Scrip on Tap"; String get scrimOnTapHintRaw => "Scrip on Tap";
@override
// TODO: implement collapsedHint
String get collapsedHint => "collapsedHint";
@override
// TODO: implement expandedHint
String get expandedHint => "expandedHint";
@override
// TODO: implement expansionTileCollapsedHint
String get expansionTileCollapsedHint => "expansionTileCollapsedHint";
@override
// TODO: implement expansionTileCollapsedTapHint
String get expansionTileCollapsedTapHint => "expansionTileCollapsedTapHint";
@override
// TODO: implement expansionTileExpandedHint
String get expansionTileExpandedHint => "expansionTileExpandedHint";
@override
// TODO: implement expansionTileExpandedTapHint
String get expansionTileExpandedTapHint => "expansionTileExpandedTapHint";
@override
// TODO: implement scanTextButtonLabel
String get scanTextButtonLabel => "scanTextButtonLabel";
@override
// TODO: implement lookUpButtonLabel
String get lookUpButtonLabel => "lookUpButtonLabel";
@override
// TODO: implement menuDismissLabel
String get menuDismissLabel => "menuDismissLabel";
@override
// TODO: implement searchWebButtonLabel
String get searchWebButtonLabel => "searchWebButtonLabel";
@override
// TODO: implement shareButtonLabel
String get shareButtonLabel => "shareButtonLabel";
} }
/// Cupertino Support /// Cupertino Support
@ -955,4 +999,24 @@ class HaCupertinoLocalizations extends GlobalCupertinoLocalizations {
@override @override
String get noSpellCheckReplacementsLabel => ""; String get noSpellCheckReplacementsLabel => "";
@override
// TODO: implement clearButtonLabel
String get clearButtonLabel => "clearButtonLabel";
@override
// TODO: implement lookUpButtonLabel
String get lookUpButtonLabel => "lookUpButtonLabel";
@override
// TODO: implement menuDismissLabel
String get menuDismissLabel => "menuDismissLabel";
@override
// TODO: implement searchWebButtonLabel
String get searchWebButtonLabel => "searchWebButtonLabel";
@override
// TODO: implement shareButtonLabel
String get shareButtonLabel => "shareButtonLabel";
} }

View file

@ -1,4 +1,3 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -751,6 +750,50 @@ String get keyboardKeyMetaWindows => 'Windows';
@override @override
String get scrimOnTapHintRaw => "Scrip on Tap"; String get scrimOnTapHintRaw => "Scrip on Tap";
@override
// TODO: implement collapsedHint
String get collapsedHint => "collapsedHint";
@override
// TODO: implement expandedHint
String get expandedHint => "expandedHint";
@override
// TODO: implement expansionTileCollapsedHint
String get expansionTileCollapsedHint => "expansionTileCollapsedHint";
@override
// TODO: implement expansionTileCollapsedTapHint
String get expansionTileCollapsedTapHint => "expansionTileCollapsedTapHint";
@override
// TODO: implement expansionTileExpandedHint
String get expansionTileExpandedHint => "expansionTileExpandedHint";
@override
// TODO: implement expansionTileExpandedTapHint
String get expansionTileExpandedTapHint => "expansionTileExpandedTapHint";
@override
// TODO: implement scanTextButtonLabel
String get scanTextButtonLabel => "scanTextButtonLabel";
@override
// TODO: implement lookUpButtonLabel
String get lookUpButtonLabel => "lookUpButtonLabel";
@override
// TODO: implement menuDismissLabel
String get menuDismissLabel => "menuDismissLabel";
@override
// TODO: implement searchWebButtonLabel
String get searchWebButtonLabel => "searchWebButtonLabel";
@override
// TODO: implement shareButtonLabel
String get shareButtonLabel => "shareButtonLabel";
} }
/// Cupertino Support /// Cupertino Support
@ -955,4 +998,24 @@ String get todayLabel => 'Oyọ';
@override @override
String get noSpellCheckReplacementsLabel => ""; String get noSpellCheckReplacementsLabel => "";
@override
// TODO: implement clearButtonLabel
String get clearButtonLabel => "clearButtonLabel";
@override
// TODO: implement lookUpButtonLabel
String get lookUpButtonLabel => "lookUpButtonLabel";
@override
// TODO: implement menuDismissLabel
String get menuDismissLabel => "menuDismissLabel";
@override
// TODO: implement searchWebButtonLabel
String get searchWebButtonLabel => "searchWebButtonLabel";
@override
// TODO: implement shareButtonLabel
String get shareButtonLabel => "shareButtonLabel";
} }

View file

@ -41,6 +41,7 @@ import 'package:uni_links/uni_links.dart';
import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/unspent_coins_info.dart';
import 'package:cake_wallet/monero/monero.dart'; import 'package:cake_wallet/monero/monero.dart';
import 'package:cw_core/cake_hive.dart'; import 'package:cw_core/cake_hive.dart';
import 'package:cw_core/window_size.dart';
final navigatorKey = GlobalKey<NavigatorState>(); final navigatorKey = GlobalKey<NavigatorState>();
final rootKey = GlobalKey<RootState>(); final rootKey = GlobalKey<RootState>();
@ -60,6 +61,8 @@ Future<void> main() async {
return true; return true;
}; };
await setDefaultMinimumWindowSize();
await CakeHive.close(); await CakeHive.close();
await initializeAppConfigs(); await initializeAppConfigs();

View file

@ -22,7 +22,7 @@ class DropDownItemWidget extends StatelessWidget {
child: Text( child: Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 22, fontSize: 18,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor, color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
), ),

View file

@ -330,10 +330,12 @@ class ExchangePage extends BasePage {
void applyTemplate( void applyTemplate(
BuildContext context, ExchangeViewModel exchangeViewModel, ExchangeTemplate template) async { BuildContext context, ExchangeViewModel exchangeViewModel, ExchangeTemplate template) async {
exchangeViewModel.changeDepositCurrency(
currency: CryptoCurrency.fromString(template.depositCurrency)); final depositCryptoCurrency = CryptoCurrency.fromString(template.depositCurrency);
exchangeViewModel.changeReceiveCurrency( final receiveCryptoCurrency = CryptoCurrency.fromString(template.receiveCurrency);
currency: CryptoCurrency.fromString(template.receiveCurrency));
exchangeViewModel.changeDepositCurrency(currency: depositCryptoCurrency);
exchangeViewModel.changeReceiveCurrency(currency: receiveCryptoCurrency);
exchangeViewModel.changeDepositAmount(amount: template.amount); exchangeViewModel.changeDepositAmount(amount: template.amount);
exchangeViewModel.depositAddress = template.depositAddress; exchangeViewModel.depositAddress = template.depositAddress;
@ -342,12 +344,10 @@ class ExchangePage extends BasePage {
exchangeViewModel.isFixedRateMode = false; exchangeViewModel.isFixedRateMode = false;
var domain = template.depositAddress; var domain = template.depositAddress;
var ticker = template.depositCurrency.toLowerCase(); exchangeViewModel.depositAddress = await fetchParsedAddress(context, domain, depositCryptoCurrency);
exchangeViewModel.depositAddress = await fetchParsedAddress(context, domain, ticker);
domain = template.receiveAddress; domain = template.receiveAddress;
ticker = template.receiveCurrency.toLowerCase(); exchangeViewModel.receiveAddress = await fetchParsedAddress(context, domain, receiveCryptoCurrency);
exchangeViewModel.receiveAddress = await fetchParsedAddress(context, domain, ticker);
} }
void _setReactions(BuildContext context, ExchangeViewModel exchangeViewModel) { void _setReactions(BuildContext context, ExchangeViewModel exchangeViewModel) {
@ -519,16 +519,14 @@ class ExchangePage extends BasePage {
_depositAddressFocus.addListener(() async { _depositAddressFocus.addListener(() async {
if (!_depositAddressFocus.hasFocus && depositAddressController.text.isNotEmpty) { if (!_depositAddressFocus.hasFocus && depositAddressController.text.isNotEmpty) {
final domain = depositAddressController.text; final domain = depositAddressController.text;
final ticker = exchangeViewModel.depositCurrency.title.toLowerCase(); exchangeViewModel.depositAddress = await fetchParsedAddress(context, domain, exchangeViewModel.depositCurrency);
exchangeViewModel.depositAddress = await fetchParsedAddress(context, domain, ticker);
} }
}); });
_receiveAddressFocus.addListener(() async { _receiveAddressFocus.addListener(() async {
if (!_receiveAddressFocus.hasFocus && receiveAddressController.text.isNotEmpty) { if (!_receiveAddressFocus.hasFocus && receiveAddressController.text.isNotEmpty) {
final domain = receiveAddressController.text; final domain = receiveAddressController.text;
final ticker = exchangeViewModel.receiveCurrency.title.toLowerCase(); exchangeViewModel.receiveAddress = await fetchParsedAddress(context, domain, exchangeViewModel.receiveCurrency);
exchangeViewModel.receiveAddress = await fetchParsedAddress(context, domain, ticker);
} }
}); });
@ -575,8 +573,8 @@ class ExchangePage extends BasePage {
} }
} }
Future<String> fetchParsedAddress(BuildContext context, String domain, String ticker) async { Future<String> fetchParsedAddress(BuildContext context, String domain, CryptoCurrency currency) async {
final parsedAddress = await getIt.get<AddressResolver>().resolve(context, domain, ticker); final parsedAddress = await getIt.get<AddressResolver>().resolve(context, domain, currency);
final address = await extractAddressFromParsed(context, parsedAddress); final address = await extractAddressFromParsed(context, parsedAddress);
return address; return address;
} }
@ -663,15 +661,13 @@ class ExchangePage extends BasePage {
addressTextFieldValidator: AddressValidator(type: exchangeViewModel.depositCurrency), addressTextFieldValidator: AddressValidator(type: exchangeViewModel.depositCurrency),
onPushPasteButton: (context) async { onPushPasteButton: (context) async {
final domain = exchangeViewModel.depositAddress; final domain = exchangeViewModel.depositAddress;
final ticker = exchangeViewModel.depositCurrency.title.toLowerCase();
exchangeViewModel.depositAddress = exchangeViewModel.depositAddress =
await fetchParsedAddress(context, domain, ticker); await fetchParsedAddress(context, domain, exchangeViewModel.depositCurrency);
}, },
onPushAddressBookButton: (context) async { onPushAddressBookButton: (context) async {
final domain = exchangeViewModel.depositAddress; final domain = exchangeViewModel.depositAddress;
final ticker = exchangeViewModel.depositCurrency.title.toLowerCase();
exchangeViewModel.depositAddress = exchangeViewModel.depositAddress =
await fetchParsedAddress(context, domain, ticker); await fetchParsedAddress(context, domain, exchangeViewModel.depositCurrency);
}, },
)); ));
@ -712,15 +708,13 @@ class ExchangePage extends BasePage {
addressTextFieldValidator: AddressValidator(type: exchangeViewModel.receiveCurrency), addressTextFieldValidator: AddressValidator(type: exchangeViewModel.receiveCurrency),
onPushPasteButton: (context) async { onPushPasteButton: (context) async {
final domain = exchangeViewModel.receiveAddress; final domain = exchangeViewModel.receiveAddress;
final ticker = exchangeViewModel.receiveCurrency.title.toLowerCase();
exchangeViewModel.receiveAddress = exchangeViewModel.receiveAddress =
await fetchParsedAddress(context, domain, ticker); await fetchParsedAddress(context, domain, exchangeViewModel.receiveCurrency);
}, },
onPushAddressBookButton: (context) async { onPushAddressBookButton: (context) async {
final domain = exchangeViewModel.receiveAddress; final domain = exchangeViewModel.receiveAddress;
final ticker = exchangeViewModel.receiveCurrency.title.toLowerCase();
exchangeViewModel.receiveAddress = exchangeViewModel.receiveAddress =
await fetchParsedAddress(context, domain, ticker); await fetchParsedAddress(context, domain, exchangeViewModel.receiveCurrency);
}, },
)); ));

View file

@ -56,6 +56,11 @@ Future<String> extractAddressFromParsed(
profileImageUrl = parsedAddress.profileImageUrl; profileImageUrl = parsedAddress.profileImageUrl;
profileName = parsedAddress.profileName; profileName = parsedAddress.profileName;
break; break;
case ParseFrom.thorChain:
title = S.of(context).address_detected;
content = S.of(context).extracted_address_content('${parsedAddress.name} (ThorChain)');
address = parsedAddress.addresses.first;
break;
case ParseFrom.yatRecord: case ParseFrom.yatRecord:
if (parsedAddress.name.isEmpty) { if (parsedAddress.name.isEmpty) {
title = S.of(context).yat_error; title = S.of(context).yat_error;

View file

@ -12,7 +12,6 @@ final _settingsNavigatorKey = GlobalKey<NavigatorState>();
class DesktopSettingsPage extends StatefulWidget { class DesktopSettingsPage extends StatefulWidget {
const DesktopSettingsPage({super.key}); const DesktopSettingsPage({super.key});
@override @override
State<DesktopSettingsPage> createState() => _DesktopSettingsPageState(); State<DesktopSettingsPage> createState() => _DesktopSettingsPageState();
} }
@ -33,22 +32,21 @@ class _DesktopSettingsPageState extends State<DesktopSettingsPage> {
return Scaffold( return Scaffold(
body: Container( body: Container(
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
child: Row(
children: [
Expanded(
flex: 1,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(24), padding: const EdgeInsets.fromLTRB(24, 24, 24, 4),
child: Text( child: Text(
S.current.settings, S.current.settings,
style: textXLarge(), style: textXLarge(),
), ),
), ),
Expanded( Expanded(
child: Row(
children: [
Expanded(
flex: 1,
child: ListView.separated( child: ListView.separated(
padding: EdgeInsets.only(top: 0), padding: EdgeInsets.only(top: 0),
itemBuilder: (_, index) { itemBuilder: (_, index) {
@ -78,6 +76,9 @@ class _DesktopSettingsPageState extends State<DesktopSettingsPage> {
itemCount: itemCount, itemCount: itemCount,
), ),
), ),
],
),
),
Flexible( Flexible(
flex: 2, flex: 2,
child: ConstrainedBox( child: ConstrainedBox(
@ -99,9 +100,6 @@ class _DesktopSettingsPageState extends State<DesktopSettingsPage> {
], ],
), ),
), ),
],
),
),
); );
} }
} }

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:cake_wallet/core/auth_service.dart'; import 'package:cake_wallet/core/auth_service.dart';
import 'package:cake_wallet/entities/pin_code_required_duration.dart'; import 'package:cake_wallet/entities/pin_code_required_duration.dart';
import 'package:cake_wallet/routes.dart'; import 'package:cake_wallet/routes.dart';
@ -58,7 +60,7 @@ class SecurityBackupPage extends BasePage {
.shouldRequireTOTP2FAForAllSecurityAndBackupSettings, .shouldRequireTOTP2FAForAllSecurityAndBackupSettings,
), ),
), ),
if (DeviceInfo.instance.isMobile) if (DeviceInfo.instance.isMobile || Platform.isMacOS || Platform.isLinux)
Observer(builder: (_) { Observer(builder: (_) {
return SettingsSwitcherCell( return SettingsSwitcherCell(
title: S.current.settings_allow_biometrical_authentication, title: S.current.settings_allow_biometrical_authentication,

View file

@ -146,7 +146,7 @@ class ConnectScreen extends StatelessWidget {
ElevatedButton( ElevatedButton(
onPressed: connect, onPressed: connect,
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
primary: Colors.blue, // primary: Colors.blue,
padding: EdgeInsets.symmetric(horizontal: 40, vertical: 15), padding: EdgeInsets.symmetric(horizontal: 40, vertical: 15),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
@ -211,7 +211,7 @@ class DisconnectScreen extends StatelessWidget {
ElevatedButton( ElevatedButton(
onPressed: disconnect, onPressed: disconnect,
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
primary: Colors.red, // primary: Colors.red,
padding: EdgeInsets.symmetric(horizontal: 40, vertical: 15), padding: EdgeInsets.symmetric(horizontal: 40, vertical: 15),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),

View file

@ -1,5 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:cake_wallet/core/secure_storage.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
@ -58,7 +59,6 @@ class ChatwootWidgetState extends State<ChatwootWidget> {
} }
Future<void> storeCookie(String value) async { Future<void> storeCookie(String value) async {
await widget.secureStorage.delete(key: COOKIE_KEY); await writeSecureStorage(widget.secureStorage, key: COOKIE_KEY, value: value);
await widget.secureStorage.write(key: COOKIE_KEY, value: value);
} }
} }

View file

@ -175,7 +175,7 @@ class WalletListBodyState extends State<WalletListBody> {
maxLines: null, maxLines: null,
softWrap: true, softWrap: true,
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: DeviceInfo.instance.isDesktop ? 18 : 20,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context) color: Theme.of(context)
.extension<CakeTextTheme>()! .extension<CakeTextTheme>()!

View file

@ -1,8 +1,14 @@
import 'package:cake_wallet/core/seed_validator.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class Annotation extends Comparable<Annotation> {
extension Compare<T> on Comparable<T> {
bool operator <=(T other) => compareTo(other) <= 0;
bool operator >=(T other) => compareTo(other) >= 0;
bool operator <(T other) => compareTo(other) < 0;
bool operator >(T other) => compareTo(other) > 0;
}
class Annotation implements Comparable<Annotation> {
Annotation({required this.range, required this.style}); Annotation({required this.range, required this.style});
final TextRange range; final TextRange range;
@ -12,7 +18,7 @@ class Annotation extends Comparable<Annotation> {
int compareTo(Annotation other) => range.start.compareTo(other.range.start); int compareTo(Annotation other) => range.start.compareTo(other.range.start);
} }
class TextAnnotation extends Comparable<TextAnnotation> { class TextAnnotation implements Comparable<TextAnnotation> {
TextAnnotation({required this.text, required this.style}); TextAnnotation({required this.text, required this.style});
final TextStyle style; final TextStyle style;

View file

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:cake_wallet/bitcoin/bitcoin.dart'; import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart'; import 'package:cake_wallet/bitcoin_cash/bitcoin_cash.dart';
import 'package:cake_wallet/core/secure_storage.dart';
import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart'; import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart';
import 'package:cake_wallet/entities/provider_types.dart'; import 'package:cake_wallet/entities/provider_types.dart';
import 'package:cake_wallet/entities/cake_2fa_preset_options.dart'; import 'package:cake_wallet/entities/cake_2fa_preset_options.dart';
@ -434,79 +435,83 @@ abstract class SettingsStoreBase with Store {
// secure storage keys: // secure storage keys:
reaction( reaction(
(_) => allowBiometricalAuthentication, (_) => allowBiometricalAuthentication,
(bool biometricalAuthentication) => secureStorage.write( (bool biometricalAuthentication) => writeSecureStorage(secureStorage,
key: SecureKey.allowBiometricalAuthenticationKey, key: SecureKey.allowBiometricalAuthenticationKey,
value: biometricalAuthentication.toString())); value: biometricalAuthentication.toString()));
reaction( reaction(
(_) => selectedCake2FAPreset, (_) => selectedCake2FAPreset,
(Cake2FAPresetsOptions selectedCake2FAPreset) => secureStorage.write( (Cake2FAPresetsOptions selectedCake2FAPreset) => writeSecureStorage(secureStorage,
key: SecureKey.selectedCake2FAPreset, key: SecureKey.selectedCake2FAPreset,
value: selectedCake2FAPreset.serialize().toString())); value: selectedCake2FAPreset.serialize().toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForAccessingWallet, (_) => shouldRequireTOTP2FAForAccessingWallet,
(bool requireTOTP2FAForAccessingWallet) => secureStorage.write( (bool requireTOTP2FAForAccessingWallet) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForAccessingWallet, key: SecureKey.shouldRequireTOTP2FAForAccessingWallet,
value: requireTOTP2FAForAccessingWallet.toString())); value: requireTOTP2FAForAccessingWallet.toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForSendsToContact, (_) => shouldRequireTOTP2FAForSendsToContact,
(bool requireTOTP2FAForSendsToContact) => secureStorage.write( (bool requireTOTP2FAForSendsToContact) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForSendsToContact, key: SecureKey.shouldRequireTOTP2FAForSendsToContact,
value: requireTOTP2FAForSendsToContact.toString())); value: requireTOTP2FAForSendsToContact.toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForSendsToNonContact, (_) => shouldRequireTOTP2FAForSendsToNonContact,
(bool requireTOTP2FAForSendsToNonContact) => secureStorage.write( (bool requireTOTP2FAForSendsToNonContact) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForSendsToNonContact, key: SecureKey.shouldRequireTOTP2FAForSendsToNonContact,
value: requireTOTP2FAForSendsToNonContact.toString())); value: requireTOTP2FAForSendsToNonContact.toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForSendsToInternalWallets, (_) => shouldRequireTOTP2FAForSendsToInternalWallets,
(bool requireTOTP2FAForSendsToInternalWallets) => secureStorage.write( (bool requireTOTP2FAForSendsToInternalWallets) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForSendsToInternalWallets, key: SecureKey.shouldRequireTOTP2FAForSendsToInternalWallets,
value: requireTOTP2FAForSendsToInternalWallets.toString())); value: requireTOTP2FAForSendsToInternalWallets.toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForExchangesToInternalWallets, (_) => shouldRequireTOTP2FAForExchangesToInternalWallets,
(bool requireTOTP2FAForExchangesToInternalWallets) => secureStorage.write( (bool requireTOTP2FAForExchangesToInternalWallets) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForExchangesToInternalWallets, key: SecureKey.shouldRequireTOTP2FAForExchangesToInternalWallets,
value: requireTOTP2FAForExchangesToInternalWallets.toString())); value: requireTOTP2FAForExchangesToInternalWallets.toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForExchangesToExternalWallets, (_) => shouldRequireTOTP2FAForExchangesToExternalWallets,
(bool requireTOTP2FAForExchangesToExternalWallets) => secureStorage.write( (bool requireTOTP2FAForExchangesToExternalWallets) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForExchangesToExternalWallets, key: SecureKey.shouldRequireTOTP2FAForExchangesToExternalWallets,
value: requireTOTP2FAForExchangesToExternalWallets.toString())); value: requireTOTP2FAForExchangesToExternalWallets.toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForAddingContacts, (_) => shouldRequireTOTP2FAForAddingContacts,
(bool requireTOTP2FAForAddingContacts) => secureStorage.write( (bool requireTOTP2FAForAddingContacts) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForAddingContacts, key: SecureKey.shouldRequireTOTP2FAForAddingContacts,
value: requireTOTP2FAForAddingContacts.toString())); value: requireTOTP2FAForAddingContacts.toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForCreatingNewWallets, (_) => shouldRequireTOTP2FAForCreatingNewWallets,
(bool requireTOTP2FAForCreatingNewWallets) => secureStorage.write( (bool requireTOTP2FAForCreatingNewWallets) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForCreatingNewWallets, key: SecureKey.shouldRequireTOTP2FAForCreatingNewWallets,
value: requireTOTP2FAForCreatingNewWallets.toString())); value: requireTOTP2FAForCreatingNewWallets.toString()));
reaction( reaction(
(_) => shouldRequireTOTP2FAForAllSecurityAndBackupSettings, (_) => shouldRequireTOTP2FAForAllSecurityAndBackupSettings,
(bool requireTOTP2FAForAllSecurityAndBackupSettings) => secureStorage.write( (bool requireTOTP2FAForAllSecurityAndBackupSettings) => writeSecureStorage(secureStorage,
key: SecureKey.shouldRequireTOTP2FAForAllSecurityAndBackupSettings, key: SecureKey.shouldRequireTOTP2FAForAllSecurityAndBackupSettings,
value: requireTOTP2FAForAllSecurityAndBackupSettings.toString())); value: requireTOTP2FAForAllSecurityAndBackupSettings.toString()));
reaction((_) => useTOTP2FA, reaction(
(bool use) => secureStorage.write(key: SecureKey.useTOTP2FA, value: use.toString())); (_) => useTOTP2FA,
(bool use) =>
writeSecureStorage(secureStorage, key: SecureKey.useTOTP2FA, value: use.toString()));
reaction((_) => totpSecretKey, reaction(
(String totpKey) => secureStorage.write(key: SecureKey.totpSecretKey, value: totpKey)); (_) => totpSecretKey,
(String totpKey) =>
writeSecureStorage(secureStorage, key: SecureKey.totpSecretKey, value: totpKey));
reaction( reaction(
(_) => pinTimeOutDuration, (_) => pinTimeOutDuration,
(PinCodeRequiredDuration pinCodeInterval) => secureStorage.write( (PinCodeRequiredDuration pinCodeInterval) => writeSecureStorage(secureStorage,
key: SecureKey.pinTimeOutDuration, value: pinCodeInterval.value.toString())); key: SecureKey.pinTimeOutDuration, value: pinCodeInterval.value.toString()));
reaction( reaction(

View file

@ -106,14 +106,10 @@ abstract class AuthViewModelBase with Store {
@action @action
Future<void> biometricAuth() async { Future<void> biometricAuth() async {
try { try {
final canBiometricAuth = await _biometricAuth.canCheckBiometrics(); if (await _biometricAuth.canCheckBiometrics() && await _biometricAuth.isAuthenticated()) {
if (canBiometricAuth) {
final isAuthenticated = await _biometricAuth.isAuthenticated();
if (isAuthenticated) {
state = ExecutedSuccessfullyState(); state = ExecutedSuccessfullyState();
} } else {
throw Exception('Biometric authentication failed');
} }
} catch (e) { } catch (e) {
state = FailureState(e.toString()); state = FailureState(e.toString());

View file

@ -1,3 +1,4 @@
import 'package:cake_wallet/core/secure_storage.dart';
import 'package:mobx/mobx.dart'; import 'package:mobx/mobx.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:cake_wallet/entities/secret_store_key.dart'; import 'package:cake_wallet/entities/secret_store_key.dart';
@ -37,8 +38,7 @@ abstract class EditBackupPasswordViewModelBase with Store {
@action @action
Future<void> save() async { Future<void> save() async {
final key = generateStoreKeyFor(key: SecretStoreKey.backupPassword); final key = generateStoreKeyFor(key: SecretStoreKey.backupPassword);
await secureStorage.delete(key: key); await writeSecureStorage(secureStorage, key: key, value: backupPassword);
await secureStorage.write(key: key, value: backupPassword);
secretStore.write(key: key, value: backupPassword); secretStore.write(key: key, value: backupPassword);
} }
} }

View file

@ -296,8 +296,8 @@ abstract class OutputBase with Store {
Future<void> fetchParsedAddress(BuildContext context) async { Future<void> fetchParsedAddress(BuildContext context) async {
final domain = address; final domain = address;
final ticker = cryptoCurrencyHandler().title.toLowerCase(); final currency = cryptoCurrencyHandler();
parsedAddress = await getIt.get<AddressResolver>().resolve(context, domain, ticker); parsedAddress = await getIt.get<AddressResolver>().resolve(context, domain, currency);
extractedAddress = await extractAddressFromParsed(context, parsedAddress); extractedAddress = await extractAddressFromParsed(context, parsedAddress);
note = parsedAddress.description; note = parsedAddress.description;
} }

View file

@ -363,7 +363,8 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
} catch (e) { } catch (e) {
if (e is LedgerException) { if (e is LedgerException) {
final errorCode = e.errorCode.toRadixString(16); final errorCode = e.errorCode.toRadixString(16);
final fallbackMsg = e.message.isNotEmpty ? e.message : "Unexpected Ledger Error Code: $errorCode"; final fallbackMsg =
e.message.isNotEmpty ? e.message : "Unexpected Ledger Error Code: $errorCode";
final errorMsg = ledgerViewModel.interpretErrorCode(errorCode) ?? fallbackMsg; final errorMsg = ledgerViewModel.interpretErrorCode(errorCode) ?? fallbackMsg;
state = FailureState(errorMsg); state = FailureState(errorMsg);
@ -444,7 +445,10 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
Object _credentials() { Object _credentials() {
final priority = _settingsStore.priority[wallet.type]; final priority = _settingsStore.priority[wallet.type];
if (priority == null && wallet.type != WalletType.nano && wallet.type != WalletType.banano && wallet.type != WalletType.solana && if (priority == null &&
wallet.type != WalletType.nano &&
wallet.type != WalletType.banano &&
wallet.type != WalletType.solana &&
wallet.type != WalletType.tron) { wallet.type != WalletType.tron) {
throw Exception('Priority is null for wallet type: ${wallet.type}'); throw Exception('Priority is null for wallet type: ${wallet.type}');
} }
@ -570,6 +574,16 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
return errorMessage; return errorMessage;
} }
if (walletType == WalletType.tron) {
if (errorMessage.contains('balance is not sufficient')) {
return S.current.do_not_have_enough_gas_asset(currency.toString());
}
if (errorMessage.contains('Transaction expired')) {
return 'An error occurred while processing the transaction. Kindly retry the transaction';
}
}
if (walletType == WalletType.bitcoin || if (walletType == WalletType.bitcoin ||
walletType == WalletType.litecoin || walletType == WalletType.litecoin ||
walletType == WalletType.bitcoinCash) { walletType == WalletType.bitcoinCash) {

View file

@ -10,6 +10,7 @@ import cw_monero
import device_info_plus import device_info_plus
import devicelocale import devicelocale
import flutter_inappwebview_macos import flutter_inappwebview_macos
import flutter_local_authentication
import flutter_secure_storage_macos import flutter_secure_storage_macos
import in_app_review import in_app_review
import package_info import package_info
@ -26,6 +27,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin")) DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin")) InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
FlutterLocalAuthenticationPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalAuthenticationPlugin"))
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin")) InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin"))
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))

View file

@ -26,6 +26,8 @@ PODS:
- flutter_inappwebview_macos (0.0.1): - flutter_inappwebview_macos (0.0.1):
- FlutterMacOS - FlutterMacOS
- OrderedSet (~> 5.0) - OrderedSet (~> 5.0)
- flutter_local_authentication (1.2.0):
- FlutterMacOS
- flutter_secure_storage_macos (6.1.1): - flutter_secure_storage_macos (6.1.1):
- FlutterMacOS - FlutterMacOS
- FlutterMacOS (1.0.0) - FlutterMacOS (1.0.0)
@ -56,6 +58,7 @@ DEPENDENCIES:
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`) - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
- devicelocale (from `Flutter/ephemeral/.symlinks/plugins/devicelocale/macos`) - devicelocale (from `Flutter/ephemeral/.symlinks/plugins/devicelocale/macos`)
- flutter_inappwebview_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos`) - flutter_inappwebview_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos`)
- flutter_local_authentication (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_authentication/macos`)
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
- FlutterMacOS (from `Flutter/ephemeral`) - FlutterMacOS (from `Flutter/ephemeral`)
- in_app_review (from `Flutter/ephemeral/.symlinks/plugins/in_app_review/macos`) - in_app_review (from `Flutter/ephemeral/.symlinks/plugins/in_app_review/macos`)
@ -83,6 +86,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/devicelocale/macos :path: Flutter/ephemeral/.symlinks/plugins/devicelocale/macos
flutter_inappwebview_macos: flutter_inappwebview_macos:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos :path: Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos
flutter_local_authentication:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_local_authentication/macos
flutter_secure_storage_macos: flutter_secure_storage_macos:
:path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos
FlutterMacOS: FlutterMacOS:
@ -110,6 +115,7 @@ SPEC CHECKSUMS:
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225 devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225
flutter_inappwebview_macos: 9600c9df9fdb346aaa8933812009f8d94304203d flutter_inappwebview_macos: 9600c9df9fdb346aaa8933812009f8d94304203d
flutter_local_authentication: 85674893931e1c9cfa7c9e4f5973cb8c56b018b0
flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea flutter_secure_storage_macos: d56e2d218c1130b262bef8b4a7d64f88d7f9c9ea
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0 in_app_review: a850789fad746e89bce03d4aeee8078b45a53fd0

View file

@ -24,7 +24,21 @@ class AppDelegate: FlutterAppDelegate {
} }
result(secRandom(count: count)) result(secRandom(count: count))
case "setMinWindowSize":
guard let self = self else {
result(false)
return
}
if let arguments = call.arguments as? [String: Any],
let width = arguments["width"] as? Double,
let height = arguments["height"] as? Double {
DispatchQueue.main.async {
self.mainFlutterWindow?.minSize = CGSize(width: width, height: height)
}
result(true)
} else {
result(false)
}
default: default:
result(FlutterMethodNotImplemented) result(FlutterMethodNotImplemented)
} }

View file

@ -26,15 +26,17 @@ dependencies:
path_provider: ^2.0.11 path_provider: ^2.0.11
mobx: ^2.1.4 mobx: ^2.1.4
flutter_mobx: ^2.0.6+5 flutter_mobx: ^2.0.6+5
flutter_slidable: ^2.0.0 flutter_slidable: ^3.0.1
share_plus: ^4.0.10 share_plus: ^4.0.10
# date_range_picker: ^1.0.6 # date_range_picker: ^1.0.6
#https://api.flutter.dev/flutter/material/showDateRangePicker.html #https://api.flutter.dev/flutter/material/showDateRangePicker.html
dio: ^4.0.6 dio: ^4.0.6
hive: ^2.2.3 hive: ^2.2.3
hive_flutter: ^1.1.0 hive_flutter: ^1.1.0
local_auth: ^2.1.0
local_auth_android: 1.0.21 local_auth_android: 1.0.21
flutter_local_authentication:
git:
url: https://github.com/cake-tech/flutter_local_authentication
package_info: ^2.0.0 package_info: ^2.0.0
#package_info_plus: ^1.4.2 #package_info_plus: ^1.4.2
devicelocale: devicelocale:

View file

@ -4,4 +4,4 @@ version: 0.0.0
publish_to: none publish_to: none
environment: environment:
sdk: ">=2.17.5 <3.0.0" sdk: ">=3.1.0 <4.0.0"

View file

@ -15,15 +15,15 @@ set -l TYPES $MONERO_COM $CAKEWALLET $HAVEN
set APP_ANDROID_TYPE $argv[1] set APP_ANDROID_TYPE $argv[1]
set MONERO_COM_NAME "Monero.com" set MONERO_COM_NAME "Monero.com"
set MONERO_COM_VERSION "1.10.0" set MONERO_COM_VERSION "1.12.3"
set MONERO_COM_BUILD_NUMBER 72 set MONERO_COM_BUILD_NUMBER 84
set MONERO_COM_BUNDLE_ID "com.monero.app" set MONERO_COM_BUNDLE_ID "com.monero.app"
set MONERO_COM_PACKAGE "com.monero.app" set MONERO_COM_PACKAGE "com.monero.app"
set MONERO_COM_SCHEME "monero.com" set MONERO_COM_SCHEME "monero.com"
set CAKEWALLET_NAME "Cake Wallet" set CAKEWALLET_NAME "Cake Wallet"
set CAKEWALLET_VERSION "4.13.0" set CAKEWALLET_VERSION "4.15.6"
set CAKEWALLET_BUILD_NUMBER 189 set CAKEWALLET_BUILD_NUMBER 207
set CAKEWALLET_BUNDLE_ID "com.cakewallet.cake_wallet" set CAKEWALLET_BUNDLE_ID "com.cakewallet.cake_wallet"
set CAKEWALLET_PACKAGE "com.cakewallet.cake_wallet" set CAKEWALLET_PACKAGE "com.cakewallet.cake_wallet"
set CAKEWALLET_SCHEME "cakewallet" set CAKEWALLET_SCHEME "cakewallet"