feat(statics): scope CECHO-1941 batch tokens to BitGo Trust only - #9598
Conversation
CECHO-1941 Restrict custody support for the 54 tokens onboarded in BitGoJS#9536 (42 BSC, 8 Base, 2 Arbitrum, 1 Polygon, 1 Tron) to the BitGo Trust legal entity only, per the ticket's instruction to keep them gated for every other trust while risk assessment is pending. Adds *_TRUST_ONLY feature-set constants (ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY, BSC_TOKEN_FEATURES_TRUST_ONLY, EVM_TOKEN_FEATURES_TRUST_ONLY, POLYGON_TOKEN_FEATURES_TRUST_ONLY) that keep CoinFeature.CUSTODY_BITGO_TRUST but drop MENA_FZE/CUSTODY_MENA_FZE/SINGAPORE/EUROPE_APS/FRANKFURT/INDIA, and reassigns all 54 batch token definitions to them. Ticket: CECHO-1941
|
@claude review |
|
Claude finished @manojkumar138's task —— View job Code Review for CECHO-1941: Scope batch tokens to BitGo Trust onlyTodo List:
Review SummaryThis PR successfully implements custody restrictions for 54 batch tokens to BitGo Trust only. The implementation is well-structured, consistent, and correctly scoped. ✅ Positive Aspects1. Clean Architecture & Consistency
2. Correct Feature Set Logic ( export const ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLY = ACCOUNT_COIN_DEFAULT_FEATURES.filter(
(feature) => feature === CoinFeature.CUSTODY_BITGO_TRUST || !BITGO_CUSTODY_JURISDICTIONS.includes(feature)
);
3. Comprehensive Coverage
4. Maintainable Code
🔍 Technical CorrectnessFeature Set Validation:
Implementation Coverage:
📝 Minor Suggestions1. Documentation Enhancement // Used for tokens onboarded in CECHO-1941 that should only be available via BitGo Trust
export const BSC_TOKEN_FEATURES_TRUST_ONLY = [...]2. Verification Script Consideration 🎯 Business Logic AlignmentThe implementation perfectly aligns with the stated goals:
🏆 Overall AssessmentExcellent implementation - this PR demonstrates:
The code is production-ready and the approach ensures these tokens will be properly restricted to BitGo Trust custody while maintaining all their other operational capabilities. Branch: |
Summary
*_TRUST_ONLYfeature-set constants incoinFeatures.ts:ACCOUNT_COIN_DEFAULT_FEATURES_TRUST_ONLYBSC_TOKEN_FEATURES_TRUST_ONLYEVM_TOKEN_FEATURES_TRUST_ONLY(baseeth/arbeth)POLYGON_TOKEN_FEATURES_TRUST_ONLYCoinFeature.CUSTODY_BITGO_TRUSTbut dropCUSTODY_BITGO_MENA_FZE,CUSTODY_BITGO_CUSTODY_MENA_FZE,CUSTODY_BITGO_SINGAPORE,CUSTODY_BITGO_EUROPE_APS,CUSTODY_BITGO_FRANKFURT,CUSTODY_BITGO_INDIA— the jurisdictions these tokens previously defaulted to.bscTokens.ts,allCoinsAndTokens.ts,polygonTokens.ts) to the new trust-only constants.@bitgo/staticsthat each of the 54 tokens now carries onlycustody-bitgo-trustamong the custody-entity features, with all other (non-custody) features unchanged.Companion PR: prime-microservices — gatekeeps these tokens for every entity except BitGo Trust.
Ticket
CECHO-1941
Test plan
tsc --noEmitpasses formodules/staticscustody-bitgo-trustis the only custody-entity feature on all 54 tokens