Skip to content

Commit

Permalink
refactor: move logic
Browse files Browse the repository at this point in the history
  • Loading branch information
benalleng committed Oct 1, 2023
1 parent b9f5ab2 commit f4d56b1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/routes/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,16 @@ export default function Send() {
tags
);

sentDetails.amount = amountSats();
sentDetails.destination = address();
sentDetails.txid = txid;
sentDetails.fee_estimate = feeEstimate() ?? 0;
} else if (payjoinEnabled()) {
const txid = await state.mutiny_wallet?.send_payjoin(
address()!,
amountSats(),
tags
);
sentDetails.amount = amountSats();
sentDetails.destination = address();
sentDetails.txid = txid;
Expand All @@ -558,16 +568,6 @@ export default function Send() {
sentDetails.txid = txid;
sentDetails.fee_estimate = feeEstimate() ?? 0;
}
} else if (source() === "onchain" && payjoinEnabled()) {
const txid = await state.mutiny_wallet?.send_payjoin(
address()!,
amountSats(),
tags
);
sentDetails.amount = amountSats();
sentDetails.destination = address();
sentDetails.txid = txid;
sentDetails.fee_estimate = feeEstimate() ?? 0;
}
setSentDetails(sentDetails as SentDetails);
clearAll();
Expand Down

0 comments on commit f4d56b1

Please sign in to comment.