Skip to content

Commit

Permalink
change decimals fetching order
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Jan 5, 2024
1 parent 2357ac0 commit 6db8ae0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions packages/config/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,11 @@ export const interlay = new Parachain({
asset: intr,
decimals: 10,
id: { Token: intr.originSymbol },
metadataId: 0,
},
{
asset: ibtc,
decimals: 8,
id: { Token: ibtc.originSymbol },
metadataId: 0,
},
],
ecosystem: Ecosystem.Polkadot,
Expand Down Expand Up @@ -576,7 +574,6 @@ export const kintsugi = new Parachain({
asset: kbtc,
decimals: 8,
id: { Token: kbtc.originSymbol },
metadataId: 0,
},
],
ecosystem: Ecosystem.Kusama,
Expand Down Expand Up @@ -1437,7 +1434,6 @@ export const zeitgeist = new Parachain({
asset: usdcwh,
decimals: 10,
id: { ForeignAsset: 1 },
metadataId: 0,
},
],
ecosystem: Ecosystem.Polkadot,
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/polkadot/PolkadotService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ export class PolkadotService {
async getAssetDecimals(asset: Asset): Promise<number> {
const metaId = this.chain.getMetadataAssetId(asset);
return (
this.chain.getAssetDecimals(asset) ||
(await this.getAssetDecimalsFromQuery(metaId)) ||
(await this.getAssetMeta(metaId))?.decimals ||
this.chain.getAssetDecimals(asset) ||
this.decimals
);
}
Expand Down

0 comments on commit 6db8ae0

Please sign in to comment.