Skip to content

Commit 77b1d5f

Browse files
authored
fix(docs): update constants and payment structure in FAssets minting guide (#714)
1 parent f4b56c1 commit 77b1d5f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

docs/fassets/developer-guides/3-fassets-minting.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ The next step is to send the XRP Ledger payment to the agent, and you can use th
7474
### XRP Payment Script Breakdown
7575

7676
1. Install the `xrpl` package — it's not included in the Flare Hardhat Starter Kit by default.
77-
2. Define the needed constants.
77+
2. Specify the correct constants from the reserve collateral script:
78+
- `AGENT_ADDRESS` - Agent's XRP Ledger address.
79+
- `AMOUNT_XRP` - XRP amount to send.
80+
- `PAYMENT_REFERENCE` - Payment reference from the the reserve collateral script.
7881
3. Create a client to connect to the XRP Ledger Testnet.
7982
4. Load the sender wallet.
8083
5. Construct the payment transaction.

examples/developer-hub-javascript/fassetsCreateXrpPayment.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Client, Wallet, xrpToDrops, Payment, TxResponse } from "xrpl";
44

55
// 2. Define the constants
66
const AGENT_ADDRESS = "r4KgCNzn9ZuNjpf17DEHZnyyiqpuj599Wm"; // Agent underlying chain address
7-
const AMOUNT_XRP = "20.05"; // XRP amount to send
7+
const AMOUNT_XRP = "10.025"; // XRP amount to send
88
const PAYMENT_REFERENCE =
99
"4642505266410001000000000000000000000000000000000000000000f655fb"; // Reference
1010

@@ -25,7 +25,13 @@ async function send20XrpWithReference() {
2525
// XRP amount to send
2626
Amount: xrpToDrops(AMOUNT_XRP),
2727
// Payment reference
28-
InvoiceID: PAYMENT_REFERENCE, // Reference
28+
Memos: [
29+
{
30+
Memo: {
31+
MemoData: PAYMENT_REFERENCE,
32+
},
33+
},
34+
],
2935
};
3036

3137
console.log(paymentTx);

0 commit comments

Comments
 (0)