Skip to content

Commit

Permalink
fix: only init payjoin when payment network is bitcoin
Browse files Browse the repository at this point in the history
  • Loading branch information
kumulynja committed Dec 23, 2024
1 parent 50dd373 commit 168c97f
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 @@ -53,6 +53,7 @@ class ReceiveCubit extends Cubit<ReceiveState> {

if (state.paymentNetwork == PaymentNetwork.lightning) {
emit(state.copyWith(defaultAddress: null));
return;
}

if (!walletBloc.state.wallet!.mainWallet) {
Expand All @@ -63,7 +64,9 @@ class ReceiveCubit extends Cubit<ReceiveState> {
// if (watchOnly)
// emit(state.copyWith(paymentNetwork: ReceivePaymentNetwork.bitcoin));
await loadAddress();
if (state.defaultAddress != null) {

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

0 comments on commit 168c97f

Please sign in to comment.