Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
acf44ea
tezos operations testcases
dbaranov-hoodies Apr 13, 2026
b936b17
Merge branch '1330-testcases-for-staking-2.0' into epic/1325-staking-2.0
dbaranov-hoodies Apr 14, 2026
b19cec4
draft test snapshots
dbaranov-hoodies Apr 16, 2026
62f4b90
staking 2.0 tests
dbaranov-hoodies Apr 20, 2026
be045c5
staking 2.0 impl
dbaranov-hoodies Apr 20, 2026
aaf06ca
Merge branch 'develop' into 1327-clearsign-staking-ops
dbaranov-hoodies Apr 20, 2026
09cc29b
fmt
dbaranov-hoodies Apr 20, 2026
5ed532c
pylint
dbaranov-hoodies Apr 20, 2026
fb1d86c
rm refs to obsolete doc
dbaranov-hoodies Apr 20, 2026
20331f7
unit test coverage and gitignore
dbaranov-hoodies Apr 20, 2026
e48bc39
rm unneeded doc
dbaranov-hoodies Apr 20, 2026
8d0100b
unit tests for operation parser
dbaranov-hoodies Apr 21, 2026
38d616f
unit tests for operation parser
dbaranov-hoodies Apr 21, 2026
71667cd
improved test coverage
dbaranov-hoodies Apr 21, 2026
5317c94
simplified tz_implicit_fee_payer_differs_from_dest
dbaranov-hoodies Apr 21, 2026
ef56602
another test and snapshots updated
dbaranov-hoodies Apr 21, 2026
10dda60
bump pre-commit config
dbaranov-hoodies Apr 21, 2026
110eea9
run pre-commit hook
dbaranov-hoodies Apr 21, 2026
600423e
revert pre-commit formatting issues
dbaranov-hoodies Apr 21, 2026
71fe709
fix: securit audit minor issues
Apr 29, 2026
52a7bbe
feat: update version, snapshots and tests
Apr 29, 2026
e70fdb4
Merge remote-tracking branch 'fork/develop' into 1327-clearsign-staki…
dbaranov-hoodies May 11, 2026
518b99e
resolved merge issue
dbaranov-hoodies May 11, 2026
67f6473
fmt
dbaranov-hoodies May 11, 2026
fbd9995
pr comment
dbaranov-hoodies May 11, 2026
9e28622
updated snapshots
dbaranov-hoodies May 11, 2026
266d96b
fmt
dbaranov-hoodies May 11, 2026
0f41adf
Merge remote-tracking branch 'yldio/fix/sec-audit-report' into 1327-c…
dbaranov-hoodies May 27, 2026
8875a2a
fmt
dbaranov-hoodies May 27, 2026
a6f2587
Merge pull request #24 from yldio/fix/sec-audit-report (B2CA-2691)
tdejoigny-ledger May 27, 2026
c3da291
Merge branch 'develop' into 1327-clearsign-staking-ops
dbaranov-hoodies May 27, 2026
ba00103
Merge pull request #23 from dbaranov-hoodies/1327-clearsign-staking-o…
tdejoigny-ledger May 27, 2026
66f7a73
fix F-01
dbaranov-hoodies Jul 1, 2026
d27aaf4
fix F-02
dbaranov-hoodies Jul 1, 2026
f71f3b4
fix unit tests after F-02
dbaranov-hoodies Jul 1, 2026
0c6efde
eliminated linkage collision
dbaranov-hoodies Jul 1, 2026
cdc3b13
fix F-05
dbaranov-hoodies Jul 1, 2026
09c07a6
flattened display of nested pairs
dbaranov-hoodies Jul 1, 2026
7070879
fix F-03
dbaranov-hoodies Jul 1, 2026
58b8318
fix F-04
dbaranov-hoodies Jul 1, 2026
334bca3
other minor fixes
dbaranov-hoodies Jul 1, 2026
d52fae3
bump version
dbaranov-hoodies Jul 1, 2026
d549907
fmt and standartized glyphs
dbaranov-hoodies Jul 1, 2026
d4d2505
fmt
dbaranov-hoodies Jul 1, 2026
0f18b0d
glyphs
dbaranov-hoodies Jul 1, 2026
0a440ae
snapshots for nanos
dbaranov-hoodies Jul 1, 2026
dfc694c
snapshots
dbaranov-hoodies Jul 1, 2026
69c29f2
apex snapshots
dbaranov-hoodies Jul 1, 2026
f8020c0
apex snapshots
dbaranov-hoodies Jul 1, 2026
af8d9a9
fmt
dbaranov-hoodies Jul 2, 2026
081bfc0
pr comments + snapshots
dbaranov-hoodies Jul 2, 2026
2b37992
pr comments + snapshots
dbaranov-hoodies Jul 2, 2026
94a0464
rm .copilotignore
dbaranov-hoodies Jul 2, 2026
ac5a7f0
rm unnecessary glyphs
dbaranov-hoodies Jul 2, 2026
32a93a1
Merge pull request #26 from dbaranov-hoodies/1420-sec-audit-fixes
cedelavergne-ledger Jul 8, 2026
d08c251
Replace pylint by ruff
cedelavergne-ledger Jul 2, 2026
e949f9f
Align workflows
cedelavergne-ledger Jul 2, 2026
f8a040c
Add clean python config files
cedelavergne-ledger Jul 8, 2026
0a7b10c
Fix scan-build & clang-format
cedelavergne-ledger Jul 8, 2026
b52f907
Apply ruff
cedelavergne-ledger Jul 8, 2026
fb425cf
Add linting commits to ignore revs file
cedelavergne-ledger Jul 8, 2026
c565708
Merge pull request #27 from LedgerHQ/cev/migrate_ruff
cedelavergne-ledger Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ruff
b52f9071f50b11058dd8bd689281c52cbfb6c5f2
1 change: 0 additions & 1 deletion .github/workflows/build_and_functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ jobs:
with:
download_app_binaries_artifact: "app_tezos_binaries"
regenerate_snapshots: ${{ github.event_name == 'workflow_dispatch' && inputs.golden_run == 'Open a PR' }}
test_dir: "tests/standalone"
1 change: 0 additions & 1 deletion .github/workflows/coding_style_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ jobs:
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_lint.yml@v1
with:
source: './app/src'
extensions: 'h,c'
10 changes: 4 additions & 6 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.10'
- run: python -m pip install pre-commit
- run: python -m pip freeze --local
- run: SKIP=clang-format,pylint pre-commit run --all-files
python-version: '3.12'
- uses: pre-commit/action@v3.0.1
1 change: 0 additions & 1 deletion .github/workflows/python_client_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
name: Call Ledger Python linters
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_python_checks.yml@v1
with:
run_linter: pylint
run_type_check: true
src_directory: .
setup_directory: tests/standalone
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ jobs:
job_unit_test:
name: Call Ledger unit_test
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_unit_tests.yml@v1
secrets: inherit
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ ledger/

