@ecency/wallets 1.4.10 → 1.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3264,7 +3264,7 @@ function useImportWallet(username, currency) {
3264
3264
  }
3265
3265
  });
3266
3266
  }
3267
- function getGroupedChainTokens(tokens, show = false) {
3267
+ function getGroupedChainTokens(tokens, defaultShow) {
3268
3268
  if (!tokens) {
3269
3269
  return {};
3270
3270
  }
@@ -3274,8 +3274,16 @@ function getGroupedChainTokens(tokens, show = false) {
3274
3274
  ({ type, symbol }) => type === "CHAIN" || Object.values(EcencyWalletCurrency).includes(symbol)
3275
3275
  ),
3276
3276
  R__namespace.map((item) => {
3277
- item.meta.show = show;
3278
- return item;
3277
+ const meta = {
3278
+ ...item.meta ?? {}
3279
+ };
3280
+ if (typeof meta.show !== "boolean" && typeof defaultShow === "boolean") {
3281
+ meta.show = defaultShow;
3282
+ }
3283
+ return {
3284
+ ...item,
3285
+ meta
3286
+ };
3279
3287
  }),
3280
3288
  // Chain tokens are unique by symbol, so indexing by symbol
3281
3289
  // gives a direct lookup map instead of an array-based grouping.