fix: don't wrap jsParams in jsParams key #1005
Closed
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.
I was writing some actions and testing them on naga-dev and ran into this bug, where I couldn't use jsParams in actions. The node logs look like this:
js_params: Some(Object {"jsParams": Object {"pkpPublicKey": String("0x043704b08b784eb590327173a960baf4970b0a6fb1080bd3710f858b5ecbb6c4b19011114efc759565fe23c4aeb4fd9c695755af32c002a0511bfa526ae4dea3cf")}})My js code on the client looks like this:
My action looks like this:
The error is:
My action works when I do this, which makes me think this extra jsParams key is the problem:
I think this PR might fix it but I have not tested it at all.