trezor-suite icon indicating copy to clipboard operation
trezor-suite copied to clipboard

Show Bitcoin value in Satoshis (sat)

Open MatveiP opened this issue 4 years ago • 20 comments

User's request: "Add an option for viewing as whole btc or as satoshis. So if you have 0.1 btc it would show 10.000.000 satoshis"

  • Use only BTC/Sats (no bits, mBTC, uBTC, ... )

    • Bitcoin units whole names: Bitcoin / Satoshis
    • Next to amounts: BTC / sat
  • [ ] Select in settings (not in Bitcoin card detail) image

  • [ ] Settings should be visible only with activated at least one of the coins - Bitcoin, Bitcoin Testnet, or Bitcoin Regtest

  • [ ] Changing the displayed Bitcoin unit globally by clicking on Bitcoin amount

Location Change units on click
Dashboard/ Bitcoin balance
Accounts/ Listed accounts
  • [ ] On hover displays tooltip drawing

MatveiP avatar Nov 18 '20 10:11 MatveiP

This needs to be synchronized with the firmware change, so we end up with showing the same on both Suite and Trezor - https://github.com/trezor/trezor-firmware/issues/324

prusnak avatar Nov 18 '20 10:11 prusnak

We've decided that we'll add the denomination attribute to SignTx and Trezor will show amounts according to this.

The setting will be stored in the Suite.

prusnak avatar Nov 23 '20 11:11 prusnak

Would be good to have a few more choices there, like mBTC and µBTC. Satoshis still seem to be too small of a value, given the current Bitcoin price.

karolsw3 avatar Jan 15 '21 11:01 karolsw3

This feature has been merged into the firmware via https://github.com/trezor/trezor-firmware/pull/1369 (BTC, mBTC, uBTC and sat denominations) and will be released during the next round of firmware updates on 10th of February.

That means we can continue with the next steps and implement this in Connect and Suite.

prusnak avatar Jan 22 '21 13:01 prusnak

@dahaca I'm sorry for the confusion.. Please use sat instead of Sats to be consistent with Trezor device and fee expression. Thank you

hynek-jina avatar Jul 20 '22 09:07 hynek-jina

QA NOK When I first open the app or the web Suite, in the settings there is no "default" settings for this feature, so the drop-down menu is just blank.

This also affects https://github.com/trezor/trezor-suite/issues/5590

image

Info:

  • Suite version: desktop 22.8.0 (4692fffe7467553f430d248c630b74f6aad6ad58)
  • Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.8.0 Chrome/100.0.4896.160 Electron/18.3.5 Safari/537.36
  • OS: Linux x86_64
  • Screen: 1920x1080
  • Device: model T 2.5.1 regular (revision 85a26d2c9593bcdf858c2d718d79951ca927a0c3)
  • Transport: bridge 2.0.31

STew790 avatar Aug 02 '22 11:08 STew790

QA NOK

when i fill in sats in Send dialogue Suite thinks its whole Bitcoin

image

Info:

  • Suite version: desktop 22.8.1 (503b472935dec8a9c07aac5eef5ba43f86780a38)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.8.1 Chrome/100.0.4896.160 Electron/18.3.5 Safari/537.36
  • OS: MacIntel
  • Screen: 1680x1050
  • Device: model T 2.5.1 Universal (revision 85a26d2c9593bcdf858c2d718d79951ca927a0c3)
  • Transport: bridge 2.0.31

bosomt avatar Aug 03 '22 08:08 bosomt

Just want to add that the Send modal actually shows it correctly.

image

Info:

  • Suite version: desktop 22.8.1 (503b472935dec8a9c07aac5eef5ba43f86780a38)
  • Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.8.1 Chrome/100.0.4896.160 Electron/18.3.5 Safari/537.36
  • OS: Linux x86_64
  • Screen: 1920x1080
  • Device: model T 2.5.1 Universal (revision 85a26d2c9593bcdf858c2d718d79951ca927a0c3)
  • Transport: bridge 2.0.31

STew790 avatar Aug 03 '22 08:08 STew790

Other coins also show sats as unit in send form. All except Ethereum, Ethereum Testnet, Ethereum Classic and Cardano. So for example Cardano Testnet, XRP, ... are wrong. image

matejkriz avatar Aug 04 '22 14:08 matejkriz

QA NOK When I first open the app or the web Suite, in the settings there is no "default" settings for this feature, so the drop-down menu is just blank.

This also affects #5590

image

@STew790 How to reproduce this one? I'm not able to reproduce it in 22.8.1.

matejkriz avatar Aug 04 '22 14:08 matejkriz

How to reproduce this one?

Was a problem with migrations, fixed, will be in the PR

dahaca avatar Aug 05 '22 12:08 dahaca

one more feature to test: bitcoin URI handlers

matejkriz avatar Aug 05 '22 14:08 matejkriz

