mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-08 09:58:46 +00:00
defs: add blockbook field to build_coins script
This commit is contained in:
parent
3f55a0cff7
commit
9491cd4b9e
@ -34,5 +34,6 @@
|
|||||||
"max_address_length": 95,
|
"max_address_length": 95,
|
||||||
"bitcore": [
|
"bitcore": [
|
||||||
"https://explorer.zen-solutions.io"
|
"https://explorer.zen-solutions.io"
|
||||||
]
|
],
|
||||||
|
"blockbook": []
|
||||||
}
|
}
|
@ -100,6 +100,9 @@ def validate_coin(coin):
|
|||||||
assert check_type(coin['bitcore'], list, empty=True)
|
assert check_type(coin['bitcore'], list, empty=True)
|
||||||
for bc in coin['bitcore']:
|
for bc in coin['bitcore']:
|
||||||
assert not bc.endswith('/')
|
assert not bc.endswith('/')
|
||||||
|
assert check_type(coin['blockbook'], list, empty=True)
|
||||||
|
for bb in coin['blockbook']:
|
||||||
|
assert not bb.endswith('/')
|
||||||
|
|
||||||
|
|
||||||
def validate_icon(icon):
|
def validate_icon(icon):
|
||||||
@ -160,9 +163,9 @@ def convert_icon(icon):
|
|||||||
def process_json(fn):
|
def process_json(fn):
|
||||||
print(os.path.basename(fn), end=' ... ')
|
print(os.path.basename(fn), end=' ... ')
|
||||||
j = json.load(open(fn))
|
j = json.load(open(fn))
|
||||||
|
validate_coin(j)
|
||||||
if BUILD_DEFS:
|
if BUILD_DEFS:
|
||||||
i = Image.open(fn.replace('.json', '.png'))
|
i = Image.open(fn.replace('.json', '.png'))
|
||||||
validate_coin(j)
|
|
||||||
validate_icon(i)
|
validate_icon(i)
|
||||||
ser = serialize(j, convert_icon(i))
|
ser = serialize(j, convert_icon(i))
|
||||||
sig = sign(ser)
|
sig = sign(ser)
|
||||||
|
Loading…
Reference in New Issue
Block a user