From 622ab3b36d3b49d29e70e7e481aaa7ade52039b5 Mon Sep 17 00:00:00 2001 From: "dinshawkothari@bitgo.com" Date: Mon, 18 May 2026 07:36:34 +0000 Subject: [PATCH] fix(statics): add LIQUID_STAKING feature to hypeevm staking tokens Add CoinFeature.LIQUID_STAKING to hypeevm:hwhype (Hyperwave HYPE) and hypeevm:khype (Kinetiq Staked HYPE). Without this flag, the backend cannot identify these as liquid staking derivatives and fails to link the HYPE debit with the hwHYPE/kHYPE credit during pending approval, causing the wallet balance to appear doubled in the UI. The OFC counterparts (ofchypeevm:hwhype, ofchypeevm:khype) inherit the feature automatically via getFilteredFeatures in ofc.ts. Also adds DEFAULT_FEATURES_EXCLUDE_SINGAPORE to hwhype for consistency with khype, since both are staking products excluded from Singapore custody. Ticket: CECHO-739 Co-Authored-By: Claude Opus 4.7 Session-Id: 6e731a38-0e23-44db-9371-e3fcaf8e30fc Task-Id: 734ee077-e571-4848-bee2-4cbf7ed7921c --- modules/statics/src/allCoinsAndTokens.ts | 5 +++-- modules/statics/test/unit/coins.ts | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/statics/src/allCoinsAndTokens.ts b/modules/statics/src/allCoinsAndTokens.ts index 82f988b8ed..89ced2fd6a 100644 --- a/modules/statics/src/allCoinsAndTokens.ts +++ b/modules/statics/src/allCoinsAndTokens.ts @@ -4551,7 +4551,8 @@ export const allCoinsAndTokens = [ 18, '0x4de03ca1f02591b717495cfa19913ad56a2f5858', UnderlyingAsset['hypeevm:hwhype'], - Networks.main.hypeevm + Networks.main.hypeevm, + [...AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.EIP1559, CoinFeature.LIQUID_STAKING] ), erc20Token( @@ -4581,7 +4582,7 @@ export const allCoinsAndTokens = [ '0xfd739d4e423301ce9385c1fb8850539d657c296d', UnderlyingAsset['hypeevm:khype'], Networks.main.hypeevm, - [...AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.EIP1559] + [...AccountCoin.DEFAULT_FEATURES_EXCLUDE_SINGAPORE, CoinFeature.EIP1559, CoinFeature.LIQUID_STAKING] ), erc20Token( 'fa292113-57f0-425a-841b-0e3111c8fd52', diff --git a/modules/statics/test/unit/coins.ts b/modules/statics/test/unit/coins.ts index c39bc3538e..997542df58 100644 --- a/modules/statics/test/unit/coins.ts +++ b/modules/statics/test/unit/coins.ts @@ -1193,6 +1193,24 @@ describe('Eip1559 coins', () => { }); }); +describe('Liquid staking tokens', () => { + it('should have LIQUID_STAKING feature for hypeevm liquid staking tokens', () => { + const liquidStakingTokens = ['hypeevm:hwhype', 'hypeevm:khype']; + liquidStakingTokens.forEach((coinName) => { + const coin = coins.get(coinName); + coin.features.includes(CoinFeature.LIQUID_STAKING).should.eql(true); + }); + }); + + it('should have LIQUID_STAKING feature for ofc hypeevm liquid staking tokens', () => { + const liquidStakingTokens = ['ofchypeevm:hwhype', 'ofchypeevm:khype']; + liquidStakingTokens.forEach((coinName) => { + const coin = coins.get(coinName); + coin.features.includes(CoinFeature.LIQUID_STAKING).should.eql(true); + }); + }); +}); + describe('create token map using config details', () => { it('should create a valid token map from AmsTokenConfig', () => { const tokenMap = createTokenMapUsingConfigDetails(amsTokenConfig);