Repository navigation
feat(deposit): default to testnet vault and preflight pause/allowlist - #1363
Merged
Merged
Conversation
Testnet builds now default to the reference vault when the env var is empty. The config is validated with StrKey before signing, so an account address or missing value blocks Approve with a specific reason. Before the wallet is asked to sign, a read-only simulation checks is_paused and is_authorized_depositor. A paused vault or an unlisted wallet disables Approve with the reason linked via aria-describedby. If the preflight cannot run, Approve stays enabled with a warning. Closes CalloraOrg#1312 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # src/App.deposit.test.tsx # src/App.tsx # src/api/catalogApi.ts # src/data/mockApis.ts # src/services/walletService.test.ts
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.
Closes #1312
Problem
Deposits were blocked on any deployment without
VITE_STELLAR_VAULT_CONTRACT_ID, even though the testnet vault is deployed. When a deposit was possible, a paused vault or an unlisted wallet was only discovered after Freighter had asked for a signature.Change
testnetfalls back to the reference vault when the env var is empty. Mainnet and futurenet have no default.resolveVaultConfig(src/services/vaultConfig.ts) is a pure function that returns{ contractId, source, error }. It rejects non-contract values usingStrKey.isValidContract.preflightVaultDeposit(address)simulatesis_paused()andis_authorized_depositor(address)with no signing and no submission.aria-describedby..env.exampleanddocs/Configuration.mddescribe the testnet default.Also in this branch
3eeba1brestores baseline types onmain. Without it,tsc --noEmitfails onmainincatalogApi.ts,mockApis.ts, andApiDetailPage.tsx.Not included
Validation
npx tsc -p tsconfig.json --noEmit: passed.npm run build: passed.npx vitest run: 153 files, 2295 tests passed.Limits
Not run against live testnet RPC. Simulations are mocked in tests. Coverage was not measured.
🤖 Generated with Claude Code