Skip to content

Commit

Permalink
feat: unrug lifi in release (#8325)
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre authored Dec 10, 2024
1 parent e387e89 commit 4440ab5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/swapper/src/swappers/LifiSwapper/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { ChainId } from '@shapeshiftoss/caip'
import { fromChainId } from '@shapeshiftoss/caip'
import { evm } from '@shapeshiftoss/chain-adapters'
import { TxStatus } from '@shapeshiftoss/unchained-client'
import { bn } from '@shapeshiftoss/utils'
import type { Result } from '@sniptt/monads/build'
import { Err } from '@sniptt/monads/build'
import type { InterpolationOptions } from 'node-polyglot'
Expand Down Expand Up @@ -153,7 +154,9 @@ export const lifiApi: SwapperApi = {
adapter: assertGetEvmChainAdapter(chainId),
data: data.toString(),
to,
value,
// This looks odd but we need this, else unchained estimate calls will fail with:
// "invalid decimal value (argument=\"value\", value=\"0x0\", code=INVALID_ARGUMENT, version=bignumber/5.7.0)"
value: bn(value.toString()).toString(),
from,
supportsEIP1559,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { ChainId } from '@shapeshiftoss/caip'
import { evm } from '@shapeshiftoss/chain-adapters'
import { viemClientByChainId } from '@shapeshiftoss/contracts'
import type { EvmChainId, KnownChainIds } from '@shapeshiftoss/types'
import { bn } from '@shapeshiftoss/utils'
import { getContract } from 'viem'

import type { SwapperDeps } from '../../../../types'
Expand Down Expand Up @@ -46,7 +47,9 @@ export const getNetworkFeeCryptoBaseUnit = async ({
adapter,
data,
to,
value,
// This looks odd but we need this, else unchained estimate calls will fail with:
// "invalid decimal value (argument=\"value\", value=\"0x0\", code=INVALID_ARGUMENT, version=bignumber/5.7.0)"
value: bn(value.toString()).toString(),
from,
supportsEIP1559,
})
Expand Down

0 comments on commit 4440ab5

Please sign in to comment.