diff --git a/.changeset/tame-moles-stare.md b/.changeset/tame-moles-stare.md new file mode 100644 index 000000000..a169a09ff --- /dev/null +++ b/.changeset/tame-moles-stare.md @@ -0,0 +1,5 @@ +--- +"@lightsparkdev/core": patch +--- + +separateCurrencyStrParts and tests diff --git a/apps/examples/uma-vasp/src/SendingVasp.ts b/apps/examples/uma-vasp/src/SendingVasp.ts index c07b3a54e..3e56ab5bf 100644 --- a/apps/examples/uma-vasp/src/SendingVasp.ts +++ b/apps/examples/uma-vasp/src/SendingVasp.ts @@ -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."); @@ -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, {