我想建立一条信任线来购买 XRPL3DAPES,但我收到错误“错误:构造金额的类型无效”。
我不明白为什么会显示此错误。
我多次查看文档,但每次都有不同的错误。
这是我的代码:
const xrpl = require("xrpl")
const SERVER = "wss://xrplcluster.com/"
const WebSocket = require("ws")
const ws = new WebSocket(SERVER)
ws.on("close", (code, reason) => {
console.log("Disconnected. \nCode :", code, "\nReason: ", reason)
})
async function main() {
const xrpl3dapes = {
addressIssuerWallet: "rLBW9d9cfEY4ZFPbgqKzEpoEHjKeLrotWZ",
currency: "5852504C33444150455300000000000000000000"
}
let response;
const client = new xrpl.Client(SERVER)
await client.connect()
seed = "sXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
const wallet = xrpl.Wallet.fromSeed(seed)
try{
response = await client.submitAndWait(wallet.sign(
{
"TransactionType": "TrustSet",
"Account": wallet.address,
"Fee": base_fee,
"LimitAmount":
{
"currency": xrpl3dapes.currency,
"issuer": xrpl3dapes.addressIssuerWallet,
"value": "10000"
},
"sequence": 1
}).tx_blob)
}
catch (error){
console.log(error)
}
client.disconnect()
process.exit(1)
}
main()
谢谢你的帮助 !