[ICE: 16] Router can't withdraw ezETH in UI
ekbainova opened this issue · comments
Kate commented
Jeremy Tong commented
const contract_data =
contractData || getContractData(chain_id, contracts!);
const { xERC20, decimals, lockbox } = contract_data || {};
const _amount = parseUnits(data?.amount, decimals);
console.log("[unwrap]", { contract_address: xERC20, amount: _amount });
const contract = new Contract(lockbox, ABI, signer);
const response = await contract.withdraw(_amount);
Something in this logic doesn't account for allowance?
Jeremy Tong commented
Maybe need @just-a-node to weigh in whether we're missing an allowance call
Eddie commented
Yeah, it should check allowance first and call it if needed before wrap/unwrap.
Jeremy Tong commented
Kate commented