@merkl/api 0.10.243 → 0.10.244
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.
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            import { ETH_ZKSYNC_ADDRESS } from "@sdk";
         | 
| 1 | 
            +
            import { ETH_ADDRESS, ETH_ZKSYNC_ADDRESS } from "@sdk";
         | 
| 2 2 | 
             
            import { decodeFunctionResult, encodeFunctionData, parseAbi } from "viem";
         | 
| 3 3 | 
             
            import { ChainInteractionService } from "../chainInteraction";
         | 
| 4 4 | 
             
            import { EnsoService } from "../enso/enso.service";
         | 
| @@ -64,7 +64,7 @@ export class InteractionService { | |
| 64 64 | 
             
                static async getApproval(chainId, owner, spender, tokenAddress, amount) {
         | 
| 65 65 | 
             
                    // Normalizing ETH on ZKSync
         | 
| 66 66 | 
             
                    if (tokenAddress === ETH_ZKSYNC_ADDRESS)
         | 
| 67 | 
            -
                        tokenAddress =  | 
| 67 | 
            +
                        tokenAddress = ETH_ADDRESS;
         | 
| 68 68 | 
             
                    //TODO: add utils to make using viem type-safety more concise
         | 
| 69 69 | 
             
                    const abi = parseAbi([
         | 
| 70 70 | 
             
                        "function approve(address, uint256) returns (bool)",
         | 
| @@ -101,7 +101,7 @@ export class InteractionService { | |
| 101 101 | 
             
                static async getTransaction(provider, chainId, protocolId, identifier, userAddress, fromTokenAddress, fromTokenAmount, slippage) {
         | 
| 102 102 | 
             
                    // Normalizing ETH on ZKSync
         | 
| 103 103 | 
             
                    if (fromTokenAddress === ETH_ZKSYNC_ADDRESS)
         | 
| 104 | 
            -
                        fromTokenAddress =  | 
| 104 | 
            +
                        fromTokenAddress = ETH_ADDRESS;
         | 
| 105 105 | 
             
                    if (provider === "zap")
         | 
| 106 106 | 
             
                        return await KyberZapService.getTransaction(chainId, protocolId, identifier, userAddress, fromTokenAddress, fromTokenAmount, slippage);
         | 
| 107 107 | 
             
                    const { tx, ...quote } = await EnsoService.getTransaction({
         |