Skip to content

Commit e14f707

Browse files
Merge pull request #11 from LedgerHQ/tdj/apex_support
add apex support & remove nanoS support
2 parents 52c3802 + 28d7831 commit e14f707

240 files changed

Lines changed: 65 additions & 57 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/codeql_checks.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,6 @@ on:
1515

1616
jobs:
1717
analyse:
18-
name: Analyse
19-
strategy:
20-
fail-fast: false
21-
matrix:
22-
sdk: ["$NANOX_SDK", "$NANOSP_SDK", "$STAX_SDK", "$FLEX_SDK"]
23-
# 'cpp' covers C and C++
24-
language: ['cpp']
25-
runs-on: ubuntu-latest
26-
container:
27-
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
28-
29-
steps:
30-
- name: Clone
31-
uses: actions/checkout@v4
32-
33-
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v3
35-
with:
36-
languages: ${{ matrix.language }}
37-
queries: security-and-quality
38-
39-
# CodeQL will create the database during the compilation
40-
- name: Build
41-
run: |
42-
make BOLOS_SDK=${{ matrix.sdk }}
43-
44-
- name: Perform CodeQL Analysis
45-
uses: github/codeql-action/analyze@v3
18+
name: Call Ledger CodeQL analysis
19+
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_codeql_checks.yml@v1
20+
secrets: inherit

Makefile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,14 @@ APPNAME = "Kaspa"
2929

3030
# Application version
3131
APPVERSION_M = 1
32-
APPVERSION_N = 1
32+
APPVERSION_N = 2
3333
APPVERSION_P = 0
3434
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"
3535

36-
ifeq ($(TARGET_NAME),TARGET_NANOS)
37-
DEFINES += MAX_INPUT_COUNT=15
38-
DEFINES += MAX_MESSAGE_LEN=120
39-
else ifeq ($(TARGET_NAME),TARGET_STAX)
40-
DEFINES += MAX_INPUT_COUNT=128
41-
DEFINES += MAX_MESSAGE_LEN=200
42-
else
43-
DEFINES += MAX_INPUT_COUNT=128
44-
DEFINES += MAX_MESSAGE_LEN=200
45-
endif
36+
37+
DEFINES += MAX_INPUT_COUNT=128
38+
DEFINES += MAX_MESSAGE_LEN=200
39+
4640

4741
# Application source files
4842
APP_SOURCE_PATH += src
@@ -54,6 +48,7 @@ ICON_NANOX = icons/nanox_kaspa_logo.gif
5448
ICON_NANOSP = icons/nanox_kaspa_logo.gif
5549
ICON_STAX = icons/stax_kaspa_logo_32px.gif
5650
ICON_FLEX = icons/stax_kaspa_logo_40px.gif
51+
ICON_APEX_P = icons/apex_kaspa_logo_32px.png
5752

5853
# Application allowed derivation curves.
5954
# Possibles curves are: secp256k1, secp256r1, ed25519 and bls12381g1

glyphs/apex_app_kaspa_48px.png

2.47 KB

icons/apex_kaspa_logo_32px.png

1.21 KB

ledger_app.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[app]
22
build_directory = "./"
33
sdk = "C"
4-
devices = ["flex", "nanox", "nanos+", "stax"]
4+
devices = ["flex", "nanox", "nanos+", "stax", "apex_p"]
55

66
[tests]
77
unit_directory = "./unit-tests/"

src/ui/menu.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ void ui_menu_main(void);
3232
* Show about submenu (copyright, date).
3333
*/
3434
void ui_menu_about(void);
35+
36+
#if defined(TARGET_STAX) || defined(TARGET_FLEX)
37+
#define ICON_APP_HOME C_stax_app_kaspa_64px
38+
#elif defined(TARGET_APEX_P)
39+
#define ICON_APP_HOME C_apex_app_kaspa_48px
40+
#endif

src/ui/menu_nbgl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static const nbgl_contentInfoList_t infoList = {
5454

5555
void ui_menu_main(void) {
5656
nbgl_useCaseHomeAndSettings(APPNAME,
57-
&C_stax_app_kaspa_64px,
57+
&ICON_APP_HOME,
5858
NULL,
5959
INIT_HOME_PAGE,
6060
NULL,

src/ui/nbgl_display_address.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int ui_display_address() {
8989

9090
nbgl_useCaseAddressReview(g_address,
9191
&pairList,
92-
&C_stax_app_kaspa_64px,
92+
&ICON_APP_HOME,
9393
"Verify KAS address",
9494
NULL,
9595
review_choice);

src/ui/nbgl_display_message.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int ui_display_message() {
9494
// Start review flow
9595
nbgl_useCaseReview(TYPE_MESSAGE,
9696
&pairList,
97-
&C_stax_app_kaspa_64px,
97+
&ICON_APP_HOME,
9898
"Review message",
9999
NULL,
100100
"Sign message?",

src/ui/nbgl_display_transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int ui_display_transaction() {
127127
// Start review flow
128128
nbgl_useCaseReview(TYPE_TRANSACTION,
129129
&pairList,
130-
&C_stax_app_kaspa_64px,
130+
&ICON_APP_HOME,
131131
"Review transaction\nto send KAS",
132132
NULL,
133133
"Sign transaction\nto send KAS",

0 commit comments

Comments
 (0)