firefly
firefly copied to clipboard
[Task]: Add mock request for gas estimation
Task description
Currently, when withdrawing "stuck" funds from EVM ("layer 1.5"), Ledger users have to confirm the transaction twice;
- to get the gas estimate for the off-ledger request
- to confirm the actual transaction with the correct gas estimation
To improve the UX, and remove the first confirmation on ledger device, create the mock off-ledger request and fetch gas estimation and than use it in the off-ledger request in the actual transaction.
To accomplish this create getMockLayer2WithdrawRequest
function that does similar task as the real getLayer2WithdrawRequest
function but instead of signing the essence bytes just hardcode all 0 for the public key and the signature.