Skip to content

Commit

Permalink
fix: undefined asset id in send page (#1704)
Browse files Browse the repository at this point in the history
* fix: undefined asset id in send page

closes #1703

* chore: update news
  • Loading branch information
Nick-1979 authored Feb 22, 2025
1 parent d6c1238 commit dca28a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit dca28a0

Please sign in to comment.