Repository navigation
test(wallet): unit tests for wallet disconnection and rejected transaction states (closes #78) - #90
Open
phatloi0010 wants to merge 1 commit into
Open
phatloi0010 wants to merge 1 commit into
phatloi0010 wants to merge 1 commit into
Conversation
…ction states (closes Kinlock-Org#78)
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.
Summary
Fulfills
M3-02andM3-21hardening requirements by adding a comprehensive Vitest unit test suite inlib/wallet/__tests__/wallet-errors.test.tscovering wallet disconnection, user modal/transaction rejection, extension locked states, and fee/insufficient XLM errors.Closes #78
Changes
lib/wallet/__tests__/wallet-errors.test.ts:createStellarWalletsKitAdapterrejects immediately when called in SSR / non-browser environments.getAddress()safely returningnullwhen the extension throws or returns an empty address, and clean delegation tok.disconnect().User closed modal,USER_DECLINED) and verified user-facing recovery guidance.Transaction was declined by user), and xBull (code: -4).tx_insufficient_fee,op_underfunded).walletSignerbridge correctly propagates wallet signing failures.messages/en.json(pages.send.errorTx,pages.payee.connectError,pages.claim.errorTx,pages.lock.errorTx), upholding non-custodial honesty (hard rule 7).ROADMAP.md:Last updatedheader and added new Changelog entry fortest/wallet-errors-78.Verification
pnpm lint: PASS (Biome clean, 93 files checked)pnpm typecheck: PASS (tsc --noEmitclean, 0 errors)pnpm test: PASS (17 test files, 207 tests passing)pnpm build: PASS (Turbopack production build successful)