feat: Add support for 24-word mnemonic phrases and fix API headers #994
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.
Summary
This PR adds support for importing wallets using 24-word mnemonic phrases (in addition to the existing 12-word support) and fixes missing
Content-Typeheaders in API requests that were causing 400 Bad Request errors.Changes
1. 24-Word Mnemonic Support (
ImportWallet.tsx)phraseLengthfield to form state to track the selected phrase lengthwallettype: 'sw-fb'parameter to the wallet recovery API call2. API Header Fixes (
JmWalletApi.ts)Content-Type: application/jsonheaders to all POST requests:/v1/token/v1/wallet/create/v1/wallet/recover/v1/wallet/{walletFileName}/unlock/v1/wallet/{walletFileName}/maker/start/v1/wallet/{walletFileName}/taker/direct-send/v1/wallet/{walletFileName}/taker/coinjoin/v1/wallet/{walletFileName}/freeze/v1/wallet/{walletFileName}/taker/schedule/v1/wallet/{walletFileName}/configset/v1/wallet/{walletFileName}/configgetMotivation
Content-Type: application/jsonheaders for POST requests with JSON bodies. Missing headers were causing 400 Bad Request errors during wallet operations.Testing