Skip to content

Commit

Permalink
Merge branch 'handle-query-tx-param' into release-v2.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon committed Sep 26, 2024
2 parents 73808c0 + 5bd25a6 commit 732c9fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/ValidatorModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function ValidatorModal(props) {
setTab('profile')
}
}, [props.show])

function setTab(tab){
setActiveTab(tab || 'profile')
}
Expand All @@ -103,9 +103,11 @@ function ValidatorModal(props) {
return
}

const key = network.chain.sdk50OrLater ? 'query' : 'events'

network.queryClient.getTransactions([
{ key: 'events', value: `message.action='/cosmos.authz.v1beta1.MsgExec'` },
{ key: 'events', value: `message.sender='${operator.botAddress}'` }
{ key: key, value: `message.action='/cosmos.authz.v1beta1.MsgExec'` },
{ key: key, value: `message.sender='${operator.botAddress}'` }
], {
pageSize: 1,
order: 2,
Expand Down
3 changes: 3 additions & 0 deletions src/utils/Chain.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const Chain = (data) => {
const slip44 = data.slip44 || 118
const ledgerSupport = data.ledgerSupport ?? slip44 !== 60 // no ethereum ledger support for now
const sdk46OrLater = validate(cosmos_sdk_version) && compareVersions(cosmos_sdk_version, '0.46') >= 0
const sdk50OrLater = validate(cosmos_sdk_version) && compareVersions(cosmos_sdk_version, '0.50') >= 0
const sdkAuthzAminoSupport = sdk46OrLater
const aminoPreventTypes = data.aminoPreventTypes || []
const authzSupport = data.authzSupport ?? data.params?.authz
Expand Down Expand Up @@ -37,6 +38,8 @@ const Chain = (data) => {
authzAminoExecPreventTypes,
apiVersions,
restakeSupport,
sdk46OrLater,
sdk50OrLater,
denom: data.denom || baseAsset?.base?.denom,
display: data.display || baseAsset?.display?.denom,
symbol: data.symbol || baseAsset?.symbol,
Expand Down

0 comments on commit 732c9fb

Please sign in to comment.