1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

common/protob: drop a default field declaration

which triggers nanopb bug https://github.com/nanopb/nanopb/issues/487
This commit is contained in:
matejcik 2020-02-06 15:14:51 +01:00
parent 37ab510622
commit c01d04f26e
3 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ message LiskSignTx {
*/
message LiskTransactionCommon {
optional LiskTransactionType type = 1;
optional uint64 amount = 2 [default=0];
optional uint64 amount = 2;
optional uint64 fee = 3;
optional string recipient_id = 4;
optional bytes sender_public_key = 5;

View File

@ -41,7 +41,7 @@ class LiskTransactionCommon(p.MessageType):
def get_fields(cls) -> Dict:
return {
1: ('type', p.EnumType("LiskTransactionType", (0, 1, 2, 3, 4, 5, 6, 7)), 0),
2: ('amount', p.UVarintType, 0), # default=0
2: ('amount', p.UVarintType, 0),
3: ('fee', p.UVarintType, 0),
4: ('recipient_id', p.UnicodeType, 0),
5: ('sender_public_key', p.BytesType, 0),

View File

@ -41,7 +41,7 @@ class LiskTransactionCommon(p.MessageType):
def get_fields(cls) -> Dict:
return {
1: ('type', p.EnumType("LiskTransactionType", (0, 1, 2, 3, 4, 5, 6, 7)), 0),
2: ('amount', p.UVarintType, 0), # default=0
2: ('amount', p.UVarintType, 0),
3: ('fee', p.UVarintType, 0),
4: ('recipient_id', p.UnicodeType, 0),
5: ('sender_public_key', p.BytesType, 0),