Skip to content
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 tokens that contain : #421

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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