mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 06:18:07 +00:00
refactor(core/ui): make request_number signature the same in TT and TR
This commit is contained in:
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…
Reference in New Issue
Block a user