Skip to content

fix: undefined asset id in send page #1704

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

Merged
merged 2 commits into from
Feb 22, 2025
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
4 changes: 2 additions & 2 deletions packages/extension-polkagate/src/hooks/useBalances.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 @polkadot/extension-polkagate authors & contributors
// Copyright 2019-2025 @polkadot/extension-polkagate authors & contributors
// SPDX-License-Identifier: Apache-2.0

import type React from 'react';
Expand All @@ -14,7 +14,7 @@ import { useBalancesOnAssethub, useBalancesOnMultiAssetChain, useInfo, useNative
export default function useBalances (address: string | undefined, refresh?: boolean, setRefresh?: React.Dispatch<React.SetStateAction<boolean>>, onlyNew = false, assetId?: string | number): BalancesInfo | undefined {
const { account, api, chainName, decimal: currentDecimal, genesisHash: chainGenesisHash, token: currentToken } = useInfo(address);

const isNativeAssetId = String(assetId) === String(NATIVE_TOKEN_ASSET_ID) || String(assetId) === String(NATIVE_TOKEN_ASSET_ID_ON_ASSETHUB);
const isNativeAssetId = String(assetId) === String(NATIVE_TOKEN_ASSET_ID) || String(assetId) === String(NATIVE_TOKEN_ASSET_ID_ON_ASSETHUB) || assetId === 'undefined';
const maybeNonNativeAssetId = isNativeAssetId ? undefined : assetId;

const balances = useNativeAssetBalances(address, refresh, setRefresh, onlyNew);
Expand Down
7 changes: 4 additions & 3 deletions packages/extension-polkagate/src/popup/home/news.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ export interface News {

export const news: News[] = [
{
version: '0.34.1',
version: '0.35.1',
notes: [
'Added support for pool migration, allowing users to vote on governance using their staked funds in pools on Kusama.',
'PolkaGate is getting a complete new look, so stay tuned for the upcoming update!'
'Pool Migration Support: Enable users to vote on governance using their staked funds in pools on Kusama.',
'Send Page Fix: Resolve issue where the asset ID was undefined when balances were not yet fetched.',
'UI Redesign Incoming: PolkaGate is getting a brand-new look—stay tuned for the upcoming update!'
]
},
{
Expand Down
Loading