tags
__pycache__

# .vscode
.vscode/

# tmp
tmp/

# Claude
.claude/
build-unit-tests/
**/.pytest_cache/
**/.mypy_cache/
**/.coverage
Expand Down
48 changes: 32 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,43 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-yaml
- id: check-added-large-files
- repo: local
- id: check-merge-conflict
- id: check-case-conflict

- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
args: ['--ignore-words-list', 'cips', '3sT']

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v21.1.8
hooks:
- id: clang-format
name: clang-format
description: Run `clang-format` on C/C++/CUDA files.
entry: clang-format -i
language: system
files: ^
types: [file, c]
types_or: [c]

- id: pylint
name: pylint
description: Run pylint with custom .pylintrc configuration
entry: pylint
language: system
pass_filenames: false
args: ["--errors-only", "--rcfile=tests/integration/.pylintrc", "tests/standalone/"]
types: [python]
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: v1.7.12.24
hooks:
- id: actionlint
types_or: [yaml]
args: [-shellcheck="" -pyflakes=""]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.20
hooks:
# Run the linter.
- id: ruff-check
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
11 changes: 10 additions & 1 deletion app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ APPNAME = "Tezos Wallet"
# Application version
APPVERSION_M=3
APPVERSION_N=2
APPVERSION_P=0
APPVERSION_P=2
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)

# COMMIT
Expand Down Expand Up @@ -166,3 +166,12 @@ include $(BOLOS_SDK)/Makefile.standard_app
.PHONY: mrproper
mrproper: clean
rm -f .target


.PHONY: app-size-report
app-size-report: $(BIN_TARGETS) $(DBG_TARGETS)
@echo ""
@echo "Finished Concordium Ledger app ($(TARGET_NAME)) → $(BIN_DIR)/app.elf"
$(L)$(GCCPATH)arm-none-eabi-size $(BIN_DIR)/app.elf

default: app-size-report
Binary file removed app/glyphs/icon_crossmark.gif
Binary file not shown.
Binary file removed app/glyphs/icon_dashboard_x.gif
Binary file not shown.
Binary file removed app/glyphs/icon_go_forbid.gif
Binary file not shown.
Binary file removed app/glyphs/icon_go_left.gif
Binary file not shown.
Binary file removed app/glyphs/icon_go_right.gif
Binary file not shown.
Binary file removed app/glyphs/icon_validate_14.gif
Binary file not shown.
Binary file added app/glyphs/tezos_48px.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions app/src/app_format.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Tezos Ledger application - Tezos-specific formatting function set

Copyright 2024 Functori <contact@functori.com>

