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

feat(solana): add nullable tag #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RostarMarek
Copy link
Collaborator

Added nullable flag to help with parsing null for mint authority. Question in this is wheter the behavior of optional created from other sources is not the same as what we have defined here as nullable, in other words if the value will be always in the message but with a byte denoting wheter it is null.
Also right now I do not think we should be able to have a param that is both nullable and optional as it could lead to non deterministic parsing especially if there were multiple such params for 1 instruction.

@RostarMarek RostarMarek requested a review from gabrielKerekes May 6, 2024 09:04
Copy link

github-actions bot commented May 6, 2024

legacy UI changes device test(screens) main(screens)

Copy link

github-actions bot commented May 6, 2024

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T2B1 Safe 3 3280 test(screens) main(screens) 2724
T3T1 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

Copy link
Collaborator

@gabrielKerekes gabrielKerekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also run ./tests/update_fixtures.py local after running the ui tests and add tests/ui_tests/fixtures.json to the changeset 🙏

core/src/apps/solana/layout.py Outdated Show resolved Hide resolved
core/src/apps/solana/layout.py Outdated Show resolved Hide resolved
core/src/apps/solana/transaction/instruction.py Outdated Show resolved Hide resolved
core/src/apps/solana/transaction/instruction.py Outdated Show resolved Hide resolved
crypto/tests/wycheproof Outdated Show resolved Hide resolved
@RostarMarek RostarMarek force-pushed the feat/add-nullable-flag branch 4 times, most recently from c8b43bd to 52289ec Compare May 6, 2024 15:48
core/src/apps/solana/transaction/instruction.py Outdated Show resolved Hide resolved
Comment on lines 55 to 57
if property_template.is_nullable and property_template.is_optional:
raise DataError("Parameter is nullable and optional")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if property_template.is_nullable and property_template.is_optional:
raise DataError("Parameter is nullable and optional")
assert not (property_template.is_nullable and property_template.is_optional) # validated via mako template

tests/ui_tests/fixtures.json Outdated Show resolved Hide resolved
@RostarMarek RostarMarek force-pushed the feat/add-nullable-flag branch 5 times, most recently from 767484b to 588414b Compare May 7, 2024 13:16
@RostarMarek RostarMarek force-pushed the feat/add-nullable-flag branch from cb3bea8 to 52e2ba8 Compare May 7, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants