|
|
|
@ -1318,6 +1318,38 @@ class InputFlowBip39RecoveryDryRun(InputFlowBase):
|
|
|
|
|
self.debug.press_yes()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class InputFlowErc20Approve(InputFlowBase):
|
|
|
|
|
def __init__(self, client: Client):
|
|
|
|
|
super().__init__(client)
|
|
|
|
|
|
|
|
|
|
def input_flow_tt(self) -> GeneratorType:
|
|
|
|
|
br = yield
|
|
|
|
|
assert br.code == messages.ButtonRequestType.Other
|
|
|
|
|
assert "CONFIRM APPROVE" == self.layout().title()
|
|
|
|
|
assert (
|
|
|
|
|
"Allow 0x123456789012345- 67890123456789012- 34567890 to withdraw up to 100,000,000,000,0"
|
|
|
|
|
in self.layout().text_content()
|
|
|
|
|
)
|
|
|
|
|
self.debug.swipe_up()
|
|
|
|
|
|
|
|
|
|
assert br.code == messages.ButtonRequestType.Other
|
|
|
|
|
assert "CONFIRM APPROVE" == self.layout().title()
|
|
|
|
|
assert "00,000,000 Wei UNKN" in self.layout().text_content()
|
|
|
|
|
self.debug.press_yes()
|
|
|
|
|
|
|
|
|
|
yield
|
|
|
|
|
assert br.code == messages.ButtonRequestType.Other
|
|
|
|
|
assert "CONFIRM FEE" == self.layout().title()
|
|
|
|
|
assert "Gas price: 20 Wei ETH" in self.layout().text_content()
|
|
|
|
|
self.debug.press_yes()
|
|
|
|
|
|
|
|
|
|
yield
|
|
|
|
|
assert br.code == messages.ButtonRequestType.Other
|
|
|
|
|
assert "TOTAL" == self.layout().title()
|
|
|
|
|
assert "Maximum fee: 400 Wei ETH" in self.layout().text_content()
|
|
|
|
|
self.debug.press_yes()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class InputFlowBip39RecoveryDryRunInvalid(InputFlowBase):
|
|
|
|
|
def __init__(self, client: Client):
|
|
|
|
|
super().__init__(client)
|
|
|
|
|