New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: LIVE-12068 [cosmos]Adapt LL code to avoid using deprecated endpoints #6735
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
4 Ignored Deployments
|
...edger-live-common/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap
Outdated
Show resolved
Hide resolved
export const getMainMessage = (messages: CosmosEventMessage[]): CosmosEventMessage => { | ||
const messagePriorities: string[] = [ | ||
"unbond", | ||
"redelegate", | ||
"delegate", | ||
"withdraw_rewards", | ||
"transfer", | ||
"MsgUndelegate", | ||
"MsgBeginRedelegate", | ||
"MsgDelegate", | ||
"MsgWithdrawDelegatorReward", | ||
"MsgTransfer", | ||
"MsgRecvPacket", | ||
"MsgSend", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I missed it, but I don't think we have a test checking that with a node on v0.50 we use a different URI ?
β Checklist
npx changeset
was attached.π Description
Since sdk 0.50, the GetTxsEvent will use "query" param instead of "event", see https://docs.cosmos.network/api#tag/Service/operation/GetTxsEvent for more details.
So, we should firstly check the cosmos sdk version and use query/event according to different cosmos sdk version.
Since sdk 0.50, the GetTxsEvent endpoint returns empty "logs"(a field in the GetTxsEvent api response). so we can't use logs to retrieve transactions any more. We should use "tx.body.messages" from now on.
Fixed regression:
For example, dydx and dydx testnet upgrade the cosmos SDK to 0.50 recently. So, the current codebase doesn't work with them.
Here is an example:
https://testnet-dydx-api.lavenderfive.com/cosmos/tx/v1beta1/txs?query=message.sender=%27dydx1pax8j79vm78qqvsnd5maklujqxahqm6j6r2mkl%27&pagination.limit=100&pagination.offset=0&pagination.reverse=true
as we can see that the "logs" array is always empty in the response.
β Context
π§ Checklist for the PR Reviewers