Skip to content

Commit

Permalink
Merge pull request #375 from kumulynja/fix-371-payjoin-uri-showing-in…
Browse files Browse the repository at this point in the history
…-liquid-tab

fix: remove duplicate payjoin code in getAddressWithAmountAndLabel
  • Loading branch information
ethicnology authored Dec 23, 2024
2 parents 82a9986 + 40a605f commit b240c2a
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 b240c2a

Please sign in to comment.