Skip to content

Commit

Permalink
Merge pull request #381 from SatoshiPortal/optional-wallet-type-check…
Browse files Browse the repository at this point in the history
…-for-payjoin-receiver

refactor: check of BaseWalletType
  • Loading branch information
ethicnology authored Dec 23, 2024
2 parents 9488113 + 2707fcd commit 7e73481
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/receive/bloc/receive_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ class ReceiveCubit extends Cubit<ReceiveState> {
await isPayjoinEnabled();
await loadAddress();

final baseType = state.walletBloc!.state.wallet!.baseWalletType;

if (state.paymentNetwork == PaymentNetwork.bitcoin &&
state.defaultAddress != null &&
state.isPayjoin) {
state.isPayjoin &&
baseType == BaseWalletType.Bitcoin) {
receivePayjoin(
state.walletBloc!.state.wallet!.isTestnet(),
state.defaultAddress!.address,
Expand Down

0 comments on commit 7e73481

Please sign in to comment.