Skip to content

Commit fc078b8

Browse files
author
Elmar Kenigs
authored
Fixed decimals in deposit (#52)
1 parent c8daec3 commit fc078b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/sdk/src/sdk/sdk.deposit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export async function getDepositData<
101101
xcmFeeDecimals,
102102
] = await Promise.all([
103103
// assetDecimals
104-
polkadot.getAssetDecimals(asset),
104+
asset.isNative ? moonChain.decimals : polkadot.getAssetDecimals(asset),
105105
// existentialDeposit
106106
foreignPolkadot.getExistentialDeposit(),
107107
// sourceBalance
@@ -153,7 +153,7 @@ export async function getDepositData<
153153
moonChainFee: {
154154
balance: xcmFeeBalance,
155155
decimals: xcmFeeAssetConfig.asset.isNative
156-
? meta.decimals
156+
? moonChain.decimals
157157
: xcmFeeDecimals,
158158
fee: xcmFee,
159159
symbol: xcmFeeAssetConfig.asset.originSymbol,

0 commit comments

Comments
 (0)