This repository was archived by the owner on Dec 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
ETH-81: Expose transportSignatures for an alternative withdraw flow #239
Merged
Conversation
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
ETH-81 Expose DU2 functions for signature transport
Swash withdraw pattern:
Expose the necessary functions for each step of that flow:
|
because the method to do it is transportMessage and that's really all it means, so either it should be the SAME name, or else a bit more descriptive
also using describe.each instead of the homebrew loop. WebStorm recognizes this syntax, so please never use homebrew loops!
apparently ethers doesn't do enough to tell tx.wait() returns a ContractReceipt...
strange that `instanceof String` doesn't actually catch a string
for some reason it was polling every 100ms, which is definitely too much in production
tests should pass now (fingers crossed)
all tests timed out for some reason; could be that now that there are so many cases (5 x 4, I think) it requires the whole thing to run under 5min, which it might not TODO: turn it down to what's actually needed
bridge timeout probably too low for real world?
also TrReceipt -> ContractReceipt was changed in this PR
making choices based on fairly arbitrary line length limits feels bad man. Adding eslint-disables also feels bad. But I acknowledge it's good to limit line length, in general. I guess.
Date.now() feels a bit hacky, running count is better
All tests run in parallel. Even trying to start bridge "for those cases that need it" ends up bridge paying for other transports as well and every test case being confused. Also for some reason the transport doesn't even happen to the cases that want it. Augh.
Contributor
Author
|
Data union tests are all green. Merging after a review. |
just to guard against the super improbable failure of shared ids in parallel-run tests
teogeb
reviewed
Apr 28, 2021
teogeb
reviewed
Apr 28, 2021
teogeb
reviewed
Apr 28, 2021
timoxley
approved these changes
Apr 28, 2021
Contributor
timoxley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like it if more functions took options objects instead of positional parameters, my IDE doesn't have the nice positional naming stuff that yours does, but otherwise LGTM.
format strings are MUCH nicer for a lot of things: they show the JS type, also pretty-print objects (no need to JSON.stringify)
One is the property of the bridge, one is the property of the function call, it's like the opposite angle of looking at it. But I'll still change it so that the name is the same. So freeWithdraw -> !payForTransport everywhere. It's better that way.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
New withdraw functionality.
Alpha version is already in NPM, this PR is just adding tests. After that it should be good for master.