Skip to content

fix(statics): keep Singapore excluded from RBTC custody - #9391

Open
claude[bot] wants to merge 1 commit into
masterfrom
rbtc-gate-singapore-custody
Open

fix(statics): keep Singapore excluded from RBTC custody#9391
claude[bot] wants to merge 1 commit into
masterfrom
rbtc-gate-singapore-custody

Conversation

@claude

@claude claude Bot commented Jul 30, 2026

Copy link
Copy Markdown

<!-- ccr-slack-attribution -->
Requested by Shubham Damkondwar, Kushagra Sharma · Slack thread

Description

Companion PR: BitGo/bitgo-microservices#61593 (CECHO-1849) enables RBTC custody wallets at the wallet-platform method level. Once that PR merges, any CoinFeature currently attached to RBTC_FEATURES would become eligible for RBTC custody, including Singapore.

Per the decision in the linked Slack thread ("yes we can keep it gated for singapore") and the precedent set in the old ticket COIN-5477 (gating RBTC for Singapore), Singapore trusts should remain excluded from RBTC custody. This PR makes that gating actually effective in @bitgo/statics.

Before

RBTC_FEATURES explicitly listed CoinFeature.CUSTODY_BITGO_SINGAPORE:

export const RBTC_FEATURES = [
  ...ETH_FEATURES,
  CoinFeature.MULTISIG_COLD,
  CoinFeature.MULTISIG,
  CoinFeature.CUSTODY_BITGO_GERMANY,
  CoinFeature.CUSTODY_BITGO_FRANKFURT,
  CoinFeature.CUSTODY_BITGO_SINGAPORE,
];

Simply deleting that line would not have achieved the goal: ETH_FEATURES spreads ACCOUNT_COIN_DEFAULT_FEATURES, which already includes CoinFeature.CUSTODY_BITGO_SINGAPORE by default. Since RBTC_FEATURES spreads ETH_FEATURES, the explicit entry was actually redundant with an inherited default — removing only that line would have been a no-op, and Singapore would still end up in the final RBTC_FEATURES array (and therefore still gain RBTC custody access once the companion PR ships).

After

RBTC_FEATURES now explicitly filters CUSTODY_BITGO_SINGAPORE out of the final array, the same exclusion pattern already used elsewhere in this file for coins that need to remove a feature inherited via a spread (e.g. CELO_FEATURES, ETH_FEATURES_WITH_FRANKFURT_EXCLUDE_SINGAPORE, TEMPO_FEATURES_EXCLUDE_SINGAPORE):

export const RBTC_FEATURES = [
  ...ETH_FEATURES,
  CoinFeature.MULTISIG_COLD,
  CoinFeature.MULTISIG,
  CoinFeature.CUSTODY_BITGO_GERMANY,
  CoinFeature.CUSTODY_BITGO_FRANKFURT,
].filter((feature) => feature !== CoinFeature.CUSTODY_BITGO_SINGAPORE);

This guarantees CoinFeature.CUSTODY_BITGO_SINGAPORE cannot end up on rbtc/trbtc regardless of what ETH_FEATURES / ACCOUNT_COIN_DEFAULT_FEATURES include in the future.

How this pairs with the companion PR

  • BitGo/bitgo-microservices#61593 enables the RBTC custody wallet method itself; RBTC custody won't actually work anywhere until that PR also merges.
  • This PR ensures that once both are merged, Singapore trusts remain blocked from RBTC custody, matching the team's decision.
  • Neither PR alone changes end-user-visible behavior for Singapore; the combination does.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Confirmed via code inspection that CUSTODY_BITGO_SINGAPORE is inherited into ETH_FEATURES via ACCOUNT_COIN_DEFAULT_FEATURES, so a plain line removal would have been a no-op.
  • Type-checked modules/statics/src/coinFeatures.ts in isolation (tsc --noEmit) — no errors.
  • Verified RBTC_FEATURES is consumed directly by the rbtc account definition and via AccountCoin.getFeaturesByTypeExcluding for trbtc in modules/statics/src/allCoinsAndTokens.ts, so this fix covers both.

Ticket: CECHO-1849


Generated by Claude Code

RBTC_FEATURES explicitly listed CUSTODY_BITGO_SINGAPORE, but that was
already a no-op: ETH_FEATURES (spread into RBTC_FEATURES) pulls in
CUSTODY_BITGO_SINGAPORE via ACCOUNT_COIN_DEFAULT_FEATURES, so simply
deleting the explicit entry would not have removed it from the
resulting feature list.

Filter CUSTODY_BITGO_SINGAPORE out of the final RBTC_FEATURES array
instead, matching the exclusion pattern already used elsewhere in this
file (e.g. CELO_FEATURES, ETH_FEATURES_WITH_FRANKFURT_EXCLUDE_SINGAPORE).

Per COIN-5477 and team decision in Slack, Singapore trusts should stay
gated out of RBTC custody once RBTC custody wallets are enabled
(BitGo/bitgo-microservices#61593).

TICKET: CECHO-1849
@claude
claude Bot requested a review from a team as a code owner July 30, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant