Skip to content

Commit e073ce7

Browse files
committed
fixup! feat(tron): Add support for VoteWitnessContract - core
1 parent ecc9edc commit e073ce7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

core/src/apps/tron/sign_tx.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ async def sign_tx(msg: TronSignTx, keychain: Keychain) -> TronSignature:
5656
if fee_limit > _MAX_FEE_LIMIT:
5757
raise DataError("Tron: fees too high")
5858

59-
# TODO: CONTRACT_TYPES are all the Tron message types. Can we do better than manually writing them again in consts.py?
6059
contract = await call_any(messages.TronContractRequest(), *consts.CONTRACT_TYPES)
6160
raw_contract = await process_contract(contract, fee_limit)
6261

@@ -151,9 +150,9 @@ async def process_contract(
151150
await layout.confirm_withdraw_unfreeze(contract.owner_address)
152151

153152
elif messages.TronVoteWitnessContract.is_type_of(contract):
154-
contract_type = TronRawContractType.VoteWitnessContract
155153
if len(contract.votes) > 9:
156154
raise DataError("Tron: too many votes")
155+
contract_type = TronRawContractType.VoteWitnessContract
157156
await layout.confirm_votes(contract)
158157
else:
159158
raise DataError("Tron: contract type unknown")

0 commit comments

Comments
 (0)