Skip to content

Commit

Permalink
Fix tokens that contains : (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecande11 authored Jun 7, 2023
1 parent 6c86173 commit 92a4770
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/InitBankBalance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const InitBankBalance = ({ children }: PropsWithChildren<{}>) => {
)

native.list.forEach(({ id }) => {
const [chain, denom] = id.split(":")
const [chain, ...denomData] = id.split(":")
const denom = denomData.join(":")
if (
!bankBalance.find(
(balance) => balance.denom === denom && balance.chain === chain
Expand Down
2 changes: 1 addition & 1 deletion src/pages/wallet/AssetList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const AssetList = () => {
// @ts-expect-error
unknownIBCDenoms[denom]?.chainID ?? data.chainID ?? chain,
data.token,
].join(":")
].join("*")

if (acc[key]) {
acc[key].balance = `${
Expand Down
4 changes: 2 additions & 2 deletions src/pages/wallet/AssetPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const AssetPage = () => {
const { t } = useTranslation()
const { setRoute, route } = useWalletRoute()
const routeDenom = route.path === Path.coin ? route.denom ?? "uluna" : "uluna"
const [chain, denom] = routeDenom.includes(":")
? routeDenom.split(":")
const [chain, denom] = routeDenom.includes("*")
? routeDenom.split("*")
: [undefined, routeDenom]
const { token, symbol, icon, decimals } = readNativeDenom(denom, chain)

Expand Down

0 comments on commit 92a4770

Please sign in to comment.