Multi-asset send/receive (#645)

* Multi-asset send/receive

* Apply suggestions from code review

Co-authored-by: Daniel Granhão <32176319+danielgranhao@users.noreply.github.com>

* Log the prepare asset_id

---------

Co-authored-by: Daniel Granhão <32176319+danielgranhao@users.noreply.github.com>
This commit is contained in:
Ross Savage
2025-01-24 16:55:51 +01:00
committed by GitHub
parent 7841939e6a
commit e196a91973
26 changed files with 2754 additions and 963 deletions

View File

@@ -18,6 +18,7 @@ import {
removeEventListener,
prepareReceivePayment,
prepareSendPayment,
ReceiveAmountVariant,
receivePayment,
sendPayment,
PaymentMethod
@@ -84,8 +85,8 @@ const App = () => {
addLine("addEventListener", listenerId)
/* Receive lightning payment */
let prepareReceiveRes = await prepareReceivePayment({ payerAmountSat: 1000, paymentMethod: PaymentMethod.LIGHTNING })
let amount = { type: ReceiveAmountVariant.BITCOIN, payerAmountSat: 1000 }
let prepareReceiveRes = await prepareReceivePayment({ amount, paymentMethod: PaymentMethod.LIGHTNING })
addLine("prepareReceivePayment", JSON.stringify(prepareReceiveRes))
// Get the fees required for this payment
addLine("Payment fees", `${prepareReceiveRes.feesSat}`)