Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge on Master #65

Merged
merged 99 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
8734f24
tweak code in sign_transaction.c to fix warnings from scan-build
mehcode Mar 5, 2022
deb6589
chore: add protobufs for HTS, remove pb.c,.h files from repo
mehcode Mar 5, 2022
c8dffd6
add new hedera_format_amount procedure to handle arbitrary decimal sizes
mehcode Mar 5, 2022
1d9a5ad
use nothrow versions of the crypto functions
mehcode Mar 5, 2022
b93ab13
Use explicit_bzero over memset
mehcode Mar 5, 2022
cf2dc12
add support for token transfers and token associate transaction
mehcode Mar 5, 2022
519a5e0
feat: add support for TokenMint and TokenBurn
mehcode Mar 8, 2022
71c8f62
Merge pull request #17 from mehcode/lb-hts
lpascal-ledger Mar 25, 2022
e1e7718
[add] CI trigger on develop (PR included) + NanoX build
lpascal-ledger Mar 25, 2022
99cc7b2
[add] CI Application compilation with NanoS+ SDK
lpascal-ledger Mar 28, 2022
f59a470
fix: use .transfers for TokenTransferList and .value when accessing e…
mehcode Mar 30, 2022
ee109e6
Merge pull request #19 from launchbadge/rl-compile-fix
lpascal-ledger Mar 31, 2022
8472d3c
[bump] v1.1.0
lpascal-ledger Mar 31, 2022
e998959
Merge pull request #18 from LedgerHQ/ci
lpascal-ledger Mar 31, 2022
8202434
feat: add unit tests to prove operation of hedera_format_x
mehcode Apr 20, 2022
6b2aab5
fix: hedera_format_x is off by one, decrement reverse index after ini…
mehcode Apr 20, 2022
1265972
fix: re-add import for string.h to hedera.c
mehcode Apr 20, 2022
6802fd3
fix: use regular memset for clearing amount format buffer
mehcode Apr 20, 2022
e0a27ff
Merge pull request #20 from launchbadge/rl-fix-format
fbeutin-ledger Apr 29, 2022
6e3486f
Bump version to 1.1.1
fbeutin-ledger Apr 29, 2022
c473ab3
fix: sanitize inputs for hedera_format_amount
mehcode May 18, 2022
0059c05
fix: validate decimal values and reject >= 20
mehcode May 18, 2022
bca4024
fix: trim trailing zeros in hedera_format
mehcode May 18, 2022
71e2c2b
Merge pull request #22 from launchbadge/lb-format-safe
lpascal-ledger Jun 27, 2022
f7e6d70
[Bump] Version 1.1.2
lpascal-ledger Jun 27, 2022
2b77a8c
Merge pull request #24 from LedgerHQ/bump
lpascal-ledger Jun 27, 2022
6bd97ed
Remove trailing spaces
fbeutin-ledger Oct 4, 2022
f19805f
Enable CodeQL analysis
fbeutin-ledger Oct 4, 2022
89a00de
Fix display of TokenAssociate flow for LNX and LNS+
fbeutin-ledger Oct 18, 2022
c020c4f
Add TokenMint and TokenBurn flows to the LNX and LNS+ devices
fbeutin-ledger Oct 18, 2022
830c27a
Use standard way of cleaning
fbeutin-ledger Oct 18, 2022
165a527
Fix protobuf version
fbeutin-ledger Oct 18, 2022
4251f73
Remove arbitrary limit in display
fbeutin-ledger Oct 19, 2022
cac50f4
Add ragger tests
fbeutin-ledger Oct 4, 2022
221d036
Enable CI for all pull_request
fbeutin-ledger Oct 18, 2022
b515b0f
Add pytest tests in CI
fbeutin-ledger Oct 19, 2022
ecef38b
Improve PB files generation in Makefile
fbeutin-ledger Oct 25, 2022
9c83df4
Generate python protobuf files dynamically
fbeutin-ledger Oct 25, 2022
8dcd017
Merge pull request #28 from LedgerHQ/wip/fbeutin/code_improvement
fbeutin-ledger Oct 25, 2022
e530f73
Review
fbeutin-ledger Oct 25, 2022
86e9a20
Add safe directory to CodeQL workflow
fbeutin-ledger Oct 25, 2022
4af87db
Merge pull request #31 from LedgerHQ/wip/fbeutin/ragger_tests
fbeutin-ledger Oct 25, 2022
ba045bd
Add --display option in conftest
fbeutin-ledger Nov 2, 2022
92bb1d1
Add verify account test
fbeutin-ledger Nov 2, 2022
0e1e5b8
Add MEMCLEAR macro
fbeutin-ledger Nov 3, 2022
fd0e0e9
wip
fbeutin-ledger Nov 2, 2022
85e2a2c
Merge pull request #33 from LedgerHQ/wip/fbeutin/add_tests
fbeutin-ledger Nov 9, 2022
57e9590
Merge pull request #32 from LedgerHQ/wip/fbeutin/split_ui
fbeutin-ledger Nov 9, 2022
360f5d4
chore: add clang-format configuration and reformat
cacampbell Dec 19, 2022
13bdb48
chore: fix includes, tests, documentation for build and test
cacampbell Dec 20, 2022
395e241
chore: upgrade protos, fix type errors, fix tests
cacampbell Dec 21, 2022
20e7420
refactor: support fee, memo on all transactions, add staking target a…
cacampbell Dec 21, 2022
8ec073e
feat: add token dissociate and tests
cacampbell Dec 21, 2022
b43fac0
feat: add account update transaction
cacampbell Dec 21, 2022
fd98606
Modify python build system to only use tools available in base docker…
fbeutin-ledger Feb 7, 2023
0f410ad
Track protobuf files in conf
fbeutin-ledger Feb 17, 2023
beb75dd
Use centralized conftest
fbeutin-ledger Feb 17, 2023
2bc5c85
Use reusable workflows
fbeutin-ledger Mar 9, 2023
248c22a
Bump version to 1.2.0
fbeutin-ledger Mar 9, 2023
3cfdd31
fix: skip stake to screens when appropriate
Sheng-Long Mar 10, 2023
1f3dbc0
test: fix snapshots for affected screens
Sheng-Long Mar 10, 2023
354d48b
Merge pull request #50 from launchbadge/feat/skipStakeToScreens
fbeutin-ledger Mar 13, 2023
4c61039
fix: fix for crypto updates to work correctly as well
Sheng-Long Mar 13, 2023
f3ae9d8
Merge pull request #51 from launchbadge/fixUpdatesCorrectly
fbeutin-ledger Mar 14, 2023
0122626
Merge pull request #49 from LedgerHQ/fbe/merge_staking
fbeutin-ledger Mar 14, 2023
62e5bb7
Bump version to 1.2.1
fbeutin-ledger Mar 16, 2023
83ce768
Add UI for Stax devices
fbeutin-ledger Nov 3, 2022
b32a7af
Final cleanup
fbeutin-ledger Mar 20, 2023
c691c04
Update for SDK API_LEVEL_8
fbeutin-ledger Apr 12, 2023
cd49002
Review
fbeutin-ledger Apr 12, 2023
1c987e1
Merge pull request #52 from LedgerHQ/fbe/stax_porting_post_stake
fbeutin-ledger Apr 12, 2023
4833576
Bump version to 1.3.0
fbeutin-ledger Apr 12, 2023
be7ff9f
Update snapshots for latest sdk, fonts have changed
fbeutin-ledger May 24, 2023
bab313b
Merge pull request #53 from LedgerHQ/fbe/update_snapshots_for_latest_sdk
fbeutin-ledger May 24, 2023
fe3674f
Improve stax design
fbeutin-ledger May 24, 2023
f3f44f4
Bump version
fbeutin-ledger May 24, 2023
da7bd2e
Merge pull request #54 from LedgerHQ/fbe/improve_stax_UI
fbeutin-ledger May 24, 2023
66d6812
QR code source path is now used explicitly
apaillier-ledger Aug 3, 2023
d71e6c2
Merge pull request #55 from LedgerHQ/fix/apa/explicit_qrcode_source_path
apaillier-ledger Aug 4, 2023
74a1410
Use new 4bpp icon
fbeutin-ledger Sep 1, 2023
3f90b67
Merge pull request #56 from LedgerHQ/fbe/4bpp_icon
fbeutin-ledger Sep 1, 2023
cc3985e
update the test section in the readme
Sheng-Long Nov 8, 2023
6dfdbbe
add section for Ledger's VSCode extension
Sheng-Long Nov 9, 2023
d974bdc
Merge pull request #57 from launchbadge/updateReadmeTest
tdejoigny-ledger Nov 28, 2023
cde593b
[auto]: add PR template
sgliner-ledger Nov 29, 2023
9756908
fix: audit code issues
Sheng-Long Nov 20, 2023
ecd7a38
fix: suggested fixes from ledger
Sheng-Long Nov 29, 2023
34d1da7
fix: change appflag to correct value
Sheng-Long Dec 4, 2023
2036392
fix: add manifest
Sheng-Long Dec 11, 2023
c2827d1
Merge pull request #58 from launchbadge/auditFixes
xchapron-ledger Jan 3, 2024
92961ec
Bump version to 1.4.1
Jan 3, 2024
fd3d9c2
Merge pull request #60 from LedgerHQ/xch/bump-version
xchapron-ledger Jan 3, 2024
39add05
[auto] Update screenshot
Jan 10, 2024
13fba6e
Merge pull request #61 from LedgerHQ/auto-update-screenshots
sgliner-ledger Jan 11, 2024
a29e1cb
[auto] Update screenshot
Feb 21, 2024
5c23b17
Merge pull request #62 from LedgerHQ/auto-update-screenshots
sgliner-ledger Feb 21, 2024
d3b7439
[auto] Update screenshot
sgliner-ledger Feb 27, 2024
36aacca
fix: address buffer overflows in fuzzer
Sheng-Long Feb 20, 2024
ae7aaf4
Merge pull request #63 from launchbadge/auditFixes
cedelavergne-ledger Apr 3, 2024
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
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
Language: Cpp
BasedOnStyle: Google
AlignOperands: true
BreakStringLiterals: true
ColumnLimit: 80
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
FixNamespaceComments: true
IndentCaseLabels: true
IndentWidth: 4
MaxEmptyLinesToKeep: 1
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: true
UseTab: Never
---
Language: Proto
BasedOnStyle: LLVM
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Checklist
<!-- Put an `x` in each box when you have completed the items. -->
- [ ] App update process has been followed <!-- See comment below -->
- [ ] Target branch is `develop` <!-- unless you have a very good reason -->
- [ ] Application version has been bumped <!-- required if your changes are to be deployed -->

