Skip to content

Commit 95c2891

Browse files
authored
fix(sdk): skip unknown domains in routing fee config derivation (#8502)
1 parent d685b99 commit 95c2891

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperlane-xyz/sdk": patch
3+
---
4+
5+
Routing fee config derivation skips non-EVM domains unknown to MultiProvider instead of throwing.

typescript/sdk/src/fee/EvmTokenFeeReader.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ export class EvmTokenFeeReader extends HyperlaneReader {
135135
routingDestinations.map(async (destination) => {
136136
const subFeeAddress = await routingFee.feeContracts(destination);
137137
if (subFeeAddress === constants.AddressZero) return;
138-
const chainName = this.multiProvider.getChainName(destination);
138+
const chainName = this.multiProvider.tryGetChainName(destination);
139+
if (!chainName) return;
139140
feeContracts[chainName] = await this.deriveTokenFeeConfig({
140141
address: subFeeAddress,
141142

0 commit comments

Comments
 (0)