XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

Missing MemoType and MemoFormat in JSON response #4128

Closed shortthefomo closed 2 years ago

shortthefomo commented 2 years ago

Issue Description

Missing the MemoType and MemoFormat when listening to ledger close using the xrpl-client lib but payload will be the same with xrpl.js

Steps to Reproduce

Create a offercreate transaction include the MemoData, MemoFormat and MemoType as per spec at https://xrpl.org/transaction-common-fields.html#memos-field

Now consume that offer and look at the JSON result of that transaction.

Expected Result

MemoData, MemoFormat and MemoType should all be present in the Memos field.

Actual Result

only MemoData was returned

Environment

xrpl-client

Supporting Files

Screen Shot 2022-03-30 at 23 00 52 Screen Shot 2022-03-30 at 22 59 22 Screen Shot 2022-03-30 at 22 58 04

here is the offer create transaction https://testnet.xrpl.org/transactions/9856E15441A4E3F7C67CB091C99AB817AAA03FF1025BF3F8D7F56F180C915249/detailed

here is the second offer create transaction that partially consumed the above. https://testnet.xrpl.org/transactions/86A1F521E02CAFDB4D012D93017B8530E077D7DF4B455B0F013BCA21A638F7D5/detailed

WietseWind commented 2 years ago

Hey @lathanbritz,

Thanks for reporting this!

I'm not entirely sure I understand, but I think what it comes down to is:

Am I correct?

If it's a client thing, I believe this report belongs in the client-repos (xrpl-client or xrpljs) but if my assumption above is correct, it's indeed a rippled thing, where certain subscription triggered events don't return the full tx memo object.

shortthefomo commented 2 years ago

Correct @WietseWind the "xrpl-client" is used, but the issue is the JSON object that rippled returns, its missing all the fields in the MEMOS response attached to the offerCreate response.

Here is how I attach to ledger close and pass all tx on and find the one that I need, the one that consumed the previous offerCreate.

That transaction payload (JSON) that is present there is incomplete.

apologies should have been more clear.

This is also clear on the RAW JSON in the testnet explorer -> https://testnet.xrpl.org/transactions/86A1F521E02CAFDB4D012D93017B8530E077D7DF4B455B0F013BCA21A638F7D5/raw

Screen Shot 2022-03-31 at 10 13 20 Screen Shot 2022-03-31 at 10 04 25
shortthefomo commented 2 years ago

Figured this out.

Issue is the me looking at the wrong transaction for the memo. The consuming offer, I fired through the sologenic interface, that writes its own Memo into that new transaction.

I need to be digging out the transaction HASH of the previous transaction and pulling the memo off there. This was simply me getting lost walking through the transactions.