1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-02 20:48:30 +00:00
Commit Graph

7223 Commits

Author SHA1 Message Date
matejcik
8906ebf92c coin_info: sort keys after deduplication
this ensures that key order is stable in cases where some ERC20 tokens
are sorted with identical keys which change later

i.e.: Two tokens with erc20:eth:REP keys are sorted based on the order
of reading them from disk. Previously, at most one such key would be
left in data so their mutual order wouldn't matter. Now, one of them can
be deprecated and get a ":deprecated" suffix. Depending on the load
order, this could be the first or the second of them, so the resulting
sort would not be stable.
To fix that, we do key deduplication first and sorting second.

To prevent further problems like this, we also sort glob results.
2018-12-03 16:47:13 +01:00
Manohar Peswani
b407dd886e updated helloworld.py (#343) 2018-12-03 16:09:52 +01:00
mattt21
22f5ba1dfe defs: add NIX 2018-12-02 12:43:11 +01:00
Jan Pochyla
9da2c9502e ui: properly taint child components 2018-11-30 16:10:47 +01:00
Jan Pochyla
25788e90e8 tools: regenerate templates 2018-11-30 16:10:47 +01:00
Jan Pochyla
75027b0579 vendor: bump trezor-common 2018-11-30 16:10:47 +01:00
Tomas Susanka
f3c401a5c9 wallet: do not validate script type in sign message function 2018-11-30 15:56:30 +01:00
Andrew Kozlik
7079277fb0 Fix counter initialization bug in rfc7539_init(). Fix const correctness in rfc7539.h and chacha20poly1305.h. (#188) 2018-11-30 15:17:52 +01:00
Pavol Rusnak
30bcad5174
defs: regenerate coins_details.json 2018-11-30 13:43:20 +01:00
Pavol Rusnak
eaa3efa228
defs: rename RSK to RBTC in support.json 2018-11-30 13:42:47 +01:00
Ilan
047e3e7f21 Update RSK Network shortcut (#243) 2018-11-30 13:34:37 +01:00
Tomas Susanka
d5fb2a477a eth/verify: path is not validated; improve invalid signature handling
Ethereum's verify_function takes an actual address as an argument not a
derivation path. So any path validation does not make any sense.

Also, if the verify_recover function raises an exception, it gets
propogated as a DataError (additional fix for #422).
2018-11-30 13:32:13 +01:00
matejcik
71528b5260 coins_details: add a bunch of overrides for network names, regenerate 2018-11-29 16:42:12 +01:00
matejcik
2f198f0b46 coins_details: hide testnet and deprecated tokens 2018-11-29 16:39:31 +01:00
matejcik
5f59b5100b support: release tokens for 2.0.10 2018-11-29 15:59:59 +01:00
matejcik
91923097de support: change handling of "soon" coins
"soon" coins that are not tokens will not be included in build
2018-11-29 15:59:18 +01:00
matejcik
7eb479c4f3 support: regenerate duplicates list 2018-11-29 15:46:26 +01:00
matejcik
e8d38b9090 defs: allow USDT ERC20 token (collides with USDT OMNI token) 2018-11-29 15:43:49 +01:00
matejcik
b02390f560 tokens: new tokens checkout 2018-11-29 15:43:30 +01:00
matejcik
e51aa9b3cd tools: new rules for ERC20 duplicates
We now allow duplicates if they're their own testnets, or if they're
deprecated. Also some checks are smarter.
2018-11-29 15:42:49 +01:00
martin
dd02e2bf83 Update ZEC support
Actually after sapling, ZEC is supported only by newer firmware versions
2018-11-28 12:37:55 +01:00
Tomas Susanka
47790634ae
Merge pull request #426 from ph4r05/pr/xmr-payment-id-fix
xmr: payment ID computation fix
2018-11-28 09:37:47 +01:00
Dusan Klinec
f810230e71
xmr: payment ID computation fix
- typo in tail differentiating tag caused invalid short payment id encryption. was 0x8B, should have been 0x8D
- 69b646494b/src/device/device_default.cpp (L39)
- 69b646494b/src/device/device_default.cpp (L287)
2018-11-27 22:21:40 +01:00
David
638f401172 Add wallet link for Bitcore BTX 2018-11-27 17:23:53 +01:00
Jan Pochyla
dd5eba8da9 ui: reduce flicker in buttons, text, and pin dialog 2018-11-27 14:49:59 +01:00
Jan Pochyla
faa665a80b unix: fix SDL issues in MacOS Mojave 2018-11-27 14:49:59 +01:00
Tibor Arpas
ea4610afd2 Fixing make test_emu in some environments. 2018-11-27 14:42:49 +01:00
matejcik
b6c44e6985 changelog: update for 0.11.0 2018-11-26 18:42:02 +01:00
matejcik
db1a5adee7 device_tests: style 2018-11-26 17:02:00 +01:00
Tomas Susanka
0d01298f71 tests/eth: add invalid signature test for verify 2018-11-26 16:30:34 +01:00
Tomas Susanka
8213fee15b eth: replace fw error with data error in verify function
closes #422
2018-11-26 16:28:40 +01:00
matejcik
ab461548ce tools: update encfs_aes_getpass, add version check 2018-11-26 16:07:22 +01:00
matejcik
4982fd1cf5 client: wrap clear_session in a session
because it's a different kind of session...
2018-11-26 16:06:56 +01:00
matejcik
c7c5653231 trezorlib: bump version (not releasing yet though) 2018-11-26 16:02:19 +01:00
matejcik
1ded85c746 tests/unit_tests: update test_transport 2018-11-26 15:58:19 +01:00
matejcik
c95489513e tools/encfs_aes_getpass: blackify 2018-11-26 15:30:42 +01:00
matejcik
36a81fd9e7 trezorlib: update CallException to match the old one
which is now TrezorFailure
2018-11-26 15:30:42 +01:00
matejcik
1f2db3666b ui: smarter ClickUI prompts only once
This also fixes #331 by moving the PIN matrix from trezorctl into the UI
class
2018-11-26 15:30:42 +01:00
matejcik
ecf62ac43c trezorctl: allow beta firmware 2018-11-26 15:30:42 +01:00
matejcik
eb50d54ec2 device: add reasonable defaults for reset/recovery 2018-11-26 15:30:42 +01:00
matejcik
40eaa1fa36 transport/hid: reload serial when closing
because device.wipe() causes the device to change serial, which breaks
the connection unnecessarily.
2018-11-26 15:30:42 +01:00
matejcik
f3a13f50e0 transport/hid: check serial number when opening device
This fixes the problem where the user disconnects a device, connects a
different one, and the library doesn't notice because opening the same
HID path worked fine. (see https://github.com/spesmilo/electrum/issues/4806 )
2018-11-26 15:30:42 +01:00
matejcik
082adfd15d transport: derive TransportException from TrezorException 2018-11-26 15:30:42 +01:00
matejcik
69ef1f0acd transport: cleaner Transport list instantiation
Previously if an import of a dependent module (usb1, hid) failed, import
of the whole transport module would fail. This was resolved by catching
ImportErrors in the all_transports method.

This had two drawbacks:
- if something other than ImportError happened - e.g., libusb would
raise OSError if it couldn't find libusb.so - all_transports would crash
anyway
- at the same time, if a legitimately needed dependency
(typing_extensions) was missing, this would be masked by the ImportError
handling.

Instead, we unconditionally import the modules, and inside each one,
wrap dependencies in a try-except.

As an added benefit, it is now possible to disable a transport just by
setting SomeTransport.ENABLED = False
2018-11-26 15:30:42 +01:00
matejcik
f04458d6ea client: allow canceling pin/passphrase entry 2018-11-26 15:30:42 +01:00
matejcik
11e56a7e1b client: clean up constants 2018-11-26 15:30:42 +01:00
matejcik
3dda5e6534 client: proto -> messages 2018-11-26 15:30:42 +01:00
matejcik
4f9bdff564 client: simplify MovedTo now that we only need it to raise an error
this also removes most of client's imports, which will FINALLY let us
import client where it is needed without circular dependencies
2018-11-26 15:30:42 +01:00
matejcik
ef46bd38ef client: finish the move away from mixins
move all methods that are still relevant to TrezorClient (originally
BaseClient)

modify ProtocolMixin to be a compatibility shim

modify BaseClient to be a compatibility shim with a proxy to original
actual TrezorClient - this prevents early failures in Electrum for long
enough to show an error message
2018-11-26 15:30:42 +01:00
matejcik
f3f521b028 client: convert generic classname-based dispatch to a static list
Only a limited number of messages should be dispatched to handlers
that can be inserted anywhere in the protocol flow. Having a fixed list
of interjecting handlers makes this clearer and prevents hard-to-find
bugs.
2018-11-26 15:30:42 +01:00