@shogun-sdk/intents-sdk 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shogun-sdk/intents-sdk",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "type": "module",
5
5
  "description": "Shogun Network Intent-based cross-chain swaps SDK",
6
6
  "author": "Shogun network",
@@ -50,6 +50,13 @@ export class ParaswapQuoteProvider {
50
50
 
51
51
  private async getQuote(paraswapParams: ParaswapQuoteRequestParams): Promise<OptimalRate> {
52
52
  const params = { ...paraswapParams };
53
+ // Native sentinels (0xEee…/0x0…) aren't real contracts, so `decimals()` reverts.
54
+ // Normalize both sides to wrapped native before quoting — mirrors how the swap layer
55
+ // normalizes tokenIn, and covers internal callers (e.g. gas-expense quotes) that pass
56
+ // the native sentinel as srcToken.
57
+ if (isNativeEvmToken(params.srcToken)) {
58
+ params.srcToken = WRAPPED_ETH_ADDRESSES[this.chainId];
59
+ }
53
60
  if (isNativeEvmToken(params.destToken)) {
54
61
  params.destToken = WRAPPED_ETH_ADDRESSES[this.chainId];
55
62
  }