Fix unchecked wallet type call

This commit is contained in:
OmarHatem 2024-05-19 02:01:57 +03:00
parent 015bb1ff04
commit 57e73142b7
2 changed files with 5 additions and 4 deletions

View file

@ -226,9 +226,9 @@ class ReceivePage extends BasePage {
Padding( Padding(
padding: EdgeInsets.fromLTRB(24, 24, 24, 32), padding: EdgeInsets.fromLTRB(24, 24, 24, 32),
child: Text( child: Text(
!addressListViewModel.isSilentPayments addressListViewModel.isSilentPayments
? S.of(context).electrum_address_disclaimer ? S.of(context).silent_payments_disclaimer
: S.of(context).silent_payments_disclaimer, : S.of(context).electrum_address_disclaimer,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,

View file

@ -452,7 +452,8 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
wallet.type == WalletType.bitcoinCash; wallet.type == WalletType.bitcoinCash;
@computed @computed
bool get isSilentPayments => bitcoin!.hasSelectedSilentPayments(wallet); bool get isSilentPayments =>
wallet.type == WalletType.bitcoin && bitcoin!.hasSelectedSilentPayments(wallet);
@computed @computed
bool get isAutoGenerateSubaddressEnabled => wallet.type == WalletType.bitcoin bool get isAutoGenerateSubaddressEnabled => wallet.type == WalletType.bitcoin