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

Make Unit type less ambiguous #221

Closed
carte7000 opened this issue Jan 7, 2020 · 1 comment
Closed

Make Unit type less ambiguous #221

carte7000 opened this issue Jan 7, 2020 · 1 comment

Comments

@carte7000
Copy link
Contributor

@carte7000 carte7000 commented Jan 7, 2020

Given a contract with Unit as storage

Currently originating such a contract with null (or any truthy value) in the storage property work, but undefined don't
Also decoding the storage of such a contract always return null

See this commit for a summary of an example of the current behavior
9277430

Using null to represent the Unit value is ambiguous as it can have different meaning.

One solution would be to use a global constant ex: Taquito.Unit which would be required while encoding and returned while decoding storage which contains Unit type.

carte7000 added a commit that referenced this issue Feb 3, 2020
@jevonearth

This comment has been minimized.

Copy link
Collaborator

@jevonearth jevonearth commented Feb 5, 2020

@carte7000 carte7000 closed this Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.