Skip to content

Commit

Permalink
fix: remove duplicate payjoin code in getAddressWithAmountAndLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
kumulynja committed Dec 23, 2024
1 parent 50dd373 commit 40a605f
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/receive/bloc/state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ class ReceiveState with _$ReceiveState {
if (paymentNetwork == PaymentNetwork.lightning ||
(amount == 0 && description.isEmpty && payjoinReceiver == null)) {
finalAddress = address;
} else if (payjoinReceiver != null) {
// Receiver session is active: build a payjoin URI
var pjUrl = payjoinReceiver!.pjUriBuilder();
if (amount > 0) {
pjUrl = pjUrl.amountSats(amount: BigInt.from(amount * 100000000));
}
if (description.isNotEmpty) {
pjUrl = pjUrl.label(label: description);
}
finalAddress = pjUrl.build().asString();
} else {
if (isLiquid) {
// Refer spec: https://github.com/ElementsProject/elements/issues/805
Expand Down

0 comments on commit 40a605f

Please sign in to comment.