Skip to content

Commit 7944c1a

Browse files
committed
core/monero: add confirmation dialog for unlock_time
1 parent a808cc9 commit 7944c1a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

core/src/apps/monero/layout/confirms.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ async def require_confirm_transaction(ctx, state, tsx_data, network_type):
5454
has_integrated = bool(tsx_data.integrated_indices)
5555
has_payment = bool(tsx_data.payment_id)
5656

57+
if tsx_data.unlock_time != 0:
58+
await _require_confirm_unlock_time(ctx, tsx_data.unlock_time)
59+
5760
for idx, dst in enumerate(outputs):
5861
is_change = change_idx is not None and idx == change_idx
5962
if is_change:
@@ -117,6 +120,14 @@ async def _require_confirm_fee(ctx, fee):
117120
await require_hold_to_confirm(ctx, content, ButtonRequestType.ConfirmOutput)
118121

119122

123+
async def _require_confirm_unlock_time(ctx, unlock_time):
124+
content = Text("Confirm unlock time", ui.ICON_SEND, ui.GREEN)
125+
content.normal("Unlock time for this transaction is set to")
126+
content.bold(str(unlock_time))
127+
content.normal("Continue?")
128+
await require_confirm(ctx, content, ButtonRequestType.SignTx)
129+
130+
120131
class TransactionStep(ui.Component):
121132
def __init__(self, state, info):
122133
self.state = state

0 commit comments

Comments
 (0)