fix(web): accept auth scheme aliases - #227
Open
skyc1e wants to merge 1 commit into
Open
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
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.
Fixes #223.
The public
AuthSchemeobject only exposed the friendly string values, while the lower-level wallet/faucet methods still expect the WASM enum values. That leftAuthScheme.AuthRpoFalcon512undefined and let React defaults pass an invalid auth scheme intonewWallet.This adds the numeric compatibility aliases back to the browser and Node exports, updates the public types, and routes browser
newWallet/newFaucetauth inputs throughresolveAuthSchemeso both friendly strings and enum values reach WASM as the expected numeric enum.Checked with:
cmd /c ..\..\node_modules\.bin\vitest.cmd run --config vitest.config.js js/__tests__/utils.test.jscmd /c ..\..\node_modules\.bin\vitest.cmd run --config vitest.config.ts src/__tests__/hooks/useCreateWallet.test.tsxcmd /c node_modules\.bin\prettier.cmd --check crates/web-client/js/index.js crates/web-client/js/node-index.js crates/web-client/js/utils.js crates/web-client/js/types/api-types.d.ts crates/web-client/js/__tests__/utils.test.jsgit diff --check