-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hello near-java-api Team,
I've encountered an issue related to the handling of NEAR blockchain's API responses in the ReceiptData class. Recently, it appears that the NEAR API response format has been updated, introducing a new data type 'Data'. This new format isn't currently supported by the ReceiptData class in your library.
Issue Description:
The original API response format, which is currently supported by your library, looks like this:
{
"predecessor_id": "system",
"receipt": {
"Action": {
"actions": [
{
"Transfer": {
"deposit": "1168608495296525854253"
}
}
],
"gas_price": "0",
"input_data_ids": [],
"output_data_receivers": [],
"signer_id": "vo8v1h89c37f.users.dev-kaiching.testnet",
"signer_public_key": "ed25519:QQ9SRodinWiKKwpHYDzD2F3cMY4VYLqWC1k581oY3pf"
}
},
"receipt_id": "AQ81WBKzLqL8tP7WdvUVYE4MgRGbPvTeJx8zsQJKjoqF",
"receiver_id": "vo8v1h89c37f.users.dev-kaiching.testnet"
}The new API response format includes an additional 'Data' field as shown below:
{
"predecessor_id": "wallet.dev-kaiching.testnet",
"receipt": {
"Data": {
"data": "",
"data_id": "7WNSBrRGVVkr9zUj4GbAP893sQ1QktoeZPkhjsi5qpbS"
}
},
"receipt_id": "HKwaZSD3P8rDxpYMnTts4GR6qKmtTbPHi9PBK1B7Cwr5",
"receiver_id": "earn.dev-kaiching.testnet"
}Suggested Solution:
I propose an update to the ReceiptData class to accommodate this new 'Data' field. This could involve adding a new property to the class to parse and store this additional data from the JSON response.
Thank you for your attention to this matter!