mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-23 10:27:55 +00:00
fix: correct wHEZ asset ID from 0 to 2
tokenWrapper pallet on Asset Hub creates wHEZ as Asset ID 2, not 0. Asset IDs on Asset Hub: - Asset 1: PEZ - Asset 2: wHEZ (via tokenWrapper) - Asset 1000: wUSDT Updated: - shared/constants/index.ts: KNOWN_TOKENS - shared/lib/wallet.ts: ASSET_IDS.WHEZ default - AccountBalance.tsx: pool queries - InitializeHezPoolModal.tsx: balance query
This commit is contained in:
@@ -85,8 +85,8 @@ export const InitializeHezPoolModal: React.FC<InitializeHezPoolModalProps> = ({
|
||||
const freeBalance = balance.data.free.toString();
|
||||
setHezBalance(freeBalance);
|
||||
|
||||
// wHEZ balance (asset 0 on Asset Hub)
|
||||
const whezData = await assetHubApi.query.assets.account(0, account);
|
||||
// wHEZ balance (asset 2 on Asset Hub - tokenWrapper creates asset 2)
|
||||
const whezData = await assetHubApi.query.assets.account(2, account);
|
||||
setWhezBalance(whezData.isSome ? whezData.unwrap().balance.toString() : '0');
|
||||
} catch (error) {
|
||||
if (import.meta.env.DEV) console.error('Failed to fetch balances from Asset Hub:', error);
|
||||
|
||||
Reference in New Issue
Block a user