Skip to content

Commit

Permalink
fix: FinderLink chainID (#366)
Browse files Browse the repository at this point in the history
* fix: validator history display

chainID not properly passed into FinderLink causing validator to not be displayed on parsed messages.

* fix: remove unneeded ts-expect-error

Remove @ts-expect-error lines that are unneeded.  Causing warnings when starting application.

* Revert "fix: remove unneeded ts-expect-error"

This reverts commit 0afc3c2.
  • Loading branch information
terran6 authored May 3, 2023
1 parent 3658f09 commit b0db9d3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/containers/TxMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ValidatorAddress = ({ children: address }: { children: string }) => {
)?.description.moniker

return (
<FinderLink value={address} short={!moniker} validator>
<FinderLink value={address} short={!moniker} chainID={chainID} validator>
{moniker ?? address}
</FinderLink>
)
Expand All @@ -31,6 +31,8 @@ const TerraAddress = ({ children: address }: { children: string }) => {
const { data: contracts } = useCW20Contracts()
const { data: tokens } = useCW20Whitelist()
const addresses = useInterchainAddresses()
const networks = useNetwork()
const chainID = getChainIDFromAddress(address, networks)

const name = useMemo(() => {
if (addresses && Object.values(addresses).includes(address))
Expand All @@ -42,7 +44,11 @@ const TerraAddress = ({ children: address }: { children: string }) => {
return [protocol, name].join(" ")
}, [address, addresses, contracts, tokens])

return <FinderLink value={address}>{name ?? truncate(address)}</FinderLink>
return (
<FinderLink value={address} chainID={chainID}>
{name ?? truncate(address)}
</FinderLink>
)
}

const Tokens = ({ children: coins }: { children: string }) => {
Expand Down

0 comments on commit b0db9d3

Please sign in to comment.