@rango-dev/widget-embedded 0.27.4-next.3 → 0.27.4-next.4

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.
Files changed (30) hide show
  1. package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
  2. package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
  3. package/dist/components/WalletNamespacesModal/WalletNamespacesModal.d.ts +6 -0
  4. package/dist/components/WalletNamespacesModal/WalletNamespacesModal.d.ts.map +1 -0
  5. package/dist/components/WalletNamespacesModal/WalletNamespacesModal.styles.d.ts +163 -0
  6. package/dist/components/WalletNamespacesModal/WalletNamespacesModal.styles.d.ts.map +1 -0
  7. package/dist/components/WalletNamespacesModal/WalletNamespacesModal.types.d.ts +10 -0
  8. package/dist/components/WalletNamespacesModal/WalletNamespacesModal.types.d.ts.map +1 -0
  9. package/dist/components/WalletNamespacesModal/index.d.ts +2 -0
  10. package/dist/components/WalletNamespacesModal/index.d.ts.map +1 -0
  11. package/dist/hooks/useWalletList.d.ts +4 -4
  12. package/dist/hooks/useWalletList.d.ts.map +1 -1
  13. package/dist/index.js +2 -2
  14. package/dist/index.js.map +4 -4
  15. package/dist/pages/WalletsPage.d.ts.map +1 -1
  16. package/dist/types/wallets.d.ts +6 -1
  17. package/dist/types/wallets.d.ts.map +1 -1
  18. package/dist/utils/wallets.d.ts +3 -3
  19. package/dist/utils/wallets.d.ts.map +1 -1
  20. package/package.json +7 -7
  21. package/src/components/ConfirmWalletsModal/WalletList.tsx +68 -23
  22. package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +40 -4
  23. package/src/components/WalletNamespacesModal/WalletNamespacesModal.styles.ts +7 -0
  24. package/src/components/WalletNamespacesModal/WalletNamespacesModal.tsx +142 -0
  25. package/src/components/WalletNamespacesModal/WalletNamespacesModal.types.tsx +10 -0
  26. package/src/components/WalletNamespacesModal/index.ts +1 -0
  27. package/src/hooks/useWalletList.ts +11 -3
  28. package/src/pages/WalletsPage.tsx +38 -2
  29. package/src/types/wallets.ts +7 -1
  30. package/src/utils/wallets.ts +8 -3
@@ -5,6 +5,7 @@ import type {
5
5
  TokenHash,
6
6
  TokensBalance,
7
7
  Wallet,
8
+ WalletInfoWithNamespaces,
8
9
  } from '../types';
9
10
  import type { WalletInfo as ModalWalletInfo } from '@rango-dev/ui';
10
11
  import type {
@@ -58,7 +59,7 @@ export function mapWalletTypesToWalletInfo(
58
59
  getWalletInfo: (type: WalletType) => WalletInfo,
59
60
  list: WalletType[],
60
61
  chain?: string
61
- ): ModalWalletInfo[] {
62
+ ): WalletInfoWithNamespaces[] {
62
63
  return list
63
64
  .filter((wallet) => !EXCLUDED_WALLETS.includes(wallet as WalletTypes))
64
65
  .filter((wallet) => {
@@ -82,6 +83,8 @@ export function mapWalletTypesToWalletInfo(
82
83
  img: image,
83
84
  installLink,
84
85
  showOnMobile,
86
+ namespaces,
87
+ singleNamespace,
85
88
  } = getWalletInfo(type);
86
89
  const state = mapStatusToWalletState(getState(type));
87
90
  return {
@@ -91,6 +94,8 @@ export function mapWalletTypesToWalletInfo(
91
94
  state,
92
95
  type,
93
96
  showOnMobile,
97
+ namespaces,
98
+ singleNamespace,
94
99
  };
95
100
  });
96
101
  }
@@ -433,8 +438,8 @@ export function areTokensEqual(
433
438
  }
434
439
 
435
440
  export function sortWalletsBasedOnConnectionState(
436
- wallets: ModalWalletInfo[]
437
- ): ModalWalletInfo[] {
441
+ wallets: WalletInfoWithNamespaces[]
442
+ ): WalletInfoWithNamespaces[] {
438
443
  return wallets.sort(
439
444
  (a, b) =>
440
445
  Number(b.state === WalletStatus.CONNECTED) -