Skip to content

Commit dca28a0

Browse files
authored
fix: undefined asset id in send page (#1704)
* fix: undefined asset id in send page closes #1703 * chore: update news
1 parent d6c1238 commit dca28a0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/extension-polkagate/src/hooks/useBalances.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019-2024 @polkadot/extension-polkagate authors & contributors
1+
// Copyright 2019-2025 @polkadot/extension-polkagate authors & contributors
22
// SPDX-License-Identifier: Apache-2.0
33

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

17-
const isNativeAssetId = String(assetId) === String(NATIVE_TOKEN_ASSET_ID) || String(assetId) === String(NATIVE_TOKEN_ASSET_ID_ON_ASSETHUB);
17+
const isNativeAssetId = String(assetId) === String(NATIVE_TOKEN_ASSET_ID) || String(assetId) === String(NATIVE_TOKEN_ASSET_ID_ON_ASSETHUB) || assetId === 'undefined';
1818
const maybeNonNativeAssetId = isNativeAssetId ? undefined : assetId;
1919

2020
const balances = useNativeAssetBalances(address, refresh, setRefresh, onlyNew);

packages/extension-polkagate/src/popup/home/news.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ export interface News {
1010

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

0 commit comments

Comments
 (0)