Skip to content

Commit 4caa2e9

Browse files
Merge pull request #157 from LedgerHQ/cev/B2CA-1942_nbgl-on-nano
Nbgl on Nano
2 parents 0121af2 + bf5abea commit 4caa2e9

File tree

84 files changed

+13
-27
lines changed

Some content is hidden

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

84 files changed

+13
-27
lines changed

.github/workflows/python_client_checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Checks on the Python client
22

3-
# This workflow performs some checks on the Python client used by the Boilerplate tests
3+
# This workflow performs some checks on the Python client used by the ragger tests
44
# It is there to help us maintain a level of quality in our codebase and does not have to be kept on forked
55
# applications.
66

@@ -15,7 +15,7 @@ on:
1515

1616
jobs:
1717
lint:
18-
name: Boilerplate client linting
18+
name: Client linting
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Clone

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ repos:
1414
- id: check-case-conflict
1515

1616
- repo: https://github.com/codespell-project/codespell
17-
rev: v2.3.0
17+
rev: v2.4.1
1818
hooks:
1919
- id: codespell
2020

2121
- repo: https://github.com/pre-commit/mirrors-clang-format
22-
rev: v12.0.1
22+
rev: v14.0.6
2323
hooks:
2424
- id: clang-format
2525
types_or: [c]
2626

2727
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
28-
rev: v1.7.6.22
28+
rev: v1.7.7.23
2929
hooks:
3030
- id: actionlint
3131
types_or: [yaml]
@@ -38,7 +38,7 @@ repos:
3838
types_or: [markdown]
3939

4040
- repo: https://github.com/PyCQA/pylint
41-
rev: v3.3.3
41+
rev: v3.3.6
4242
hooks:
4343
- id: pylint
4444
language: system

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ APPNAME = "Boilerplate"
2828
# Application version
2929
APPVERSION_M = 2
3030
APPVERSION_N = 2
31-
APPVERSION_P = 0
31+
APPVERSION_P = 1
3232
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"
3333

3434
# Application source files

src/handler/sign_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ int handler_sign_tx(buffer_t *cdata, uint8_t chunk, bool more) {
134134
}
135135
}
136136
return 0;
137-
}
137+
}

src/swap/handle_get_printable_amount.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ void swap_handle_get_printable_amount(get_printable_amount_parameters_t* params)
4545
PRINTF("Failed to convert amount to uint64_t\n");
4646
}
4747
}
48-
#endif // HAVE_SWAP
48+
#endif // HAVE_SWAP

src/swap/handle_swap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#pragma once
2-
bool swap_check_validity(uint64_t amount, uint64_t fee, const uint8_t *destination);
2+
bool swap_check_validity(uint64_t amount, uint64_t fee, const uint8_t *destination);

src/swap/handle_swap_sign_transaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ bool swap_check_validity(uint64_t amount, uint64_t fee, const uint8_t* destinati
127127
}
128128
return true;
129129
}
130-
#endif // HAVE_SWAP
130+
#endif // HAVE_SWAP
-173 Bytes
103 Bytes
102 Bytes
24 Bytes
48 Bytes
97 Bytes
98 Bytes
103 Bytes
-9 Bytes
102 Bytes
48 Bytes
59 Bytes
59 Bytes
79 Bytes
-134 Bytes
-213 Bytes
-121 Bytes

tests/test_sign_cmd.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from ragger.backend.interface import BackendInterface
44
from ragger.error import ExceptionRAPDU
5-
from ragger.firmware import Firmware
6-
from ragger.navigator import Navigator, NavInsID
75
from ragger.navigator.navigation_scenario import NavigateWithScenario
86

97
from application_client.boilerplate_transaction import Transaction
@@ -51,12 +49,7 @@ def test_sign_tx_short_tx(backend: BackendInterface, scenario_navigator: Navigat
5149
# In this test we send to the device a transaction to trig a blind-signing flow
5250
# The transaction is short and will be sent in one chunk
5351
# We will ensure that the displayed information is correct by using screenshots comparison
54-
def test_sign_tx_short_tx_blind_sign(firmware: Firmware,
55-
backend: BackendInterface,
56-
navigator: Navigator,
57-
scenario_navigator: NavigateWithScenario,
58-
test_name: str,
59-
default_screenshot_path: str) -> None:
52+
def test_sign_tx_short_tx_blind_sign(backend: BackendInterface, scenario_navigator: NavigateWithScenario) -> None:
6053
# Use the app interface instead of raw interface
6154
client = BoilerplateCommandSender(backend)
6255
# The path used for this entire test
@@ -74,18 +67,11 @@ def test_sign_tx_short_tx_blind_sign(firmware: Firmware,
7467
memo="Blind-sign"
7568
).serialize()
7669

77-
# Send the sign device instruction.
78-
valid_instruction = [NavInsID.RIGHT_CLICK] if firmware.is_nano else [NavInsID.USE_CASE_CHOICE_REJECT]
7970
# As it requires on-screen validation, the function is asynchronous.
8071
# It will yield the result when the navigation is done
8172
with client.sign_tx(path=path, transaction=transaction):
82-
navigator.navigate_and_compare(default_screenshot_path,
83-
test_name+"/part1",
84-
valid_instruction,
85-
screen_change_after_last_instruction=False)
86-
8773
# Validate the on-screen request by performing the navigation appropriate for this device
88-
scenario_navigator.review_approve()
74+
scenario_navigator.review_approve_with_warning(warning_path="part1")
8975

9076
# The device as yielded the result, parse it and ensure that the signature is correct
9177
response = client.get_async_response().data

0 commit comments

Comments
 (0)