bancorprotocol / webapp-v2

https://beta.bancor.network
MIT License
1 stars 2 forks source link

pool token - remove liquidity from old pools #496

Closed ashachaf closed 2 years ago

ashachaf commented 2 years ago

when trying to remove liquidity from old pools, we need to update the process and call the relevant function based on the pool contract version.

how to reproduce:

  1. assuming you have ubt/bnt pool token
  2. try to remove liquidity

what i have noticed: our frontend is trying to trigger the function "removeLiquidity" while the contract supports function "Liquidate"

options:

  1. identify contract version and trigger the relevant function based on that
  2. try simulating "removeLiquidity" -> IF error -> try simulating "liquidate"

old pool contract: https://etherscan.io/address/0xc4bf6dc46537aa77428cd87cfe57d817e76285a2#writeContract newer pool contract: https://etherscan.io/address/0x99576816d7e55bd7c00ab9b867835ae496c3efa9#writeContract