mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-19 16:49:02 +00:00
chore(eckhart): update trace function for firmware components
This commit is contained in:
parent
68337ec628
commit
14d15741f6
@ -105,6 +105,9 @@ impl Component for SelectWordScreen {
|
||||
impl crate::trace::Trace for SelectWordScreen {
|
||||
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||
t.component("SelectWordScreen");
|
||||
t.child("Header", &self.header);
|
||||
t.child("subtitle", &self.description);
|
||||
t.child("Content", &self.menu);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,11 +192,11 @@ impl<'a> Component for ShareWordsScreen<'a> {
|
||||
#[cfg(feature = "ui_debug")]
|
||||
impl<'a> crate::trace::Trace for ShareWordsScreen<'a> {
|
||||
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||
t.component("TextComponent");
|
||||
self.header.trace(t);
|
||||
self.content.trace(t);
|
||||
self.hint.trace(t);
|
||||
self.action_bar.trace(t);
|
||||
t.component("TextScreen");
|
||||
t.child("Header", &self.header);
|
||||
t.child("Content", &self.content);
|
||||
t.child("Hint", &self.hint);
|
||||
t.child("ActionBar", &self.action_bar);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,19 +186,19 @@ where
|
||||
T: AllowedTextContent + crate::trace::Trace,
|
||||
{
|
||||
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||
t.component("TextComponent");
|
||||
t.component("TextScreen");
|
||||
if let Some(header) = self.header.as_ref() {
|
||||
header.trace(t);
|
||||
t.child("Header", header);
|
||||
}
|
||||
if let Some(subtitle) = self.subtitle.as_ref() {
|
||||
subtitle.trace(t);
|
||||
t.child("subtitle", subtitle);
|
||||
}
|
||||
self.content.trace(t);
|
||||
t.child("Content", &self.content);
|
||||
if let Some(hint) = self.hint.as_ref() {
|
||||
hint.trace(t);
|
||||
t.child("Hint", hint);
|
||||
}
|
||||
if let Some(ab) = self.action_bar.as_ref() {
|
||||
ab.trace(t);
|
||||
t.child("ActionBar", ab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -187,5 +187,7 @@ impl Swipable for VerticalMenuScreen {
|
||||
impl crate::trace::Trace for VerticalMenuScreen {
|
||||
fn trace(&self, t: &mut dyn crate::trace::Tracer) {
|
||||
t.component("VerticalMenuScreen");
|
||||
t.child("Header", &self.header);
|
||||
t.child("Menu", &self.menu);
|
||||
}
|
||||
}
|
||||
|
@ -858,7 +858,7 @@ class DebugUI:
|
||||
self.debuglink.press_yes()
|
||||
elif self.debuglink.model is models.T3W1:
|
||||
layout = self.debuglink.read_layout()
|
||||
if "TextComponent" in layout.all_components():
|
||||
if "TextScreen" in layout.all_components():
|
||||
self.debuglink.click(self.debuglink.screen_buttons.ok())
|
||||
else:
|
||||
self.debuglink.press_yes()
|
||||
|
@ -484,7 +484,7 @@ class InputFlowShowAddressQRCode(InputFlowBase):
|
||||
# cancel
|
||||
self.debug.click(self.debug.screen_buttons.cancel())
|
||||
# address
|
||||
self.debug.synchronize_at("TextComponent")
|
||||
self.debug.synchronize_at("TextScreen")
|
||||
self.debug.click(self.debug.screen_buttons.ok())
|
||||
# continue to the app
|
||||
self.debug.press_yes()
|
||||
@ -558,7 +558,7 @@ class InputFlowShowAddressQRCodeCancel(InputFlowBase):
|
||||
# menu
|
||||
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[2])
|
||||
# cancel
|
||||
self.debug.synchronize_at("TextComponent")
|
||||
self.debug.synchronize_at("TextScreen")
|
||||
self.debug.click(self.debug.screen_buttons.ok())
|
||||
|
||||
|
||||
@ -728,7 +728,7 @@ class InputFlowShowMultisigXPUBs(InputFlowBase):
|
||||
# menu
|
||||
assert "VerticalMenu" in self.all_components()
|
||||
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[1])
|
||||
layout = self.debug.synchronize_at("TextComponent")
|
||||
layout = self.debug.synchronize_at("TextScreen")
|
||||
# address details
|
||||
assert "Multisig 2 of 3" in layout.screen_content()
|
||||
assert TR.address_details__derivation_path in layout.screen_content()
|
||||
@ -740,7 +740,7 @@ class InputFlowShowMultisigXPUBs(InputFlowBase):
|
||||
# cancel
|
||||
self.debug.click(self.debug.screen_buttons.cancel())
|
||||
# address
|
||||
layout = self.debug.synchronize_at("TextComponent")
|
||||
layout = self.debug.synchronize_at("TextScreen")
|
||||
self.debug.press_yes()
|
||||
|
||||
|
||||
@ -881,7 +881,7 @@ class InputFlowShowXpubQRCode(InputFlowBase):
|
||||
# menu
|
||||
assert "VerticalMenu" in self.all_components()
|
||||
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[1])
|
||||
layout = self.debug.synchronize_at("TextComponent")
|
||||
layout = self.debug.synchronize_at("TextScreen")
|
||||
# address details
|
||||
assert TR.address_details__derivation_path in layout.screen_content()
|
||||
|
||||
@ -892,7 +892,7 @@ class InputFlowShowXpubQRCode(InputFlowBase):
|
||||
# cancel
|
||||
self.debug.click(self.debug.screen_buttons.cancel())
|
||||
# address
|
||||
layout = self.debug.synchronize_at("TextComponent")
|
||||
layout = self.debug.synchronize_at("TextScreen")
|
||||
self.debug.press_yes()
|
||||
|
||||
|
||||
@ -1241,7 +1241,7 @@ class InputFlowSignTxInformationCancel(InputFlowBase):
|
||||
yield from sign_tx_go_to_info_eckhart(self.client)
|
||||
self.debug.click(self.debug.screen_buttons.menu())
|
||||
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[2])
|
||||
self.debug.synchronize_at("TextComponent")
|
||||
self.debug.synchronize_at("TextScreen")
|
||||
self.debug.click(self.debug.screen_buttons.ok())
|
||||
self.debug.click(self.debug.screen_buttons.ok())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user