Repository navigation
docs: encode the WizardConnect sign request before sending it over th… - #477
Open
AhmadReza6610 wants to merge 1 commit into
Open
AhmadReza6610 wants to merge 1 commit into
AhmadReza6610 wants to merge 1 commit into
Conversation
…e relay The WizardConnect example passed the WcTransactionObject straight to signTransaction(), but the relay serializes messages with JSON.stringify, so it throws 'Do not know how to serialize a BigInt'. Encode it with libauth's stringify, like the BCH WalletConnect example does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@AhmadReza6610 is attempting to deploy a commit to the Kalis Software Team on Vercel. A member of the Team first needs to authorize it. |
Pull request stats
Reviewable churn: 8 lines (net +6), version bumps and generated files excluded. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #477 +/- ##
=======================================
Coverage 89.25% 89.25%
=======================================
Files 61 61
Lines 5081 5081
Branches 950 950
=======================================
Hits 4535 4535
Misses 421 421
Partials 125 125 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
The WizardConnect "Wallet Interaction" example passes the
WcTransactionObjectstraight todappConnectionManager.signTransaction(). The WizardConnect relay serializes messages withJSON.stringify, and the object holdsbigintandUint8Arrayfields, so the example throwsTypeError: Do not know how to serialize a BigInt.I ran into this building a dapp with WizardConnect and Cashonize. This PR encodes the request with libauth's
stringify, the same way the BCH WalletConnect example on the same page already does, and adds a sentence explaining why.Checked:
contractfield, plus a P2PKH input with tokens).JSON.stringifyof the old request throws the BigInt error.JSON.parse(stringify(transaction))passes Cashonize'sStrictWizSignTransactionRequestSchema, keepingcontract.artifact.contractName,contract.abiFunction.name,redeemScriptand the token amounts.@wizardconnect/core'sparseExtendedJson.Docs-only change.