@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.
@@ -3237,7 +3237,7 @@ function useImportWallet(username, currency) {
3237
3237
  }
3238
3238
  });
3239
3239
  }
3240
- function getGroupedChainTokens(tokens, show = false) {
3240
+ function getGroupedChainTokens(tokens, defaultShow) {
3241
3241
  if (!tokens) {
3242
3242
  return {};
3243
3243
  }
@@ -3247,8 +3247,16 @@ function getGroupedChainTokens(tokens, show = false) {
3247
3247
  ({ type, symbol }) => type === "CHAIN" || Object.values(EcencyWalletCurrency).includes(symbol)
3248
3248
  ),
3249
3249
  R.map((item) => {
3250
- item.meta.show = show;
3251
- return item;
3250
+ const meta = {
3251
+ ...item.meta ?? {}
3252
+ };
3253
+ if (typeof meta.show !== "boolean" && typeof defaultShow === "boolean") {
3254
+ meta.show = defaultShow;
3255
+ }
3256
+ return {
3257
+ ...item,
3258
+ meta
3259
+ };
3252
3260
  }),
3253
3261
  // Chain tokens are unique by symbol, so indexing by symbol
3254
3262
  // gives a direct lookup map instead of an array-based grouping.