Skip to content

Commit

Permalink
Merge pull request #27 from LedgerHQ/fix
Browse files Browse the repository at this point in the history
[fix] NanoS SDK has a unique section
  • Loading branch information
lpascal-ledger committed Mar 26, 2024
2 parents 9f0d05e + 25e58b0 commit 64e1a82
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.6.3] - 2024-03-26

### Fixed

- ledger-binary: NanoS SDK has a unique `target_version` section.


## [0.6.2] - 2024-03-26

### Fixed
Expand Down
1 change: 1 addition & 0 deletions src/ledgered/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Sections(Jsonable):
target: Optional[str] = None
target_id: Optional[str] = None
target_name: Optional[str] = None
target_version: Optional[str] = None

def __str__(self) -> str:
return "\n".join(f"{key} {value}" for key, value in sorted(asdict(self).items()))
Expand Down
6 changes: 5 additions & 1 deletion tests/unit/test_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,25 @@ def setUp(self):
"sdk_version": "sdk_version",
"target": "target",
"target_id": "target_id",
"target_name": "target_name"
"target_name": "target_name",
"target_version": "target_version",
}

def test___init__empty(self):
sections = B.Sections()
self.assertIsNone(sections.api_level)
self.assertIsNone(sections.app_name)
self.assertIsNone(sections.app_version)
self.assertIsNone(sections.rust_sdk_name)
self.assertIsNone(sections.rust_sdk_version)
self.assertEqual(sections.sdk_graphics, B.DEFAULT_GRAPHICS)
self.assertIsNone(sections.sdk_hash)
self.assertIsNone(sections.sdk_name)
self.assertIsNone(sections.sdk_version)
self.assertIsNone(sections.target)
self.assertIsNone(sections.target_id)
self.assertIsNone(sections.target_name)
self.assertIsNone(sections.target_version)

def test___str__(self):
sections = B.Sections(**self.inputs)
Expand Down

0 comments on commit 64e1a82

Please sign in to comment.