gardens icon indicating copy to clipboard operation
gardens copied to clipboard

Onboarding: when approving the HNY tokens use the price from the oracle

Open 0xGabi opened this issue 3 years ago • 0 comments

Otherwise, sometimes the first transaction revets with a TRANSFER_FROM error. This is because the approved amount of HNY is not enough given the consulted price by the oracle. Instead, use the price from the oracle to check if it's above the $100.

Example tx that failed: https://dashboard.tenderly.co/tx/xdai/0xf1fc8feb1e93381f067066d88f9bf12a24116fc062d03059f38399e10bf1944d

The transaction says the user wants to lock 0.5500390068140331 HNY though input was 0.55 HNY

0xGabi avatar Dec 22 '21 16:12 0xGabi