Skip to content

Commit

Permalink
Add last screen to the address verification.
Browse files Browse the repository at this point in the history
  • Loading branch information
siy committed Sep 18, 2023
1 parent 05b647b commit 7bf644a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "babylon-ledger-app"
version = "0.7.2"
version = "0.7.3"
authors = ["siy"]
edition = "2021"
description = "Radix Babylon"
Expand Down
2 changes: 2 additions & 0 deletions src/crypto/address_verifier.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::ui::single_message::SingleMessage;
use nanos_sdk::io::Comm;
use sbor::bech32::address::Address;
use sbor::bech32::encoder::Bech32;
Expand All @@ -11,5 +12,6 @@ pub fn verify_address(address: Address, network_id: NetworkId, comm: &mut Comm)
address.format(&mut vec, network_id);

info_message(b"Address:", vec.as_slice());
SingleMessage::with_bold("\nDone\n").show_and_wait();
comm.append(vec.as_slice());
}
8 changes: 8 additions & 0 deletions src/ui/single_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ impl<'a> SingleMessage<'a> {
}
}

pub fn with_bold(message: &'a str) -> Self {
SingleMessage {
message,
bold: true,
feature: MessageFeature::Plain,
}
}

pub fn with_right_arrow(message: &'a str) -> Self {
SingleMessage {
message,
Expand Down
2 changes: 1 addition & 1 deletion test/test-get-application-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
print("Testing", "GetAppVersion", instructionCode, end=" ")
response = dongle.exchange(bytes.fromhex(instructionClass + instructionCode + p1 + p2 + dataLength))

assert response.hex() == '000702', "Invalid version\nReceived:" + response.hex()
assert response.hex() == '000703', "Invalid version\nReceived:" + response.hex()
print("Success")

0 comments on commit 7bf644a

Please sign in to comment.