stack_wallet/lib/wallets/wallet/impl/banano_wallet.dart
2023-11-15 15:59:01 -06:00

27 lines
1,009 B
Dart

import 'package:stackwallet/wallets/crypto_currency/coins/banano.dart';
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
import 'package:stackwallet/wallets/crypto_currency/intermediate/nano_currency.dart';
import 'package:stackwallet/wallets/isar/models/wallet_info.dart';
import 'package:stackwallet/wallets/wallet/intermediate/bip39_wallet.dart';
import 'package:stackwallet/wallets/wallet/mixins/nano_based.dart';
class BananoWallet extends Bip39Wallet<NanoCurrency> with NanoBased {
BananoWallet(CryptoCurrencyNetwork network) : super(Banano(network));
Future<void> updateMonkeyImageBytes(List<int> bytes) async {
await info.updateOtherData(
newEntries: {
WalletInfoKeys.bananoMonkeyImageBytes: bytes,
},
isar: mainDB.isar,
);
}
List<int>? getMonkeyImageBytes() {
final list = info.otherData[WalletInfoKeys.bananoMonkeyImageBytes] as List?;
if (list == null) {
return null;
}
return List<int>.from(list);
}
}