This repository has been archived by the owner on May 28, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/apps: use address_n as description to show_address/show_qr dialogs
- Loading branch information
Showing
9 changed files
with
46 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
from trezor.messages.MoneroAddress import MoneroAddress | ||
|
||
from apps.common.layout import show_address, show_qr | ||
from apps.common.layout import address_n_to_str, show_address, show_qr | ||
from apps.monero import misc | ||
|
||
|
||
async def get_address(ctx, msg): | ||
creds = await misc.get_creds(ctx, msg.address_n, msg.network_type) | ||
|
||
if msg.show_display: | ||
desc = address_n_to_str(msg.address_n) | ||
while True: | ||
if await show_address(ctx, creds.address.decode("ascii"), msg.address_n): | ||
if await show_address(ctx, creds.address.decode(), desc=desc): | ||
break | ||
if await show_qr(ctx, creds.address.decode("ascii")): | ||
if await show_qr(ctx, creds.address.decode(), desc=desc): | ||
break | ||
|
||
return MoneroAddress(address=creds.address) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters