XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.2k stars 510 forks source link

Issues with signing a AccountDelete transaction #1379

Closed cujo30227 closed 3 years ago

cujo30227 commented 3 years ago

Dear community,

I hope someone can help me with the following issues:

I have prepared a transaction using api.prepareTransaction with the following txJSON response:

{"TransactionType":"AccountDelete","Account":"rEMc1QXQqsEokWZAeMXaR4hU6wdQu9dPkR","Destination":"raqwG6TnXgjsRHq9gr34ZYeniHUS3ai33z","DestinationTag":0,"Fee":"5000000","Flags":2147483648,"LastLedgerSequence":62040198,"Sequence":9}

Trying to sign this txJSON with the correct secret of the Account doesn't give any response.

Note that I've set the maxFeeXRP and maxFee parameters to 5. When I do not specify a Fee in the transaction input for api.prepareTransaction, I DO get a response when signing the txJSON. This response is expectingly telINSUF_FEE_P.

Signing payments etc works without issues. For compatibility issues, I'm using version 1.6.0.

I spend several hours trying to find the reason why: 1) I cannot sign the AccountDelete Transaction when specifying the 5XRP Fee. 2) I don't get any direction or response from the sign comment that helps me to debug...

Anybody that can help me on this manner, or point me in the right direction?

Thanks!

elmurci commented 3 years ago

@cujo30227 Fee should not exceed 2000000

Are you setting maxFeeXRP in the RippleAPI constructor?

cujo30227 commented 3 years ago

Hi @elmurci Thanks, yes that appeared to be the issue. Thanks for pointing at setting maxFeeXRP in the constructor. I thought I had set it by api.maxFeeXRP = "5" , and setting maxFee in the instructions of the prepareTransaction. Apparently that was not the way. Thanks!