Skip to content

Commit

Permalink
Add changeset (#297)
Browse files Browse the repository at this point in the history
Co-authored-by: Corey Martin <[email protected]>
  • Loading branch information
github-actions[bot] and coreymartin authored Oct 18, 2023
1 parent fce527b commit 24782f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-moles-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lightsparkdev/core": patch
---

separateCurrencyStrParts and tests
10 changes: 7 additions & 3 deletions apps/examples/uma-vasp/src/SendingVasp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export default class SendingVasp {
const paymentResult = await this.lightsparkClient.payUmaInvoice(
this.config.nodeID,
payReqData.encodedInvoice,
/* maxeesMsats */ 1_000_000,
/* maxFeesMsats */ 1_000_000,
);
if (!paymentResult) {
throw new Error("Payment request failed.");
Expand Down Expand Up @@ -396,9 +396,13 @@ export default class SendingVasp {
payment: OutgoingPayment,
payReqData: SendingVaspPayReqData,
) {
const utxos =
const utxos: uma.UtxoWithAmount[] =
payment.umaPostTransactionData?.map((d) => {
d.utxo, convertCurrencyAmount(d.amount, CurrencyUnit.MILLISATOSHI);
return {
utxo: d.utxo,
amount: convertCurrencyAmount(d.amount, CurrencyUnit.MILLISATOSHI)
.preferredCurrencyValueRounded,
};
}) ?? [];
try {
const postTxResponse = await fetch(payReqData.utxoCallback, {
Expand Down

0 comments on commit 24782f5

Please sign in to comment.