Skip to content

Commit

Permalink
fix: show info for old transactions (#843)
Browse files Browse the repository at this point in the history
Viewing old transactions was broken by #835. When sending `api_version:
1` to clio it will currently forward to a rippled node which is not full
history. That will be addresses soon but until then wont send now that
for every request.

Explicitly send `api_version` when getting `account_info` because we
only want the result from the most recently validated ledger.
  • Loading branch information
ckniffen authored Sep 28, 2023
1 parent 85e4968 commit 00ee746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rippled/lib/rippled.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const formatPaychannel = (d) => ({
})

const executeQuery = async (rippledSocket, params) =>
// `clio` defaults the `api_version` to `2` and `rippled` to `1`.
rippledSocket.send({ api_version: 1, ...params }).catch((error) => {
rippledSocket.send(params).catch((error) => {
const message =
error.response && error.response.error_message
? error.response.error_message
Expand Down Expand Up @@ -170,6 +169,7 @@ const getTransaction = (rippledSocket, txHash) => {
const getAccountInfo = (rippledSocket, account) =>
query(rippledSocket, {
command: 'account_info',
api_version: 1,
account,
ledger_index: 'validated',
signer_lists: true,
Expand Down

0 comments on commit 00ee746

Please sign in to comment.