Skip to content

Commit

Permalink
feat: update ledger instructions (#6673)
Browse files Browse the repository at this point in the history
Description
---
Updated the ledger wallet build instructions to ensure it is still
current.

Motivation and Context
---
See above.

How Has This Been Tested?
---
- nanosplus
```
   docker run --rm -it -v ".:/app" -w /app/applications/minotari_ledger_wallet/wallet ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder cargo ledger build stax

    Finished release [optimized] target(s) in 37.50s
   text    data     bss     dec     hex filename
 129488       0   11936  141424   22870 /app/applications/minotari_ledger_wallet/wallet/target/nanosplus/release/minotari_ledger_wallet
Dumping APDU installation file to /app/applications/minotari_ledger_wallet/wallet/target/nanosplus/release/minotari_ledger_wallet.apdu
```
- stax
```
   docker run --rm -it -v ".:/app" -w /app/applications/minotari_ledger_wallet/wallet ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder cargo ledger build stax

       Finished release [optimized] target(s) in 15.47s
   text    data     bss     dec     hex filename
 177552       0   21012  198564   307a4 /app/applications/minotari_ledger_wallet/wallet/target/stax/release/minotari_ledger_wallet
Dumping APDU installation file to /app/applications/minotari_ledger_wallet/wallet/target/stax/release/minotari_ledger_wallet.apdu
``` 

What process can a PR reviewer use to test or verify this change?
---

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
hansieodendaal authored Nov 7, 2024
1 parent e61b5e2 commit 06f7a68
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion applications/minotari_ledger_wallet/wallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,18 @@ For more information see [LedgerCTL](https://github.com/LedgerHQ/ledgerctl).
It is recommended to build the Ledger application via the official `ledger-app-builder` Docker image, as the Docker
image is properly setup, supported and always kept up to date.

**Note:** Before proceeding, manually delete any ledger docker images from Docker Desktop as those will not be updated
automatically:
- Select he _Images_ tab/menu item
- Select the checkbox next to _ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder_ and then press _Delete_.

### Option 1: Using Docker

Ensure Docker Desktop is installed and running on your machine.

The following command has to be run from the root of the Tari repository.

Replace ```{TARGET}``` with the appropriate value (e.g., `nanosplus`, `nanos`, etc.).
Replace ```{TARGET}``` with the appropriate value (e.g., `nanosplus`, `stax`, etc.).

Compiled resources will be found in `applications/minotari_ledger_wallet/wallet/target/{TARGET}/release`

Expand Down
5 changes: 3 additions & 2 deletions applications/minotari_ledger_wallet/wallet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ extern "C" fn sample_main() {
continue;
};

let status = match handle_apdu(&mut comm, ins, &mut offset_ctx) {
let _status = match handle_apdu(&mut comm, ins, &mut offset_ctx) {
Ok(()) => {
comm.reply_ok();
AppSW::Ok
Expand All @@ -239,8 +239,9 @@ extern "C" fn sample_main() {
sw
},
};

#[cfg(any(target_os = "stax", target_os = "flex"))]
show_status_and_home_if_needed(&ins, &status, &mut offset_ctx, &mut home);
show_status_and_home_if_needed(&ins, &_status, &mut offset_ctx, &mut home);
}
}

Expand Down

0 comments on commit 06f7a68

Please sign in to comment.