Conversation
🔐 Commit Signature Verification✅ All 1 commit(s) passed verification
Summary
Required key type: Last verified: 2026-03-16 17:10 UTC |
| get isAtomicSwapPeginEnabled() { | ||
| return process.env.NEXT_PUBLIC_FF_ATOMIC_SWAP_PEGIN === "true"; | ||
| }, |
There was a problem hiding this comment.
Module-level documentation inconsistency
The file header comment on line 11 states: "Default value for all feature flags is true (feature is enabled)", but this flag (like isSimplifiedTermsEnabled before it) defaults to false. The module-level comment is no longer accurate for opt-in flags. Consider updating the header to reflect that there are two patterns — opt-out flags (default true, disable by setting to "false") and opt-in flags (default false, enable by setting to "true").
jrwbabylonlab
left a comment
There was a problem hiding this comment.
@jonybur u need to put this flag in the right place as part of this PR tho.
#1240
Greptile Summary
This PR adds a new opt-in feature flag
isAtomicSwapPeginEnabledto the vault's feature flag registry, gating the atomic swap pegin deposit flow behindNEXT_PUBLIC_FF_ATOMIC_SWAP_PEGIN=true. The change is minimal, well-documented inline, and consistent with the existing opt-in flag pattern established byisSimplifiedTermsEnabled.Key observations:
false, so the existing deposit flow is unaffected until the env var is explicitly enabled.README.mdis not updated: all other feature flags are documented in the### Feature Flagssection ofservices/vault/README.md, butNEXT_PUBLIC_FF_ATOMIC_SWAP_PEGINis missing from it. Consider adding an entry describing its purpose and how to enable it."Default value for all feature flags is true") is outdated — both this flag andisSimplifiedTermsEnabledare opt-in (defaultfalse). Updating the comment to reflect both patterns would improve maintainability.Confidence Score: 5/5
false, so no existing functionality is affected.Important Files Changed
isAtomicSwapPeginEnabled(env varNEXT_PUBLIC_FF_ATOMIC_SWAP_PEGIN) defaulting tofalse; follows the same pattern asisSimplifiedTermsEnabled. Minor inconsistency with the module-level comment claiming all flags default totrue.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Page renders deposit flow] --> B{isAtomicSwapPeginEnabled?} B -->|NEXT_PUBLIC_FF_ATOMIC_SWAP_PEGIN === 'true'| C[Render Atomic Swap Pegin deposit flow] B -->|env var unset or !== 'true'| D[Render existing deposit flow]Last reviewed commit: 05dcf2d