From 975c8c61ed01b121e5be4abafdf053d022855155 Mon Sep 17 00:00:00 2001 From: Saleem Rashid Date: Sat, 5 May 2018 22:12:02 +0100 Subject: [PATCH 1/3] Revert "firmware: reintroduce dep into Makefile" This reverts commit aa6405e23c5708e3a774c2359cc0219914ebcb4c. --- firmware/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/Makefile b/firmware/Makefile index 7204ebdc82..a91a09c3f0 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -120,5 +120,5 @@ clean:: endef $(eval $(call GENERATE_CODE,coin_info,coins.json,coin_info.c)) -$(eval $(call GENERATE_CODE,nem_mosaics,../vendor/trezor-common/defs/nem/nem_mosaics.json,nem_mosaics.c)) +$(eval $(call GENERATE_CODE,nem_mosaics,,nem_mosaics.c)) $(eval $(call GENERATE_CODE,bl_data,../bootloader/bootloader.bin)) From 7e407b467e21b7b133a223eaa1b4324dcd592516 Mon Sep 17 00:00:00 2001 From: Saleem Rashid Date: Sat, 5 May 2018 22:12:12 +0100 Subject: [PATCH 2/3] Revert "nem: mosaics are generated from nem_mosaics.json in trezor-common" This reverts commit c4beba839bda036ab068499f334da97f22c2d9db. --- firmware/Makefile | 2 +- firmware/nem_mosaics.json | 57 +++++++++++++++++++++++++++++++++++++++ firmware/nem_mosaics.py | 2 +- 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 firmware/nem_mosaics.json diff --git a/firmware/Makefile b/firmware/Makefile index a91a09c3f0..e760d57f38 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -120,5 +120,5 @@ clean:: endef $(eval $(call GENERATE_CODE,coin_info,coins.json,coin_info.c)) -$(eval $(call GENERATE_CODE,nem_mosaics,,nem_mosaics.c)) +$(eval $(call GENERATE_CODE,nem_mosaics,nem_mosaics.json,nem_mosaics.c)) $(eval $(call GENERATE_CODE,bl_data,../bootloader/bootloader.bin)) diff --git a/firmware/nem_mosaics.json b/firmware/nem_mosaics.json new file mode 100644 index 0000000000..c547e93af1 --- /dev/null +++ b/firmware/nem_mosaics.json @@ -0,0 +1,57 @@ +[ + { + "name": "XEM", + "ticker": " XEM", + "namespace": "nem", + "mosaic": "xem", + "divisibility": 6 + }, + { + "name": "DIMCOIN", + "ticker": " DIM", + "namespace": "dim", + "mosaic": "coin", + "divisibility": 6, + "levy": "MosaicLevy_Percentile", + "fee": 10, + "levy_namespace": "dim", + "levy_mosaic": "coin", + "networks": [ 104 ] + }, + { + "name": "DIM TOKEN", + "ticker": " DIMTOK", + "namespace": "dim", + "mosaic": "token", + "divisibility": 6, + "networks": [ 104 ] + }, + { + "name": "Breeze Token", + "ticker": " BREEZE", + "namespace": "breeze", + "mosaic": "breeze-token", + "divisibility": 0, + "networks": [ 104 ] + }, + { + "name": "PacNEM Game Credits", + "ticker": " PAC:HRT", + "namespace": "pacnem", + "mosaic": "heart", + "divisibility": 0, + "networks": [ 104 ] + }, + { + "name": "PacNEM Score Tokens", + "ticker": " PAC:CHS", + "namespace": "pacnem", + "mosaic": "cheese", + "divisibility": 6, + "levy": "MosaicLevy_Percentile", + "fee": 100, + "levy_namespace": "nem", + "levy_mosaic": "xem", + "networks": [ 104 ] + } +] diff --git a/firmware/nem_mosaics.py b/firmware/nem_mosaics.py index bd02fdbffb..7b9f259996 100755 --- a/firmware/nem_mosaics.py +++ b/firmware/nem_mosaics.py @@ -109,7 +109,7 @@ if __name__ == "__main__": sys.path.insert(0, "protob") import types_pb2 as types - messages = json.load(open("../vendor/trezor-common/defs/nem/nem_mosaics.json")) + messages = json.load(open("nem_mosaics.json")) with open("nem_mosaics.h", "w+") as f: f.write(HEADER_TEMPLATE.format( From 21d147ac47900f577872d4cb54ae671e49e009b6 Mon Sep 17 00:00:00 2001 From: Saleem Rashid Date: Sat, 5 May 2018 22:13:19 +0100 Subject: [PATCH 3/3] nem_mosaics: Add symlink to trezor-common --- firmware/nem_mosaics.json | 58 +-------------------------------------- 1 file changed, 1 insertion(+), 57 deletions(-) mode change 100644 => 120000 firmware/nem_mosaics.json diff --git a/firmware/nem_mosaics.json b/firmware/nem_mosaics.json deleted file mode 100644 index c547e93af1..0000000000 --- a/firmware/nem_mosaics.json +++ /dev/null @@ -1,57 +0,0 @@ -[ - { - "name": "XEM", - "ticker": " XEM", - "namespace": "nem", - "mosaic": "xem", - "divisibility": 6 - }, - { - "name": "DIMCOIN", - "ticker": " DIM", - "namespace": "dim", - "mosaic": "coin", - "divisibility": 6, - "levy": "MosaicLevy_Percentile", - "fee": 10, - "levy_namespace": "dim", - "levy_mosaic": "coin", - "networks": [ 104 ] - }, - { - "name": "DIM TOKEN", - "ticker": " DIMTOK", - "namespace": "dim", - "mosaic": "token", - "divisibility": 6, - "networks": [ 104 ] - }, - { - "name": "Breeze Token", - "ticker": " BREEZE", - "namespace": "breeze", - "mosaic": "breeze-token", - "divisibility": 0, - "networks": [ 104 ] - }, - { - "name": "PacNEM Game Credits", - "ticker": " PAC:HRT", - "namespace": "pacnem", - "mosaic": "heart", - "divisibility": 0, - "networks": [ 104 ] - }, - { - "name": "PacNEM Score Tokens", - "ticker": " PAC:CHS", - "namespace": "pacnem", - "mosaic": "cheese", - "divisibility": 6, - "levy": "MosaicLevy_Percentile", - "fee": 100, - "levy_namespace": "nem", - "levy_mosaic": "xem", - "networks": [ 104 ] - } -] diff --git a/firmware/nem_mosaics.json b/firmware/nem_mosaics.json new file mode 120000 index 0000000000..e0481bfc7a --- /dev/null +++ b/firmware/nem_mosaics.json @@ -0,0 +1 @@ +../vendor/trezor-common/defs/nem/nem_mosaics.json \ No newline at end of file