Skip to content

Releases: DePayFi/web3-exchanges

v13.2.2

09 Aug 15:26
7b12887
Compare
Choose a tag to compare

update web3-blockchains

v13.2.1

09 Aug 09:52
90f19f2
Compare
Choose a tag to compare

fix pancakeswap v3

v13.2.0

07 Aug 14:02
19ba1fe
Compare
Choose a tag to compare

adds uniswapV3 getTransaction({ inputTokenPushed: true })

v13.1.0

07 Aug 09:06
6083605
Compare
Choose a tag to compare

sort returning routes (best first)

v13.0.0

06 Aug 16:14
b97adc7
Compare
Choose a tag to compare

v13

New

getPrep

Allows you to perform actions required prior to executing an exchange:

// check if prep is required to facilitate swap/exchange
const preparation = await route.getPrep({ account })

let permit2
if(prep?.transaction) {
  await wallet.sendTransaction(prep.transaction)
} else if (prep?.signature) {
  let signature = wallet.sign(prep.signature)
  permit2 = {...prep.signature.message, signature}
}

const transaction = await route.getTransaction({ account, permit2 })

Breaking Changes

route

before

import { route } from '@depay/web3-exchanges'

let routes = await route({ ... })

now

import Exchanges from '@depay/web3-exchanges'

let routes = await Exchanges.route({ ... })

getTransaction

before

const transaction = await route.getTransaction({ from })

now

const transaction = await route.getTransaction({ account })

find

before

import { find } from '@depay/web3-exchanges'

let exchange = find({ blockchain: 'ethereum', name: 'uniswap_v2' })

now

import Exchanges from '@depay/web3-exchanges'

let exchange = Exchanges.uniswap_v2 || Exchanges.ethereum.uniswap_v2

getTransaction from -> account

before

route.getTransaction({ account: '0x...' })

now

route.getTransaction({ account: '0x...' })

v12.2.14

29 Jun 06:10
44371cc
Compare
Choose a tag to compare

fix Web3Token dependency issue

v12.2.13

27 Jun 14:19
622a57f
Compare
Choose a tag to compare

fix release

v12.2.12

19 Jun 11:27
6a85f3e
Compare
Choose a tag to compare

fix updated dependencies

v12.2.10

14 Jun 08:07
f82c167
Compare
Choose a tag to compare

fix edge-case routing on solana + upgrade dependencies

v12.2.9

19 May 10:39
777e106
Compare
Choose a tag to compare

return a copy of accounts instead of mutating accounts