Developer Questions

Ask a Question
Back to All

How can we send payment transaction using Xumm wallet?

To do like the above issue, I think that we should use createAndSubscribe api as follows:

import { Xumm } from "xumm";

const xumm = new Xumm(my api key);

const { created, resolved } = await xumm.payload.createAndSubscribe({
TransactionType: 'Payment',
Destination: 'rfHn6cB5mmqZ6fHZ4fdemCDSxqLTijgMwo',
Amount: String(1000000) // one million drops, 1 XRP
}, eventMessage => {
if (Object.keys(eventMessage.data).indexOf('opened') > -1) {
// Update the UI? The payload was opened.
}
if (Object.keys(eventMessage.data).indexOf('signed') > -1) {
// The signed property is present, true (signed) / false (rejected)
return eventMessage
}
})

But I didn't send transaction.

What is the reason?

Please help me.