<!-- Make sure you followed the process described in https://developers.ledger.com/docs/device-app/deliver/maintenance before opening your Pull Request.
Don't hesitate to contact us directly on Discord if you have any questions ! https://developers.ledger.com/discord -->
34 changes: 34 additions & 0 deletions .github/workflows/check_protobuf_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: check_protobuf_files

on:
workflow_dispatch:
push:
branches:
- master
- develop
pull_request:

jobs:
python_protobuf_check:
name: Check python protobuf files
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest

steps:
- name: Clone
uses: actions/checkout@v3

- name: Save current generation
run: |
cp -r proto proto_current
rm proto/*_pb2.py

- name: Regenerate
run: |
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python make python_pb
cp ./vendor/nanopb/generator/proto/nanopb_pb2.py ./proto

- name: Compare regenerated files with tracked files
run: |
diff proto proto_current
56 changes: 14 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,22 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
branches: [ master, develop ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

steps:
- uses: actions/checkout@v2

- name: Build app
run: |
make clean
make DEBUG=1

- name: Upload app binary
uses: actions/upload-artifact@v2
with:
name: app-debug
path: bin

scan-build:
name: Clang Static Analyzer
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

steps:
- uses: actions/checkout@v2

- name: Build with Clang Static Analyzer
run: |
make clean
scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default
- uses: actions/upload-artifact@v2
if: failure()
with:
name: scan-build
path: scan-build
build_application:
name: Build application using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
with:
upload_app_binaries_artifact: compiled_app_binaries

ragger_tests:
name: Run ragger tests using the reusable workflow
needs: build_application
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
with:
download_app_binaries_artifact: compiled_app_binaries
test_dir: tests
43 changes: 43 additions & 0 deletions .github/workflows/codeql-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "CodeQL"

on:
workflow_dispatch:
push:
branches:
- master
- develop
pull_request:

jobs:
analyse:
name: Analyse
strategy:
matrix:
sdk: [ "$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK" ]
#'cpp' covers C and C++
language: [ 'cpp' ]
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-legacy:latest

steps:
- name: Clone
uses: actions/checkout@v3

- name: Add safe directory
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: security-and-quality

# CodeQL will create the database during the compilation
- name: Build
run: |
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python make BOLOS_SDK=${{ matrix.sdk }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
23 changes: 23 additions & 0 deletions .github/workflows/guidelines_enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Ensure compliance with Ledger guidelines

# This workflow is mandatory in all applications
# It calls a reusable workflow guidelines_enforcer developed by Ledger's internal developer team.
# The successful completion of the reusable workflow is a mandatory step for an app to be available on the Ledger
# application store.
#
# More information on the guidelines can be found in the repository:
# LedgerHQ/ledger-app-workflows/

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
guidelines_enforcer:
name: Call Ledger guidelines_enforcer
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_guidelines_enforcer.yml@v1
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Build files
bin/
dep/
obj/
debug/
src/glyphs.c
src/glyphs.h
build/
src/pb_*

# Editors
.idea

# Protos
proto/*.c
proto/*.h
*.pyc

# Tests
tests/snapshots-tmp/
5 changes: 1 addition & 4 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
"includePath": [
"${workspaceFolder}/src",
"${workspaceFolder}/proto",
"${workspaceFolder}/vendor/ledger-nanopb",
"${workspaceFolder}/vendor/nanos-secure-sdk/include",
"${workspaceFolder}/vendor/nanox-secure-sdk/include",
"${workspaceFolder}/vendor/nanos-secure-sdk/lib_ux/include"
"${workspaceFolder}/vendor/nanopb"
],
"defines": [
"OS_IO_SEPROXYHAL",
Expand Down
18 changes: 14 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@
"python.linting.pylamaEnabled": true,
"python.linting.enabled": true,
"files.associations": {
"*.h": "c",
".clang-tidy": "yaml",
"string_view": "c",
"regex": "c"
"*.h": "c",
".clang-tidy": "yaml",
"string_view": "c",
"regex": "c",
"optional": "c",
"istream": "c",
"ostream": "c",
"system_error": "c",
"array": "c",
"functional": "c",
"tuple": "c",
"type_traits": "c",
"utility": "c"
},
"C_Cpp.dimInactiveRegions": false,
"C_Cpp.errorSquiggles": "enabled",
}
Loading
Loading