Skip to content

Commit 186cded

Browse files
committed
deprecate old chain info accessors and methods in ChainStore
1 parent 4607193 commit 186cded

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

apps/extension/src/stores/chain/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ export class ChainStore extends BaseChainStore<ChainInfoWithCoreTypes> {
139139
});
140140
}
141141

142+
/**
143+
* @deprecated Use `modularChainInfos` instead
144+
*/
142145
@computed
143146
override get chainInfos(): IChainInfoImpl<ChainInfoWithCoreTypes>[] {
144147
// Sort by chain name.
@@ -237,6 +240,9 @@ export class ChainStore extends BaseChainStore<ChainInfoWithCoreTypes> {
237240
return this._enabledChainIdentifiers;
238241
}
239242

243+
/**
244+
* @deprecated Use `modularChainInfosInUI` instead
245+
*/
240246
@computed
241247
get chainInfosInUI() {
242248
return this.chainInfos.filter((chainInfo) => {
@@ -279,6 +285,9 @@ export class ChainStore extends BaseChainStore<ChainInfoWithCoreTypes> {
279285

280286
// chain info들을 list로 보여줄때 hideInUI인 얘들은 빼고 보여줘야한다
281287
// property 이름이 얘매해서 일단 이렇게 지었다.
288+
/**
289+
* @deprecated Use `modularChainInfosInListUI` instead
290+
*/
282291
@computed
283292
get chainInfosInListUI() {
284293
return this.chainInfos.filter((chainInfo) => {

packages/stores/src/chain/base.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,9 @@ export class ChainStore<C extends ChainInfo = ChainInfo>
15551555
keepAlive(this, "modularChainInfoMap");
15561556
}
15571557

1558+
/**
1559+
* @deprecated Use `modularChainInfos` instead
1560+
*/
15581561
get chainInfos(): IChainInfoImpl<C>[] {
15591562
return this._chainInfos;
15601563
}
@@ -1580,6 +1583,9 @@ export class ChainStore<C extends ChainInfo = ChainInfo>
15801583
return result;
15811584
}
15821585

1586+
/**
1587+
* @deprecated Use `getmodularChain` or `getModularChainInfoImpl` instead
1588+
*/
15831589
getChain(chainId: string): IChainInfoImpl<C> {
15841590
const chainIdentifier = ChainIdHelper.parse(chainId);
15851591

@@ -1592,6 +1598,9 @@ export class ChainStore<C extends ChainInfo = ChainInfo>
15921598
return chainInfo;
15931599
}
15941600

1601+
/**
1602+
* @deprecated Use `hasModularChain` instead
1603+
*/
15951604
hasChain(chainId: string): boolean {
15961605
const chainIdentifier = ChainIdHelper.parse(chainId);
15971606

0 commit comments

Comments
 (0)