Uh oh!
There was an error while loading. Please reload this page.
feat(statics): add dynamic Canton token construction - #9502
Conversation
Adds the canton case to createToken so AMS-supplied Canton tokens resolve at runtime instead of silently dropping. Wires baseUrl through AmsTokenConfig, adds the canton entry to networkFeatureMapForTokens, and exports getFormattedCantonTokens for registerWithCoinMap. TICKET: CHALO-1299
674cc9e to
914c185Compare
davidkaplanbitgo
left a comment
There was a problem hiding this comment.
BTC changes are fine
s84krish
left a comment
There was a problem hiding this comment.
wallets owned files look good
bhavidhingra
commented
Aug 17, 2026
@hrishikeshjain Commit msg says verifyTransaction hardening "left for follow-up (release-blocking, needs confirmation of wallet-platform's txParams shape)". Reviewer's likely challenge: "if it's release-blocking, why merge now?" |
Uh oh!
There was an error while loading. Please reload this page.
Adds registerWithCoinMap(sdk, coinMap) so a dynamically-onboarded Canton token from AMS can be registered into a running SDK instance without a statics release, mirroring the SOL registerWithCoinMap pattern. Wires CantonToken.createTokenConstructors into registerCoinConstructors so GlobalCoinFactory resolves canton/tcanton tokens from the coin map at process start. Nothing calls registerWithCoinMap yet, so no dynamic Canton token is reachable until wallet-platform/AMS wiring (CHALO-1301/1303/1304) lands and the rollout flags flip. verifyTransaction hardening for accept/reject/withdraw/wallet-init is tracked separately as CHALO-1308 and gates production rollout, not this increment. TICKET: CHALO-1300
8492a06914c185 to
8492a06Comparehrishikeshjain
commented
Aug 17, 2026
@bhavidhingra fair challenge — reworded the commit message to be clearer. The distinction I meant: this PR only adds capability (`registerWithCoinMap` + factory wiring), nothing calls it yet, and no dynamic Canton token is reachable in production until wallet-platform/AMS wiring (CHALO-1301/1303/1304) lands and the rollout flags flip. `verifyTransaction` hardening is release-blocking for the overall rollout, not for merging this increment — it's tracked separately as CHALO-1308. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
createTokennow has acantoncase mappingAmsTokenConfig→cantonToken(...), so AMS-supplied Canton tokens no longer resolve toundefinedfor every runtime consumer (wallet-platform, retail, IMS, client-admin).baseUrltoAmsTokenConfigso the registrar endpoint survives the AMS→SDK hop.cantonintonetworkFeatureMapForTokens(previously unwiredCANTON_TOKEN_FEATURES), socreateTokenMapUsingTrimmedConfigDetailsno longer silently skips canton.getFormattedCantonTokens(was module-private) for use byregisterWithCoinMap.Test plan
tcanton:faketokenfixture (withbaseUrl+ compoundcontractAddress) toreducedTokenConfigForAllChainsintest/unit/resources/amsTokenConfig.tscreateTokenMapUsingTrimmedConfigDetailsbuilds the Canton token withbaseUrlpreserved, verified via the existing "form base coin for tokens of all the chains" testtsc --noEmitpasseseslintpasses (no new errors)TICKET: CHALO-1299