Skip to content

Commit

Permalink
Add BifrostPolkadot vASTR (#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
hqwangningbo authored Jan 4, 2024
1 parent dcd54dd commit 16e50dc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Binary file added src/assets/img/token/vastr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/modules/xcm/tokens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ export const xcmToken = {
originChain: Chain.UNIQUE,
minBridgeAmount: '0.1',
},
{
symbol: 'vASTR',
isNativeToken: false,
assetId: '18446744073709551632',
originAssetId: 'vASTR',
logo: require('/src/assets/img/token/vastr.png'),
isXcmCompatible: true,
originChain: Chain.BIFROST_POLKADOT,
minBridgeAmount: '0.1',
},
],
[endpointKey.SHIDEN]: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const BNC = { Native: 'BNC' };
const vDOT = { VToken2: 0 };
const vKSM = { VToken: 'KSM' };
const ASTR = { Token2: 3 };
const vASTR = { vToken2: 3 };
const SDN = { Token2: 3 };

/**
Expand Down Expand Up @@ -49,6 +50,8 @@ export class BifrostXcmRepository extends XcmRepository {
tokenData = vKSM;
} else if (token.originAssetId == 'ASTR') {
tokenData = ASTR;
} else if (token.originAssetId == 'vASTR') {
tokenData = vASTR;
} else if (token.originAssetId == 'SDN') {
tokenData = SDN;
} else {
Expand Down Expand Up @@ -113,6 +116,9 @@ export class BifrostXcmRepository extends XcmRepository {
} else if (token.originAssetId == 'ASTR') {
const bal = await api.query.tokens.accounts<TokensAccounts>(address, ASTR);
return bal.free.toString();
} else if (token.originAssetId == 'vASTR') {
const bal = await api.query.tokens.accounts<TokensAccounts>(address, vASTR);
return bal.free.toString();
} else if (token.originAssetId == 'SDN') {
const bal = await api.query.tokens.accounts<TokensAccounts>(address, SDN);
return bal.free.toString();
Expand Down

0 comments on commit 16e50dc

Please sign in to comment.