Skip to content

Commit 4aad18f

Browse files
committed
Fix type
1 parent 471c0cd commit 4aad18f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

client/src/ledger_app_clients/ethereum/tx_auth_7702.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,20 @@ class TxAuth7702(TlvSerializable):
1818
bip32_path: str
1919
delegate: bytes
2020
nonce: int
21-
chain_id: Optional[int] = 0
21+
chain_id: int
2222

2323
def __init__(self,
2424
bip32_path: str,
2525
delegate: bytes,
2626
nonce: int,
27-
chain_id: Optional[int] = 0) -> None:
27+
chain_id: Optional[int]) -> None:
2828
self.bip32_path = bip32_path
2929
self.delegate = delegate
3030
self.nonce = nonce
31-
self.chain_id = chain_id
31+
if chain_id is None:
32+
self.chain_id = 0
33+
else:
34+
self.chain_id = chain_id
3235

3336
def serialize(self) -> bytes:
3437
payload: bytes = self.serialize_field(FieldTag.STRUCT_VERSION, 1)

0 commit comments

Comments
 (0)