Skip to content

Commit e75cceb

Browse files
fix: sei fee asset + drop sei comment + debridge error logging
- add seiAssetId to FEE_ASSET_IDS (missing, causing fee resolution to fail) - drop trailing url comment on SeiMainnet constant entry - add console.error to debridge catch blocks and status api failures Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent feb9bed commit e75cceb

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

packages/caip/src/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export const CHAIN_REFERENCE = {
192192
BobMainnet: '60808', // https://docs.gobob.xyz
193193
ModeMainnet: '34443', // https://docs.mode.network
194194
SoneiumMainnet: '1868', // https://soneium.org
195-
SeiMainnet: '1329', // https://docs.sei.io
195+
SeiMainnet: '1329',
196196
SolanaMainnet: '5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', // https://namespaces.chainagnostic.org/solana/caip2
197197
TronMainnet: '0x2b6653dc', // https://developers.tron.network/docs/networks
198198
SuiMainnet: '35834a8a', // First 8 chars of SUI mainnet genesis hash
@@ -378,6 +378,7 @@ export const FEE_ASSET_IDS = [
378378
sonicAssetId,
379379
unichainAssetId,
380380
soneiumAssetId,
381+
seiAssetId,
381382
solAssetId,
382383
tronAssetId,
383384
suiAssetId,

packages/swapper/src/swappers/DebridgeSwapper/endpoints.ts

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ export const debridgeApi: SwapperApi = {
3535
try {
3636
const feeData = await evm.getFees({ adapter, data, to, value, from, supportsEIP1559 })
3737
return feeData.networkFeeCryptoBaseUnit
38-
} catch {
38+
} catch (e) {
39+
console.error('[deBridge] getEvmTransactionFees: gas estimation failed, using API fallback', {
40+
error: e,
41+
chainId: sellAsset.chainId,
42+
to,
43+
value,
44+
})
3945
if (!gasLimitFromApi) throw new Error('Gas estimation failed and no API gas limit fallback')
4046
const { average } = await adapter.getGasFeeData()
4147
return evm.calcNetworkFeeCryptoBaseUnit({
@@ -70,7 +76,11 @@ export const debridgeApi: SwapperApi = {
7076
...fees,
7177
gasLimit: BigNumber(fees.gasLimit).times('1.2').toFixed(0),
7278
}
73-
} catch {
79+
} catch (e) {
80+
console.error(
81+
'[deBridge] getUnsignedEvmTransaction: gas estimation failed, using API fallback',
82+
{ error: e, chainId: sellAsset.chainId, to, value },
83+
)
7484
if (!gasLimitFromApi) throw new Error('Gas estimation failed and no API gas limit fallback')
7585
const { average } = await adapter.getGasFeeData()
7686
const networkFeeCryptoBaseUnit = evm.calcNetworkFeeCryptoBaseUnit({
@@ -144,6 +154,11 @@ export const debridgeApi: SwapperApi = {
144154
)
145155

146156
if (maybeOrderIdsResponse.isErr()) {
157+
console.error('[deBridge] checkTradeStatus: failed to fetch orderIds', {
158+
error: maybeOrderIdsResponse.unwrapErr(),
159+
txHash: resolvedTxHash,
160+
chainId,
161+
})
147162
return {
148163
buyTxHash: undefined,
149164
status: TxStatus.Pending,
@@ -168,6 +183,12 @@ export const debridgeApi: SwapperApi = {
168183
)
169184

170185
if (maybeStatusResponse.isErr()) {
186+
console.error('[deBridge] checkTradeStatus: failed to fetch order status', {
187+
error: maybeStatusResponse.unwrapErr(),
188+
orderId,
189+
txHash: resolvedTxHash,
190+
chainId,
191+
})
171192
return {
172193
buyTxHash: undefined,
173194
status: TxStatus.Unknown,

0 commit comments

Comments
 (0)