QA NOK I tried the bitcoin URI send form fillout and, unfortunately, it fills out as Bitcoin and not as Satoshis. Also, throws out an error as shown in the screenshot.

image

Info:

  • Suite version: web 22.9.0 (2cbf18207db1f174d7fe9e08cc937039c09c6064)
  • Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36
  • OS: Linux x86_64
  • Screen: 1920x1080
  • Device: model T 2.5.1 Universal (revision 85a26d2c9593bcdf858c2d718d79951ca927a0c3)
  • Transport: bridge 2.0.31

STew790 avatar Aug 05 '22 15:08 STew790

Just testing 22.8.1 release candidate and left Satoshis enabled. When i try to send all from accounts of coins like VTC or LTC Suite gets confused, nor sure if you already know about it.

image image

Info:

  • Suite version: desktop 22.8.1 (4ddcf5c6b05fefda0425919434a936e534482a1e)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.8.1 Chrome/100.0.4896.160 Electron/18.3.5 Safari/537.36
  • OS: MacIntel
  • Screen: 1680x1050
  • Device: model T 2.5.2 Universal (revision 0d87b55ba4fed7eecc72bf2a94ee473830b095e9)
  • Transport: bridge 2.0.31

bosomt avatar Aug 09 '22 09:08 bosomt

One more bug that I am fixing at the moment happens during this flow:

  • BTC is the active unit
  • User navigates to SEND and enters a valid amount
  • User leaves the form and switches the units to SAT
  • User returns to the form
  • The amount is filled with the previously entered one, not in line with the currently selected unit
  • Amount field likely has an error

dahaca avatar Aug 09 '22 11:08 dahaca

QA OK

checked: https://github.com/trezor/trezor-suite/issues/3004#issuecomment-1209114134

QA NOK

bitcoin uri still fills out BTC to sats field, no sure if its somehow fixable

image

Info:

  • Suite version: desktop 22.9.0 (4d282475dccf0c52a0094e9b024fce5ad7c54e53)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.9.0 Chrome/100.0.4896.160 Electron/18.3.5 Safari/537.36
  • OS: MacIntel
  • Screen: 1680x1050
  • Device: model 1 1.11.2 Universal (revision 0d87b55ba4fed7eecc72bf2a94ee473830b095e9)
  • Transport: bridge 2.0.31

bosomt avatar Aug 11 '22 08:08 bosomt

Found one discrepancy in transaction history export. Even you change Suite from Bitcoin to sats transaction history is still exported in Bitcoin values.

Info:

Suite version: desktop 22.9.0 (https://github.com/trezor/trezor-suite/commit/4d282475dccf0c52a0094e9b024fce5ad7c54e53)
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.9.0 Chrome/100.0.4896.160 Electron/18.3.5 Safari/537.36
OS: MacIntel
Screen: 1680x1050
Device: model 1 1.11.2 Universal (revision 0d87b55ba4fed7eecc72bf2a94ee473830b095e9)
Transport: bridge 2.0.31

bosomt avatar Aug 11 '22 08:08 bosomt

EDIT: QA OK

  • Suite version: web 22.9.0 (0e8641eddc9e9915056ad7959f2759e477485656)
  • Device: model T 2.5.3 Universal (revision eb182b923f39111d9307a25a86a49d395c6611b0)
  • Transport: bridge 2.0.31

QA NOK

It's not possible to bump or finalize BTC or TEST transactions when sats are enabled Transaction signing error: Parameter "amount" has invalid value "0.00007624". Integer representation expected.

image

Info:

  • Suite version: web 22.9.0 (4d282475dccf0c52a0094e9b024fce5ad7c54e53)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:103.0) Gecko/20100101 Firefox/103.0
  • OS: MacIntel
  • Screen: 1680x1050
  • Device: model 1 1.11.2 Universal (revision 0d87b55ba4fed7eecc72bf2a94ee473830b095e9)
  • Transport: bridge 2.0.32

bosomt avatar Aug 11 '22 10:08 bosomt

Found one discrepancy in transaction history export. Even you change Suite from Bitcoin to sats transaction history is still exported in Bitcoin values.

@bosomt That is not part of this issue, but follow-up https://github.com/trezor/trezor-suite/issues/5829

matejkriz avatar Aug 11 '22 14:08 matejkriz

@matejkriz thank you ! haven't noticed it before...

bosomt avatar Aug 11 '22 14:08 bosomt

QA OK

I have not found any issue. If we find one we will create separate issue.

Info:

  • Suite version: web 22.9.0 (0e8641eddc9e9915056ad7959f2759e477485656)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:104.0) Gecko/20100101 Firefox/104.0
  • OS: MacIntel
  • Screen: 1680x1050
  • Device: model T 2.5.3 Universal (revision eb182b923f39111d9307a25a86a49d395c6611b0)
  • Transport: bridge 2.0.31

bosomt avatar Aug 31 '22 09:08 bosomt