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

fix: prevents turning falsy values into null #525

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

peetzweg
Copy link
Collaborator

@peetzweg peetzweg commented Nov 17, 2023

Resolves #517.

This function turned every js falsy value, like false, "", 0 into null, thereby preventing passing these actual values as inputs to contract calls.

https://github.com/paritytech/contracts-ui/blob/2387223e1c9d5b0430831141862afea0e834382b/src/lib/callOptions.ts#L56-L70

@peetzweg peetzweg linked an issue Nov 17, 2023 that may be closed by this pull request
Copy link

netlify bot commented Nov 17, 2023

Deploy Preview for contracts-ui ready!

Name Link
🔨 Latest commit 2387223
🔍 Latest deploy log https://app.netlify.com/sites/contracts-ui/deploys/655795849d14040008ee9940
😎 Deploy Preview https://deploy-preview-525--contracts-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@peetzweg peetzweg changed the title fix: #517 prevents turning falsy values into null fix: prevents turning falsy values into null Nov 17, 2023
Copy link

cypress bot commented Nov 17, 2023

Passing run #256 ↗︎

0 61 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

don't evaluate "falsy" values to `null`
Project: Contracts UI Commit: 2387223e1c
Status: Passed Duration: 01:58 💡
Started: Nov 17, 2023 4:32 PM Ended: Nov 17, 2023 4:34 PM

Review all test suite changes for PR #525 ↗︎

@peetzweg peetzweg merged commit 5d8c085 into master Nov 20, 2023
15 checks passed
@peetzweg peetzweg deleted the 517-optionbool-does-not-work-when-value-is-false branch November 20, 2023 09:30
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.

Option<bool> does not work when value is false
2 participants