cake_wallet/cw_evm/lib/evm_chain_wallet_addresses.dart
Omar Hatem cbc0c3afd6
Generic fixes (#1304)
* fix mobx no element error

* fix mobx issue

* Remove unused code

* Enhance error handling for monero sync failure case

* Separate litecoin mnemonic exception from bitcoin

* - Enable onramper for polygon
- Add Kaspa validation

* Set null as the default length of address validation

* Modify EVM fee text [skip ci]

* Add seed length option to polygon

* Add digibyte

* Update configure_cake_wallet.sh and fix conflicts

* Pin bottom section

* Fix Solana missing isTestnet param
2024-02-23 19:09:24 +02:00

36 lines
849 B
Dart

import 'dart:developer';
import 'package:cw_core/wallet_addresses.dart';
import 'package:cw_core/wallet_info.dart';
import 'package:mobx/mobx.dart';
part 'evm_chain_wallet_addresses.g.dart';
class EVMChainWalletAddresses = EVMChainWalletAddressesBase with _$EVMChainWalletAddresses;
abstract class EVMChainWalletAddressesBase extends WalletAddresses with Store {
EVMChainWalletAddressesBase(WalletInfo walletInfo)
: address = '',
super(walletInfo);
@override
@observable
String address;
@override
Future<void> init() async {
address = walletInfo.address;
await updateAddressesInBox();
}
@override
Future<void> updateAddressesInBox() async {
try {
addressesMap.clear();
addressesMap[address] = '';
await saveAddressesInBox();
} catch (e) {
log(e.toString());
}
}
}