With code excerpts from:
- Legacy Tezos app, Copyright 2019 Obsidian Systems
- Ledger Blue sample apps, Copyright 2016 Ledger

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#include "format.h"
#include "app_format.h"

bool
tz_mutez_to_string(char *obuf, size_t olen, uint64_t amount)
{
if (!format_fpu64_trimmed(obuf, olen, amount, 6 /*DECIMALS*/)) {
memset(obuf, '\0', olen);
return false;
}

strlcat(obuf, " XTZ", olen);
return true;
}
51 changes: 51 additions & 0 deletions app/src/app_format.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Tezos Ledger application - Tezos-specific formatting function set

Copyright 2024 Functori <contact@functori.com>

With code excerpts from:
- Legacy Tezos app, Copyright 2019 Obsidian Systems
- Ledger Blue sample apps, Copyright 2016 Ledger

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <string.h>

/**
* @brief Formats a fixed-point number, trimming trailing zeros
*
* Provided by the Ledger standard-app library. Declared here because
* the project's own format.h shadows the SDK header on the include
* path; without this prototype, call sites emit an
* implicit-declaration warning (and wrongly assume an int return).
*
* @param dst: output buffer
* @param dst_len: length of the output buffer
* @param value: value to format
* @param decimals: number of decimals
* @return bool: true on success
*/
bool format_fpu64_trimmed(char *dst, size_t dst_len, const uint64_t value,
uint8_t decimals);

/**
* @brief Prints mutez as XTZ
*
* @param obuf: output buffer
* @param olen: length of the output buffer
* @param amount: amount in mutez
* @return bool: true on success
*/
bool tz_mutez_to_string(char *obuf, size_t olen, uint64_t amount);
35 changes: 0 additions & 35 deletions app/src/format.c

This file was deleted.

34 changes: 0 additions & 34 deletions app/src/format.h

This file was deleted.

9 changes: 9 additions & 0 deletions app/src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@
#define TZ_SCREEN_LINES_11PX 5
#endif

/* Application logo used in NBGL flows. Apex only allows 24/32/48 px
* glyphs, so it uses a dedicated 48x48 icon; Stax and Flex keep the
* 64x64 one. */
#ifdef TARGET_APEX_P
#define C_TZ_APP_ICON C_tezos_48px
#else
#define C_TZ_APP_ICON C_tezos
#endif

#include "sign.h"
#include "exception.h"
#include "keys.h"
Expand Down
1 change: 1 addition & 0 deletions app/src/handle_swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <string.h>
#include <swap.h>

#include "format.h"
#include "handle_swap.h"
#include "keys.h"
#include "utils.h"
Expand Down
19 changes: 13 additions & 6 deletions app/src/handler/sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <swap.h>
#endif

#include "../format.h"
#include "app_format.h"
#include "globals.h"
#include "handle_swap.h"
#include "keys.h"
Expand Down Expand Up @@ -343,6 +343,13 @@ refill_error(void)
}
#endif

/* Do not offer blind-signing on a parse error when the user has disabled
the setting; reject immediately, matching the clear-sign flow (F-09).
*/
if (!N_settings.blindsigning) {
TZ_FAIL(EXC_PARSE_ERROR);
}

// clang-format off
#ifdef HAVE_BAGL
tz_ui_stream_init(stream_cb);
Expand Down Expand Up @@ -909,18 +916,18 @@ get_blindsign_type(char *type, size_t type_size)
switch (global.keys.apdu.sign.tag) {
case 0x01:
case 0x11:
memcpy(type,"Block\nproposal", OPERATION_TYPE_STR_LENGTH);
strlcpy(type, "Block\nproposal", type_size);
break;
case 0x03:
memcpy(type,"Manager\noperation", OPERATION_TYPE_STR_LENGTH);
strlcpy(type, "Manager\noperation", type_size);
break;
case 0x02:
case 0x12:
case 0x13:
memcpy(type,"Consensus\noperation", OPERATION_TYPE_STR_LENGTH);
strlcpy(type, "Consensus\noperation", type_size);
break;
case 0x05:
memcpy(type,"Micheline\nexpression", OPERATION_TYPE_STR_LENGTH);
strlcpy(type, "Micheline\nexpression", type_size);
break;
default:
break;
Expand Down Expand Up @@ -1081,7 +1088,7 @@ continue_blindsign_cb(void)
useCaseTagValueList.nbPairs);
useCaseTagValueList.smallCaseForValue = false;
useCaseTagValueList.wrapping = false;
nbgl_useCaseReviewBlindSigning(op, &useCaseTagValueList, &C_tezos,
nbgl_useCaseReviewBlindSigning(op, &useCaseTagValueList, &C_TZ_APP_ICON,
REVIEW("Transaction"), NULL,
SIGN("Transaction"), NULL, reviewChoice);

Expand Down
Loading
Loading