Skip to content

Commit

Permalink
fix(cardano): do not show paths while staking
Browse files Browse the repository at this point in the history
Confirming "Withdraw" and "Delegate" is not accompanied by confirming
derivation paths after the transaction has been already signed.

[no changelog]

(cherry picked from commit 2396e10)
  • Loading branch information
obrusvit authored and mmilata committed Oct 31, 2024
1 parent 3c468fa commit 31d228a
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 224 deletions.
5 changes: 0 additions & 5 deletions core/src/apps/cardano/sign_tx/ordinary_signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ async def _show_tx_init(self) -> None:
self.should_show_details = await layout.show_tx_init(
self.SIGNING_MODE_TITLE
)
elif self.suite_tx_type in (
SuiteTxType.SIMPLE_STAKE_WITHDRAW,
SuiteTxType.SIMPLE_STAKE_DELEGATE,
):
self.should_show_details = True
else:
self.should_show_details = False

Expand Down
8 changes: 5 additions & 3 deletions core/src/apps/cardano/sign_tx/signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,11 +822,13 @@ async def _process_withdrawals(
)
self._validate_withdrawal(withdrawal)
address_bytes = self._derive_withdrawal_address_bytes(withdrawal)
await self._show_if_showing_details(
layout.confirm_withdrawal(
if (
self.should_show_details
or self.suite_tx_type is SuiteTxType.SIMPLE_STAKE_WITHDRAW
):
await layout.confirm_withdrawal(
withdrawal, address_bytes, self.msg.network_id
)
)
withdrawals_dict.add(address_bytes, withdrawal.amount)

def _validate_withdrawal(self, withdrawal: messages.CardanoTxWithdrawal) -> None:
Expand Down
Loading

0 comments on commit 31d228a

Please sign in to comment.