BitBoxSwiss / bitbox02-firmware

Firmware code of the BitBox02 hardware wallet
https://bitbox.swiss/bitbox02
Apache License 2.0
216 stars 80 forks source link

eth tx verification: show same address as in pc #1153

Open asi345 opened 7 months ago

asi345 commented 7 months ago

ETH addresses can be encoded all lowercase, all uppercase, or mixed case (https://eips.ethereum.org/EIPS/eip-55). We always show the address in mixed case when verifying a tx, but some exchanges and other wallets don't. If a user copies an address in lowercase or uppercase, the user is confused why the bb02 display doesn't match the wallet display.

The bb02 should show it in the same way the user entered the address.

That is why ETH signing requests are extended with a new string field: "address". This field hold the raw recipient address that the user enters. After the recipient hex address is also derived from the request and it is approved, this derived address is compared with the raw provided address(case-insensitive). If they match, transaction continues and bb02 shows the raw provided address(same as in pc) in the transaction confirmation scree.