mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into CW-565-sign-messages
This commit is contained in:
commit
66194ac2ba
5 changed files with 9 additions and 69 deletions
|
@ -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;
|
||||
|
|
28
lib/di.dart
28
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';
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1175,8 +1175,8 @@ Future<void> 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<String?> readNoIOptions({required String key}) async => await _readInternal(key, true);
|
||||
|
||||
|
||||
Future<String?> _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 = """
|
||||
|
|
Loading…
Reference in a new issue