-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Issue Description
The rippled implementation of gateway_balances does not return invalidHotWallet as an error if one of the addresses provided in hotwallet does not have a trustline with account, but instead simply does not include a balance for the address in its response.
Clio, however, returns the invalidHotWallet error code when an address in hotwallet does not have a trustline with account. Although this is the correct behavior according to the xrpl.org documentation, this discrepancy between rippled and Clio should be considered a breaking change in the v1 API.
Steps to Reproduce
Call gateway_balances on rippled and provide a hot wallet that does not have a trustline to the issuer:
curl --location 'https://xrplcluster.com' \
--header 'Content-Type: application/json' \
--data '{
"method": "gateway_balances",
"params": [
{
"account": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
"hotwallet": [
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ"
],
"ledger_index": "validated",
"strict": true
}
]
}'
This returns
{
"result": {
"account": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
"ledger_hash": "108D37806941E711921120F53597F50403638EDACC4D64792879AF8F1DC8ECA6",
"ledger_index": 93435385,
"obligations": {
"524C555344000000000000000000000000000000": "21995883.29000014"
},
"status": "success",
"validated": true
}
}
If you run the same RPC against https://s1.ripple.com which is Clio, Clio returns this
{
"result": {
"error": "invalidHotWallet",
"error_code": 5004,
"error_message": "Invalid hot wallet.",
"status": "error",
"type": "response",
"request": {
"method": "gateway_balances",
"params": [
{
"account": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
"hotwallet": [
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ"
],
"ledger_index": "validated",
"strict": true
}
]
}
},
"warnings": [
{
"id": 2001,
"message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
}
]
}
Expected Result
Clio should return a successful response to gateway_balances even if one of the hotwallet does not have a trustline with account. Hot wallets that do not have a trustline to account should not be included in the response's balances array.
Actual Result
Clio returns invalidHotWallet error code
Environment
N/A
Supporting Files
Metadata
Metadata
Assignees
Labels
Type
Projects
Status