@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/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/utils/quote/paraswap.ts +7 -0
package/package.json
CHANGED
|
@@ -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
|
}
|