Skip to content

Commit c5a77e8

Browse files
committed
fix fees bug
1 parent 134a7a9 commit c5a77e8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/components/core/utils/feesHandler.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ export class Providerfees {
8383
}
8484

8585
if (providerFeeToken && providerFeeToken?.toLowerCase() !== ZeroAddress) {
86-
const provider = await this.node.getBlockchain(assetChainId).getProvider()
86+
const blockchain = this.node.getBlockchain(Number(assetChainId))
87+
if (!blockchain) {
88+
throw new Error(`Blockchain for chainId ${assetChainId} is not configured`)
89+
}
90+
const provider = await blockchain.getProvider()
8791
const decimals = await getDatatokenDecimals(providerFeeToken, provider)
8892
providerFeeAmountFormatted = parseUnits(providerFeeAmount.toString(10), decimals)
8993
} else {

0 commit comments

Comments
 (0)