fix bch unspent coins

This commit is contained in:
Serhii 2023-08-28 13:49:30 +03:00
parent 5fad3aa6c6
commit 313a01e64f
3 changed files with 8 additions and 2 deletions

View file

@ -48,6 +48,7 @@ class WalletListBodyState extends State<WalletListBody> {
final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24); final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24);
final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24); final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24);
final ethereumIcon = Image.asset('assets/images/eth_icon.png', height: 24, width: 24); final ethereumIcon = Image.asset('assets/images/eth_icon.png', height: 24, width: 24);
final bitcoinCashIcon = Image.asset('assets/images/bch_icon.png', height: 24, width: 24);
final scrollController = ScrollController(); final scrollController = ScrollController();
final double tileHeight = 60; final double tileHeight = 60;
Flushbar<void>? _progressBar; Flushbar<void>? _progressBar;
@ -242,6 +243,8 @@ class WalletListBodyState extends State<WalletListBody> {
return havenIcon; return havenIcon;
case WalletType.ethereum: case WalletType.ethereum:
return ethereumIcon; return ethereumIcon;
case WalletType.bitcoinCash:
return bitcoinCashIcon;
default: default:
return nonWalletTypeIcon; return nonWalletTypeIcon;
} }

View file

@ -174,7 +174,10 @@ abstract class SendViewModelBase with Store {
@computed @computed
bool get hasCoinControl => bool get hasCoinControl =>
_wallet.type == WalletType.bitcoin || _wallet.type == WalletType.litecoin || _wallet.type == WalletType.monero; _wallet.type == WalletType.bitcoin ||
_wallet.type == WalletType.litecoin ||
_wallet.type == WalletType.monero ||
_wallet.type == WalletType.bitcoinCash;
@computed @computed
bool get isElectrumWallet => bool get isElectrumWallet =>

View file

@ -108,7 +108,7 @@ abstract class UnspentCoinsListViewModelBase with Store {
List<Unspent> _getUnspents() { List<Unspent> _getUnspents() {
if (wallet.type == WalletType.monero) if (wallet.type == WalletType.monero)
return monero!.getUnspents(wallet); return monero!.getUnspents(wallet);
if ([WalletType.bitcoin, WalletType.litecoin].contains(wallet.type)) if ([WalletType.bitcoin, WalletType.litecoin, WalletType.bitcoinCash].contains(wallet.type))
return bitcoin!.getUnspents(wallet); return bitcoin!.getUnspents(wallet);
return List.empty(); return List.empty();
} }