1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00
Commit Graph

1068 Commits

Author SHA1 Message Date
matejcik
ab62f5db6f flake8: delete trailing lines 2018-04-10 16:01:22 +02:00
matejcik
928498c666 coins: wrap JSON errors in an ImportError 2018-04-10 15:58:34 +02:00
matejcik
bd43363b1c coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
matejcik
c4f38fd740 trezor-common: update to version with Decred Testnet API URL 2018-04-10 15:58:34 +02:00
matejcik
4b0e057d4e docs: contributing info for the new submodule 2018-04-10 15:58:34 +02:00
matejcik
b82551ce0d travis: check that generated protobuf messages are identical to the commited ones 2018-04-10 15:58:34 +02:00
matejcik
d7fb363ffb build: take an optional argument specifying protobuf output directory 2018-04-10 15:58:34 +02:00
matejcik
40ff849228 flake8: make flake8 better and more strict
this removes some unused variables and also catches a couple bugs
2018-04-10 15:58:34 +02:00
matejcik
e3d59eedfb tx_api: drop completely unused Smartbit API 2018-04-10 15:58:34 +02:00
matejcik
71129fffbf travis: run flake8 as one command
also exclude vendor subdir over which we possibly don't have control
2018-04-10 15:58:34 +02:00
matejcik
04326749f4 build: generate protobuf messages in tempdir
This way, if the process fails, the files in trezorlib/messages remain
untouched. This is important because "setup.py build" now runs the
build_protobuf tool, and it can easily fail on a system without protoc.
2018-04-10 15:58:34 +02:00
matejcik
3f35475e7b build: preprocess messages and assets in setup.py
This enforces presence of the trezor-common submodule, copies coins.json to the
package directory (from where we can install it with bdist) and if possible,
regenerates protobuf messages.

That currently doesn't work on Windows, because it's a shell script. Also it
relies on presence of `protoc` protobuf compiler. Therefore the regeneration
step is optional and converted protobuf messages should still be commited to
this repo.

coins.json, OTOH, is gitignored in trezorlib, and must be copied from
trezor-common every time. This works because sdist includes the vendor
directory.
2018-04-10 15:58:34 +02:00
matejcik
16b0727b4b build: include tools in sdist 2018-04-10 15:58:34 +02:00
matejcik
ae0cb0478e build: use trezor-common from submodule 2018-04-10 15:58:34 +02:00
matejcik
c844430363 build: include relevant vendored files in sdist 2018-04-10 15:58:34 +02:00
matejcik
f96dfe5dba add submodule trezor-common 2018-04-10 15:58:34 +02:00
Tomas Susanka
edbcd2012d tests/device/nem: multisig tests 2018-04-10 14:50:01 +02:00
Tomas Susanka
891865f948 tests/device/nem: tests fixes due to layout changes 2018-04-09 13:40:23 +02:00
Pavol Rusnak
24dc617f36
disable bcash tests for T2 2018-04-05 17:03:36 +02:00
Jochen Hoenicke
e43a62cb03 Updated unit tests for cashaddr. (#195) 2018-04-05 11:20:08 +02:00
Tomas Susanka
0631a0a5b1 tests/device/nem: transfer multiple mosaics 2018-04-04 15:18:21 +02:00
Tomas Susanka
51d9a809bc tests: pytest xfail is used instead of skipping 2018-04-04 13:18:22 +02:00
matejcik
a4306a00fa tools: add deserialize_tx.py to decode contents of hex-encoded signed BTC transaction.
This code will probably come in handy if/when we implement a microwallet.
2018-04-03 19:24:31 +02:00
matejcik
020b298020 tests/device: autodetect Trezor version and skip the appropriate tests automatically 2018-04-03 18:56:18 +02:00
Pavol Rusnak
12c58ce3cc transport: inject info about udev rules into io/os exception 2018-04-03 18:27:38 +02:00
Tomas Susanka
7c08800cb9 tests/device/nem: test files seperated; swiping for t2 2018-04-03 14:16:49 +02:00
Tomas Susanka
6935c0ee7d tests/device/nem: importance transfer test 2018-03-29 12:43:54 +02:00
Tomas Susanka
5ce254c535 tests/device/nem: aggregate modification test 2018-03-29 11:46:29 +02:00
Tomas Susanka
326056b968 tests/device/nem: mosaic supply change test; const fixes 2018-03-29 10:52:18 +02:00
Tomas Susanka
48cb8d0216 tests/device/nem: mosaic creation levy test 2018-03-29 10:41:49 +02:00
Tomas Susanka
3248b47e5b tests/device/nem: mosaic creation properties test 2018-03-29 10:41:49 +02:00
Tomas Susanka
0e108a662f tests/device/nem: mosaic_creation basic test 2018-03-29 10:41:49 +02:00
Tomas Susanka
ac51c73365 tests/device/nem: provision_namespace test 2018-03-29 10:41:49 +02:00
matejcik
e79026cb4b trezorlib: fix client ctors for transport arg
This restores the API before PR #241, and makes sure that ctor signature doesn't
depend on mixin order.
(Mixins will be going away shortly anyway.)
2018-03-28 15:57:50 +02:00
Roman Zeyde
bd3d014dd4 Allow specifying 'state' at ProtocolMixin c-tor 2018-03-28 14:31:20 +02:00
Tomas Susanka
5d0b5632b3 nem: missing return fix 2018-03-27 16:41:13 +02:00
Tomas Susanka
c4dc6e2c93 tests/device/nem: constants used 2018-03-27 16:06:49 +02:00
Jan Pochyla
8d296ed4c1 tests: add T2 RecoveryDevice test 2018-03-22 15:28:04 +01:00
Tomas Susanka
e435175d79 tests/device: nem encrypted payload doesn't ask for confirmation 2018-03-21 15:16:09 +01:00
Tomas Susanka
333343224b tests/device: typos in nem tests 2018-03-21 15:16:09 +01:00
matejcik
e4a2946398 nem: fill out address_n properly for nem_sign_tx 2018-03-21 14:56:27 +01:00
Tomas Susanka
93dbdb14c1 tests/device: nem encrypted payload 2018-03-21 13:29:23 +01:00
Jan Pochyla
71dd003637 tests: add T2 ResetDevice test 2018-03-20 16:47:11 +01:00
Jan Pochyla
3e65761395 debuglink: add new fields 2018-03-20 16:47:11 +01:00
matejcik
4b59d9191c flake8: fix complaints in new code.
One of these days I'm going to automate this check.
2018-03-20 13:29:33 +01:00
matejcik
7e1d962799 trezorlib: sign_tx only downloads non-segwit transactions.
This should achieve the same goal as PR #193.
In addition, this refactor removes usage of `_extend_` methods
and the unnecessary `_fill_missing` calls.
2018-03-20 13:10:08 +01:00
matejcik
afb3e04c24 trezorlib/protobuf.py: return BytesType from wire as bytes, not bytearray.
This makes more sense, because bytes are immutable and callers have no business
mutating structures from the wire anyway.

Incidentally this should fix issue #236, where rlp library would treat
bytes and bytearrays differently and produce invalid structures in our usecase.

Also very minor nitpicks and code cleanup for neater typing.
2018-03-20 13:00:36 +01:00
matejcik
f87d931ce7 trezorlib: factor out NEM to a separate module 2018-03-20 12:39:23 +01:00
Tomas Susanka
a5e3d50fb0 tests/device: nem bytes assert 2018-03-19 14:52:50 +01:00
Saleem Rashid
4ec8b38d4a pb2py: Use logging module instead of print 2018-03-19 13:48:55 +01:00