firefly icon indicating copy to clipboard operation
firefly copied to clipboard

[Task]: Add mock request for gas estimation

Open brancoder opened this issue 1 year ago • 0 comments

Task description

Currently, when withdrawing "stuck" funds from EVM ("layer 1.5"), Ledger users have to confirm the transaction twice;

  1. to get the gas estimate for the off-ledger request
  2. 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.

brancoder avatar Feb 08 '24 17:02 brancoder