mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
c78662fbfe
* replace all print statements with printV * restore backup error message * missing print statements, error fixes * Update cw_core/lib/utils/print_verbose.dart [skip ci] * Update cw_core/lib/utils/print_verbose.dart [skip ci] * CW-846: Correctly display balance (#1848) * Correctly display balance even with frozen coins * remove package= from AndroidMainfest.xml * update namespace * print -> printV --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
37 lines
903 B
Dart
37 lines
903 B
Dart
import 'package:cw_core/utils/print_verbose.dart';
|
|
import 'package:cw_core/wallet_addresses.dart';
|
|
import 'package:cw_core/wallet_info.dart';
|
|
import 'package:mobx/mobx.dart';
|
|
|
|
part 'solana_wallet_addresses.g.dart';
|
|
|
|
class SolanaWalletAddresses = SolanaWalletAddressesBase with _$SolanaWalletAddresses;
|
|
|
|
abstract class SolanaWalletAddressesBase extends WalletAddresses with Store {
|
|
SolanaWalletAddressesBase(WalletInfo walletInfo)
|
|
: address = '',
|
|
super(walletInfo);
|
|
|
|
@override
|
|
String address;
|
|
|
|
@override
|
|
String get primaryAddress => 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) {
|
|
printV(e.toString());
|
|
}
|
|
}
|
|
}
|