diff --git a/cw_tron/lib/tron_client.dart b/cw_tron/lib/tron_client.dart index 73812f14c..25edb0f9a 100644 --- a/cw_tron/lib/tron_client.dart +++ b/cw_tron/lib/tron_client.dart @@ -130,11 +130,6 @@ class TronClient { final energyInSun = chainParams.getEnergyFee!; log('Energy In Sun: $energyInSun'); - log( - 'Create Account Fee In System Contract for Chain: ${chainParams.getCreateNewAccountFeeInSystemContract!}', - ); - log('Create Account Fee for Chain: ${chainParams.getCreateAccountFee}'); - final fakeTransaction = Transaction( rawData: rawTransaction, signature: [Uint8List(65)], @@ -185,17 +180,6 @@ class TronClient { totalBurn += chainParams.getMemoFee!; } - // Check if receiver's account is active - final receiverAccountInfo = - await _provider!.request(TronRequestGetAccount(address: receiverAddress)); - - /// Calculate the resources required to create a new account. - if (receiverAccountInfo == null) { - totalBurn += chainParams.getCreateNewAccountFeeInSystemContract!; - - totalBurn += (chainParams.getCreateAccountFee! * bandWidthInSun); - } - log('Final total burn: $totalBurn'); return totalBurn; diff --git a/lib/di.dart b/lib/di.dart index 63fe60091..e27a4f26d 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -127,7 +127,6 @@ import 'package:cake_wallet/src/screens/support/support_page.dart'; import 'package:cake_wallet/src/screens/support_chat/support_chat_page.dart'; import 'package:cake_wallet/src/screens/support_other_links/support_other_links_page.dart'; import 'package:cake_wallet/src/screens/trade_details/trade_details_page.dart'; -import 'package:cake_wallet/src/screens/transaction_details/rbf_details_page.dart'; import 'package:cake_wallet/src/screens/transaction_details/transaction_details_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_details_page.dart'; import 'package:cake_wallet/src/screens/unspent_coins/unspent_coins_list_page.dart'; @@ -226,7 +225,6 @@ import 'package:cake_wallet/view_model/wallet_seed_view_model.dart'; import 'package:cw_core/crypto_currency.dart'; import 'package:cw_core/nano_account.dart'; import 'package:cw_core/node.dart'; -import 'package:cw_core/receive_page_option.dart'; import 'package:cw_core/transaction_info.dart'; import 'package:cw_core/unspent_coins_info.dart'; import 'package:cw_core/wallet_info.dart'; @@ -234,37 +232,11 @@ import 'package:cw_core/wallet_service.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; -import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:get_it/get_it.dart'; import 'package:hive/hive.dart'; import 'package:mobx/mobx.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:cake_wallet/core/secure_storage.dart'; -import 'package:cake_wallet/core/wallet_creation_service.dart'; -import 'package:cake_wallet/store/app_store.dart'; -import 'package:cw_core/wallet_type.dart'; -import 'package:cake_wallet/view_model/wallet_new_vm.dart'; -import 'package:cake_wallet/store/authentication_store.dart'; -import 'package:cake_wallet/store/dashboard/trades_store.dart'; -import 'package:cake_wallet/store/dashboard/trade_filter_store.dart'; -import 'package:cake_wallet/store/dashboard/transaction_filter_store.dart'; -import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart'; -import 'package:cake_wallet/store/templates/send_template_store.dart'; -import 'package:cake_wallet/store/templates/exchange_template_store.dart'; -import 'package:cake_wallet/entities/template.dart'; -import 'package:cake_wallet/exchange/exchange_template.dart'; -import 'package:cake_wallet/.secrets.g.dart' as secrets; -import 'package:cake_wallet/src/screens/dashboard/pages/address_page.dart'; -import 'package:cake_wallet/anypay/anypay_api.dart'; -import 'package:cake_wallet/view_model/ionia/ionia_gift_card_details_view_model.dart'; -import 'package:cake_wallet/src/screens/ionia/cards/ionia_payment_status_page.dart'; -import 'package:cake_wallet/view_model/ionia/ionia_payment_status_view_model.dart'; -import 'package:cake_wallet/anypay/any_pay_payment_committed_info.dart'; -import 'package:cake_wallet/ionia/ionia_any_pay_payment_info.dart'; -import 'package:cake_wallet/src/screens/receive/fullscreen_qr_page.dart'; -import 'package:cake_wallet/core/wallet_loading_service.dart'; -import 'package:cw_core/crypto_currency.dart'; -import 'package:cake_wallet/entities/qr_view_data.dart'; import 'buy/dfx/dfx_buy_provider.dart'; import 'core/totp_request_details.dart'; diff --git a/lib/src/screens/dashboard/dashboard_page.dart b/lib/src/screens/dashboard/dashboard_page.dart index 52a4d8f61..8d9dc9829 100644 --- a/lib/src/screens/dashboard/dashboard_page.dart +++ b/lib/src/screens/dashboard/dashboard_page.dart @@ -53,7 +53,7 @@ class DashboardPage extends StatelessWidget { Widget build(BuildContext context) { final screenHeight = MediaQuery.of(context).size.height; return Scaffold( - body: Observer( + body: Builder( builder: (_) { final dashboardPageView = RefreshIndicator( displacement: screenHeight * 0.1, diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 800d429ff..e7bb35088 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -138,6 +138,7 @@ dependency_overrides: git: url: https://github.com/cake-tech/web3dart.git ref: cake + flutter_secure_storage_platform_interface: 1.0.2 flutter_icons: image_path: "assets/images/app_logo.png" diff --git a/tool/configure.dart b/tool/configure.dart index 959809b07..126851997 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -1175,8 +1175,8 @@ Future generatePubspec( git: url: https://github.com/cake-tech/flutter_secure_storage.git path: flutter_secure_storage - ref: cake-9.0.0 - version: 9.0.0 + ref: cake-8.0.0 + version: 8.0.0 """; const cwEthereum = """ cw_ethereum: @@ -1392,29 +1392,12 @@ class DefaultSecureStorage extends SecureStorage { @override Future readNoIOptions({required String key}) async => await _readInternal(key, true); - + Future _readInternal(String key, bool useNoIOptions) async { - String? result; - - const maxWait = Duration(seconds: 3); - const checkInterval = Duration(milliseconds: 200); - - DateTime start = DateTime.now(); - - while (result == null && DateTime.now().difference(start) < maxWait) { - result = await _secureStorage.read( - key: key, - iOptions: useNoIOptions ? IOSOptions() : null, - ); - - if (result != null) { - break; - } - - await Future.delayed(checkInterval); - } - - return result; + return await _secureStorage.read( + key: key, + iOptions: useNoIOptions ? IOSOptions() : null, + ); } }"""; const fakeSecureStorage = """