refactor(core/ui): make request_number signature the same in TT and TR

pull/3592/head
matejcik 3 months ago committed by matejcik
parent 29863f84ca
commit 99457bbcb0

@ -157,7 +157,7 @@ where
impl ComponentMsgObj for NumberInput {
fn msg_try_into_obj(&self, msg: Self::Msg) -> Result<Obj, Error> {
msg.try_into()
(CONFIRMED.as_obj(), msg.try_into()?).try_into()
}
}

@ -161,7 +161,15 @@ async def _prompt_number(
ButtonRequestType.ResetDevice,
)
return int(result)
if __debug__:
if isinstance(result, str):
# debuglink for TR sends a string representing the number
result = CONFIRMED, int(result)
status, value = result
assert status is CONFIRMED
assert isinstance(value, int)
return value
async def slip39_prompt_threshold(

Loading…
Cancel
Save