Upgrade deps; Correct issues from upgrade; Setup jest unit tests for sanitizeNumbers;#90
Merged
joepetrowski merged 12 commits intomasterfrom Jul 8, 2020
Merged
Conversation
Test extended types Test AbstractInt as value in object sanitize a staking response Fix some small details
efc7f33 to
d958830
Compare
sanitizeNumbers;
Correct workflow to install wasm-pack Try again
ba55b53 to
1f9d86d
Compare
joepetrowski
reviewed
Jul 7, 2020
Collaborator
joepetrowski
left a comment
There was a problem hiding this comment.
Looks good, just a few questions and edge cases I'm wondering about.
Comment on lines
+45
to
+47
| total: '0x0000000000000000ff49f24a6a9c00', | ||
| active: '0x0000000000000000ff49f24a6a9100', | ||
| unlocking: [], |
Collaborator
There was a problem hiding this comment.
Is this a real example? Normally total = active + unlocking.sum(). It should work because that shouldn't affect sanitizeNumbers, but I don't think it's an actual state.
Collaborator
There was a problem hiding this comment.
Also why are these 15 bytes? Should be 16, no?
Collaborator
There was a problem hiding this comment.
Let's work on this in follow ups, but shouldn't block this.
Use async create instead of initialize Add versionReset; Revert static creat Remove exclamation maarks Put comment back in Revert last commit Delete stray empty line Revert ensureMeta changes Clean up testing Save progress with U64s Fix issues with BTreeSet More tests Update to handle in option so linkage test passes save progress on set More tests Save progress last tests
9a2c79e to
5fc3a27
Compare
joepetrowski
approved these changes
Jul 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #89
Motivation:
While writing testing for
santizeNumbersI bumped @polkadot/api from 1.23.0.beta2 to 1.23.1 and the tests I wrote forCompact<Balance>started failing. I also realized the server would not start due to severalu32types being created with a -1. I later found that it was failing on an enum type inVec<BalanceLock>so I added enum handling tosanitizeNumbersas well. I figured the best move would be to just fix all the issues in one go since async coordination of dependent merges could be considered unnecessarily slow and tricky given the context.Overview:
createType('u32', -1)tocreateType('u32', 0)in order to not trigger the new validation errorFuture PRs
sanitizeNumbers(Future proofsanitizeNumbers#154)sanitizeNumbers#154)