fare-privy-core 1.7.7 → 1.7.9

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 (102) hide show
  1. package/README.md +101 -22
  2. package/dist/index.d.ts +11 -61
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +17 -61
  5. package/dist/index.js.map +1 -1
  6. package/dist/src/components/WalletOverview.d.ts +14 -0
  7. package/dist/src/components/WalletOverview.d.ts.map +1 -0
  8. package/dist/src/components/WalletOverview.js +46 -0
  9. package/dist/src/components/WalletOverview.js.map +1 -0
  10. package/dist/src/components/shared/Button/index.d.ts +22 -0
  11. package/dist/src/components/shared/Button/index.d.ts.map +1 -0
  12. package/dist/src/components/shared/Button/index.js +16 -0
  13. package/dist/src/components/shared/Button/index.js.map +1 -0
  14. package/dist/src/components/shared/Button/style.d.ts +560 -0
  15. package/dist/src/components/shared/Button/style.d.ts.map +1 -0
  16. package/dist/src/components/shared/Button/style.js +249 -0
  17. package/dist/src/components/shared/Button/style.js.map +1 -0
  18. package/dist/src/components/shared/Modal/Card.d.ts +4 -0
  19. package/dist/src/components/shared/Modal/Card.d.ts.map +1 -0
  20. package/dist/src/components/shared/Modal/Card.js +30 -0
  21. package/dist/src/components/shared/Modal/Card.js.map +1 -0
  22. package/dist/src/components/shared/Modal/ModalFooter.d.ts +7 -0
  23. package/dist/src/components/shared/Modal/ModalFooter.d.ts.map +1 -0
  24. package/dist/src/components/shared/Modal/ModalFooter.js +10 -0
  25. package/dist/src/components/shared/Modal/ModalFooter.js.map +1 -0
  26. package/dist/src/components/shared/Modal/ModalHeader.d.ts +8 -0
  27. package/dist/src/components/shared/Modal/ModalHeader.d.ts.map +1 -0
  28. package/dist/src/components/shared/Modal/ModalHeader.js +30 -0
  29. package/dist/src/components/shared/Modal/ModalHeader.js.map +1 -0
  30. package/dist/src/components/shared/Modal/animations.d.ts +4 -0
  31. package/dist/src/components/shared/Modal/animations.d.ts.map +1 -0
  32. package/dist/src/components/shared/Modal/animations.js +26 -0
  33. package/dist/src/components/shared/Modal/animations.js.map +1 -0
  34. package/dist/src/components/shared/Modal/styles.d.ts +1625 -0
  35. package/dist/src/components/shared/Modal/styles.d.ts.map +1 -0
  36. package/dist/src/components/shared/Modal/styles.js +210 -0
  37. package/dist/src/components/shared/Modal/styles.js.map +1 -0
  38. package/dist/src/components/shared/Modal/types.d.ts +18 -0
  39. package/dist/src/components/shared/Modal/types.d.ts.map +1 -0
  40. package/dist/src/components/shared/Modal/types.js +2 -0
  41. package/dist/src/components/shared/Modal/types.js.map +1 -0
  42. package/dist/src/hooks/index.d.ts.map +1 -0
  43. package/dist/src/hooks/index.js.map +1 -0
  44. package/dist/{hooks → src/hooks}/useActiveWallet.d.ts +1 -1
  45. package/dist/src/hooks/useActiveWallet.d.ts.map +1 -0
  46. package/dist/{hooks → src/hooks}/useActiveWallet.js +11 -1
  47. package/dist/src/hooks/useActiveWallet.js.map +1 -0
  48. package/dist/src/hooks/useAuthActions.d.ts.map +1 -0
  49. package/dist/src/hooks/useAuthActions.js.map +1 -0
  50. package/dist/src/hooks/useConnectedWallets.d.ts.map +1 -0
  51. package/dist/src/hooks/useConnectedWallets.js.map +1 -0
  52. package/dist/src/hooks/useIsAuthenticated.d.ts.map +1 -0
  53. package/dist/src/hooks/useIsAuthenticated.js.map +1 -0
  54. package/dist/src/hooks/useWalletAddresses.d.ts.map +1 -0
  55. package/dist/{hooks → src/hooks}/useWalletAddresses.js +3 -14
  56. package/dist/src/hooks/useWalletAddresses.js.map +1 -0
  57. package/dist/src/hooks/useWalletBalance.d.ts.map +1 -0
  58. package/dist/{hooks → src/hooks}/useWalletBalance.js +73 -6
  59. package/dist/src/hooks/useWalletBalance.js.map +1 -0
  60. package/dist/src/modals/SelectWalletModal/index.d.ts +30 -0
  61. package/dist/src/modals/SelectWalletModal/index.d.ts.map +1 -0
  62. package/dist/src/modals/SelectWalletModal/index.js +68 -0
  63. package/dist/src/modals/SelectWalletModal/index.js.map +1 -0
  64. package/dist/src/modals/SelectWalletModal/styles.d.ts +3001 -0
  65. package/dist/src/modals/SelectWalletModal/styles.d.ts.map +1 -0
  66. package/dist/src/modals/SelectWalletModal/styles.js +137 -0
  67. package/dist/src/modals/SelectWalletModal/styles.js.map +1 -0
  68. package/dist/src/modals/SelectWalletModal/variants.d.ts +6 -0
  69. package/dist/src/modals/SelectWalletModal/variants.d.ts.map +1 -0
  70. package/dist/src/modals/SelectWalletModal/variants.js +59 -0
  71. package/dist/src/modals/SelectWalletModal/variants.js.map +1 -0
  72. package/dist/src/store/switchWallet.d.ts.map +1 -0
  73. package/dist/src/store/switchWallet.js.map +1 -0
  74. package/package.json +114 -97
  75. package/dist/farePrivy/store/switchWallet.d.ts.map +0 -1
  76. package/dist/farePrivy/store/switchWallet.js.map +0 -1
  77. package/dist/hooks/index.d.ts.map +0 -1
  78. package/dist/hooks/index.js.map +0 -1
  79. package/dist/hooks/useActiveWallet.d.ts.map +0 -1
  80. package/dist/hooks/useActiveWallet.js.map +0 -1
  81. package/dist/hooks/useAuthActions.d.ts.map +0 -1
  82. package/dist/hooks/useAuthActions.js.map +0 -1
  83. package/dist/hooks/useConnectedWallets.d.ts.map +0 -1
  84. package/dist/hooks/useConnectedWallets.js.map +0 -1
  85. package/dist/hooks/useIsAuthenticated.d.ts.map +0 -1
  86. package/dist/hooks/useIsAuthenticated.js.map +0 -1
  87. package/dist/hooks/useWalletAddresses.d.ts.map +0 -1
  88. package/dist/hooks/useWalletAddresses.js.map +0 -1
  89. package/dist/hooks/useWalletBalance.d.ts.map +0 -1
  90. package/dist/hooks/useWalletBalance.js.map +0 -1
  91. /package/dist/{hooks → src/hooks}/index.d.ts +0 -0
  92. /package/dist/{hooks → src/hooks}/index.js +0 -0
  93. /package/dist/{hooks → src/hooks}/useAuthActions.d.ts +0 -0
  94. /package/dist/{hooks → src/hooks}/useAuthActions.js +0 -0
  95. /package/dist/{hooks → src/hooks}/useConnectedWallets.d.ts +0 -0
  96. /package/dist/{hooks → src/hooks}/useConnectedWallets.js +0 -0
  97. /package/dist/{hooks → src/hooks}/useIsAuthenticated.d.ts +0 -0
  98. /package/dist/{hooks → src/hooks}/useIsAuthenticated.js +0 -0
  99. /package/dist/{hooks → src/hooks}/useWalletAddresses.d.ts +0 -0
  100. /package/dist/{hooks → src/hooks}/useWalletBalance.d.ts +0 -0
  101. /package/dist/{farePrivy → src}/store/switchWallet.d.ts +0 -0
  102. /package/dist/{farePrivy → src}/store/switchWallet.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/Modal/styles.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,EAAE,GAapC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,GAiB3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4EzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,GAW9B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,GAW1B,CAAC"}
@@ -0,0 +1,210 @@
1
+ import { motion } from "framer-motion";
2
+ import styled from "styled-components";
3
+ import { Button } from "../Button";
4
+ export const SModalOverlayContainer = styled(motion.div) `
5
+ position: fixed;
6
+ inset: 0;
7
+ background-color: rgba(0, 0, 0, 0.8);
8
+ z-index: 999;
9
+ display: flex;
10
+ justify-content: center;
11
+ align-items: center;
12
+ text-align: justify;
13
+
14
+ @media (min-aspect-ratio: 16/9) and (max-width: 992px) and (orientation: landscape) {
15
+ display: none;
16
+ }
17
+ `;
18
+ export const SModalWrapper = styled(motion.div) `
19
+ position: fixed;
20
+ top: 50%;
21
+ left: 50%;
22
+ transform: translate(-50%, -50%);
23
+ z-index: 1000;
24
+ display: flex;
25
+ justify-content: center;
26
+ align-items: center;
27
+ height: 100%;
28
+ min-width: 450px;
29
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
30
+
31
+ @media (max-width: 600px) {
32
+ min-width: 300px;
33
+ width: 90%;
34
+ }
35
+ `;
36
+ export const SModalContent = styled.div `
37
+ display: flex;
38
+ flex-direction: column;
39
+ justify-content: flex-start;
40
+ align-items: center;
41
+ background-color: black;
42
+ height: 90%;
43
+ max-height: 800px;
44
+ width: 600px;
45
+ border-radius: 6px;
46
+ overflow: hidden;
47
+ position: relative;
48
+
49
+ &.card-modal-content {
50
+ height: 600px;
51
+
52
+ @media (max-height: 605px) {
53
+ height: 500px;
54
+ }
55
+ }
56
+
57
+ &.fund-modal-content {
58
+ padding: 2rem;
59
+ width: 440px;
60
+ text-align: left;
61
+ background-color: #1c1c1e;
62
+ border-radius: 2.5rem !important;
63
+ overflow: hidden;
64
+ border-radius: 16px;
65
+ text-align: justify;
66
+
67
+ @media (max-width: 992px) {
68
+ padding: 14px;
69
+ width: 100%;
70
+ text-align: left;
71
+ }
72
+ }
73
+
74
+ &.support-modal {
75
+ display: flex;
76
+ flex-direction: column;
77
+ text-align: center;
78
+ align-items: center;
79
+ justify-content: center;
80
+ margin: auto;
81
+ padding: 16px 0;
82
+ height: 330px;
83
+ width: 100%;
84
+
85
+ p {
86
+ text-align: center;
87
+ font-size: 16px;
88
+ margin: 0;
89
+ }
90
+ }
91
+
92
+ &.offer-modal {
93
+ padding: 32px;
94
+ flex-direction: row;
95
+
96
+ h2 {
97
+ color: #4af5d3;
98
+ }
99
+
100
+ @media (max-width: 992px) {
101
+ flex-direction: column;
102
+ padding: 16px 24px;
103
+ height: 600px;
104
+ overflow-y: auto;
105
+ }
106
+ }
107
+
108
+ @media (max-width: 992px) {
109
+ width: 320px;
110
+ text-align: center;
111
+ }
112
+ `;
113
+ export const SFundModalButton = styled(Button) `
114
+ height: 30px;
115
+ width: 30px;
116
+ padding: 0;
117
+ border: none;
118
+ background-color: transparent;
119
+ font-family: system-ui, sans-serif;
120
+
121
+ &:hover {
122
+ border: none;
123
+ }
124
+ `;
125
+ export const SModalHeader = styled.div `
126
+ padding: 0 16px;
127
+ width: 100%;
128
+ `;
129
+ export const SModalTitle = styled.h2 `
130
+ font-size: 20px;
131
+ font-weight: 600;
132
+ color: white;
133
+ line-height: 1;
134
+
135
+ @media (max-width: 600px) {
136
+ font-size: 18px;
137
+ margin-inline: 12px;
138
+ }
139
+ `;
140
+ export const SModalDescription = styled.p `
141
+ font-size: 16px;
142
+ color: #aaa;
143
+ margin: 8px 0;
144
+ text-align: justify;
145
+
146
+ @media (max-width: 600px) {
147
+ font-size: 14px;
148
+ margin-inline: 12px;
149
+ text-align: left;
150
+ }
151
+ `;
152
+ export const SModalBody = styled.div `
153
+ overflow-y: auto;
154
+ flex-grow: 1;
155
+ width: 100%;
156
+ padding: 16px;
157
+
158
+ @media (max-width: 600px) {
159
+ padding: 8px;
160
+ overflow-x: hidden;
161
+ }
162
+
163
+ &.support-modal-content {
164
+ width: 100%;
165
+ width: -moz-available; /* WebKit-based browsers will ignore this. */
166
+ width: -webkit-fill-available; /* Firefox will ignore this. */
167
+ align-items: center;
168
+ justify-content: center;
169
+ margin: auto;
170
+ height: 100%;
171
+ line-height: 1.5;
172
+
173
+ @media (max-width: 992px) {
174
+ padding: 20px 24px;
175
+ }
176
+ }
177
+ `;
178
+ export const SModalFooter = styled.div `
179
+ width: 100%;
180
+ display: flex;
181
+ justify-content: space-between;
182
+ align-items: center;
183
+
184
+ &.submit-button {
185
+ position: absolute;
186
+ bottom: 20px;
187
+ left: 50%;
188
+ transform: translateX(-50%);
189
+ display: flex;
190
+ justify-content: center;
191
+ }
192
+
193
+ .next-button {
194
+ display: flex;
195
+ justify-content: flex-end;
196
+ }
197
+ `;
198
+ export const SModalButton = styled(Button) `
199
+ width: 30px !important;
200
+ aspect-ratio: 1;
201
+ padding: 0;
202
+ border: none;
203
+ background-color: transparent;
204
+ font-family: system-ui, sans-serif;
205
+
206
+ &:hover {
207
+ border: none;
208
+ }
209
+ `;
210
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/components/shared/Modal/styles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAQ,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;;;;;;;;;;;;CAa5D,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAQ,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;;;;;;;;;;;;;;;;CAiBnD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4EtC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAQ,MAAM,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;CAWlD,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGrC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;CAUnC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,CAAC,CAAA;;;;;;;;;;;CAWxC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBnC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;CAmBrC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAQ,MAAM,CAAC,MAAM,CAAC,CAAA;;;;;;;;;;;CAW9C,CAAC"}
@@ -0,0 +1,18 @@
1
+ export interface ModalCardProps {
2
+ title: React.ReactNode;
3
+ description?: React.ReactNode;
4
+ children: React.ReactNode;
5
+ submit?: React.ReactNode;
6
+ isVisible?: boolean;
7
+ setIsVisible?: (isVisible: boolean) => void;
8
+ className?: string;
9
+ stepIdx?: number;
10
+ onClose?: () => void;
11
+ setStepIdx?: (idx: number) => void;
12
+ maxHeight?: string;
13
+ style?: React.CSSProperties;
14
+ closeIcon: any;
15
+ caretLeftIcon: any;
16
+ isMobileScreen: any;
17
+ }
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/Modal/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,EAAE,GAAG,CAAC;IACf,aAAa,EAAE,GAAG,CAAC;IACnB,cAAc,EAAE,GAAG,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/shared/Modal/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;;;;;;;GAcG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2CAA2C;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,gDAAgD;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,iCAAiC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;;;;;;;GAcG"}
@@ -8,7 +8,7 @@ export interface IActiveWallet extends ConnectedWallet {
8
8
  getSolanaProvider?: () => Promise<any>;
9
9
  }
10
10
  export declare const useActiveWallet: () => {
11
- activeWallet: IActiveWallet;
11
+ activeWallet: ConnectedWallet;
12
12
  isWalletAuthed: boolean;
13
13
  walletAddress: string;
14
14
  ready: boolean;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useActiveWallet.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActiveWallet.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,mBAAmB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,eAAe;;;;;;;;CAyD3B,CAAC"}
@@ -9,10 +9,20 @@ export const useActiveWallet = () => {
9
9
  const { wallets: unlinkedWallets } = useWallets();
10
10
  const wallets = useMemo(() => unlinkedWallets.filter((wallet) => wallet.linked), [unlinkedWallets]);
11
11
  // Previous stable pattern: select first linked wallet as active
12
+ // Type guard for IActiveWallet
13
+ function isActiveWallet(obj) {
14
+ return (obj &&
15
+ typeof obj.getEthereumProvider === "function" &&
16
+ // If you need Solana, you can add:
17
+ (typeof obj.getSolanaProvider === "function" ||
18
+ typeof obj.getSolanaProvider === "undefined"));
19
+ }
12
20
  const activeWallet = useMemo(() => {
13
21
  if (!ready || !authenticated || wallets.length === 0)
14
22
  return null;
15
- return wallets[0];
23
+ const selectedWallet = wallets[0];
24
+ // Only return if it passes the type guard
25
+ return isActiveWallet(selectedWallet) ? selectedWallet : null;
16
26
  }, [ready, authenticated, wallets]);
17
27
  const walletAddress = useMemo(() => activeWallet?.address || "", [activeWallet]);
18
28
  const isWalletAuthed = useMemo(() => Boolean(activeWallet), [activeWallet]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useActiveWallet.js","sourceRoot":"","sources":["../../../src/hooks/useActiveWallet.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,UAAU,GAEX,MAAM,sBAAsB,CAAC;AAO9B,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC5C,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,UAAU,EAAE,CAAC;IAClD,MAAM,OAAO,GAAG,OAAO,CACrB,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EACvD,CAAC,eAAe,CAAC,CAClB,CAAC;IAEF,gEAAgE;IAChE,+BAA+B;IAC/B,SAAS,cAAc,CAAC,GAA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{"version":3,"file":"useAuthActions.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuthActions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,eAAO,MAAM,cAAc;IAMvB,yCAAyC;;IAEzC,yCAAyC;;IAEzC,uCAAuC;;IAEvC,8CAA8C;;CAGjD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAuthActions.js","sourceRoot":"","sources":["../../../src/hooks/useAuthActions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,QAAQ,EAAE,CAAC;IAE5C,OAAO;QACL,yCAAyC;QACzC,KAAK;QACL,yCAAyC;QACzC,MAAM;QACN,uCAAuC;QACvC,OAAO,EAAE,KAAK;QACd,8CAA8C;QAC9C,eAAe,EAAE,aAAa;KAC/B,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConnectedWallets.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConnectedWallets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,mBAAmB;IA6B5B,mCAAmC;;IAEnC,uCAAuC;;IAEvC,sCAAsC;;IAEtC,0DAA0D;;IAE1D,oCAAoC;;IAEpC,6BAA6B;;CAGhC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConnectedWallets.js","sourceRoot":"","sources":["../../../src/hooks/useConnectedWallets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,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ACtC,cAAc;QACd,0DAA0D;QAC1D,cAAc;QACd,oCAAoC;QACpC,eAAe,EAAE,aAAa,IAAI,KAAK;QACvC,6BAA6B;QAC7B,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsAuthenticated.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsAuthenticated.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,kBAAkB;IAQ3B,qDAAqD;;IAErD,6BAA6B;;IAE7B,kCAAkC;;IAElC,wBAAwB;;CAG3B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsAuthenticated.js","sourceRoot":"","sources":["../../../src/hooks/useIsAuthenticated.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,QAAQ,EAAE,CAAC;IAClD,MAAM,EAAE,gBAAgB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEnD,MAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC;IAC9C,MAAM,oBAAoB,GAAG,aAAa,IAAI,KAAK,IAAI,SAAS,CAAC;IAEjE,OAAO;QACL,qDAAqD;QACrD,eAAe,EAAE,oBAAoB;QACrC,6BAA6B;QAC7B,IAAI;QACJ,kCAAkC;QAClC,WAAW,EAAE,gBAAgB,CAAC,MAAM;QACpC,wBAAwB;QACxB,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWalletAddresses.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWalletAddresses.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,eAAO,MAAM,kBAAkB;IA6B3B,oCAAoC;;IAEpC,kCAAkC;;IAElC,+BAA+B;;IAE/B,6BAA6B;;CAGhC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * useWalletAddresses - Address extraction by chain type
3
3
  * Get wallet addresses organized by blockchain
4
4
  */
5
- import { useMemo, useEffect } from "react";
5
+ import { useMemo } from "react";
6
6
  import { useConnectedWallets } from "./useConnectedWallets";
7
7
  export const useWalletAddresses = () => {
8
8
  const { connectedWallets } = useConnectedWallets();
@@ -10,9 +10,7 @@ export const useWalletAddresses = () => {
10
10
  return connectedWallets
11
11
  .filter((w) => {
12
12
  // Multiple ways to check for Ethereum wallets
13
- const chainType = w.chainType;
14
- const walletClientType = w.walletClientType;
15
- const connectorType = w.connectorType;
13
+ const { chainType, walletClientType, connectorType } = w;
16
14
  return (chainType === "ethereum" ||
17
15
  walletClientType === "ethereum" ||
18
16
  connectorType === "embedded" || // Embedded wallets are usually Ethereum
@@ -25,20 +23,11 @@ export const useWalletAddresses = () => {
25
23
  const solanaAddresses = useMemo(() => {
26
24
  return connectedWallets
27
25
  .filter((w) => {
28
- const chainType = w.chainType;
29
- const walletClientType = w.walletClientType;
26
+ const { chainType, walletClientType } = w;
30
27
  return chainType === "solana" || walletClientType === "solana";
31
28
  })
32
29
  .map((w) => w.address);
33
30
  }, [connectedWallets]);
34
- // Debug logging
35
- useEffect(() => {
36
- if (process.env.NODE_ENV === "development") {
37
- console.log("[fare-privy-core] Connected wallets:", connectedWallets);
38
- console.log("[fare-privy-core] Ethereum addresses:", ethereumAddresses);
39
- console.log("[fare-privy-core] Solana addresses:", solanaAddresses);
40
- }
41
- }, [connectedWallets, ethereumAddresses, solanaAddresses]);
42
31
  return {
43
32
  /** All Ethereum wallet addresses */
44
33
  ethereumAddresses,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWalletAddresses.js","sourceRoot":"","sources":["../../../src/hooks/useWalletAddresses.ts"],"names":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Ae;QACf,+BAA+B;QAC/B,sBAAsB,EAAE,iBAAiB,CAAC,CAAC,CAAC,IAAI,IAAI;QACpD,6BAA6B;QAC7B,oBAAoB,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,IAAI;KACjD,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWalletBalance.d.ts","sourceRoot":"","sources":["../../../src/hooks/useWalletBalance.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CA+IhD"}
@@ -45,7 +45,7 @@ export function useWalletBalance() {
45
45
  setEthereumBalance(null);
46
46
  }
47
47
  // Solana placeholder (Privy doesn't support Solana balances in React SDK yet)
48
- setSolanaBalance("0.0000");
48
+ setSolanaBalance(null);
49
49
  }
50
50
  catch (fetchError) {
51
51
  console.error("Error fetching wallet balance:", fetchError);
@@ -60,15 +60,82 @@ export function useWalletBalance() {
60
60
  }, [activeWallet?.address]);
61
61
  // Reset balances when wallet changes
62
62
  useEffect(() => {
63
+ let cancelled = false;
64
+ const safeSetEthereumBalance = (val) => {
65
+ if (!cancelled)
66
+ setEthereumBalance(val);
67
+ };
68
+ const safeSetSolanaBalance = (val) => {
69
+ if (!cancelled)
70
+ setSolanaBalance(val);
71
+ };
72
+ const safeSetError = (val) => {
73
+ if (!cancelled)
74
+ setError(val);
75
+ };
76
+ const safeSetLoading = (val) => {
77
+ if (!cancelled)
78
+ setLoading(val);
79
+ };
80
+ const fetchBalancesWithCancel = async () => {
81
+ if (!activeWallet || fetchingRef.current) {
82
+ return;
83
+ }
84
+ fetchingRef.current = true;
85
+ safeSetLoading(true);
86
+ safeSetError(null);
87
+ try {
88
+ // For Ethereum wallets, try to get balance
89
+ if (activeWallet.address && activeWallet.getEthereumProvider) {
90
+ try {
91
+ const provider = await activeWallet.getEthereumProvider();
92
+ if (provider && provider.request) {
93
+ const balance = await provider.request({
94
+ method: "eth_getBalance",
95
+ params: [activeWallet.address, "latest"],
96
+ });
97
+ const balanceInWei = parseInt(balance, 16);
98
+ const balanceInEth = (balanceInWei / Math.pow(10, 18)).toFixed(4);
99
+ safeSetEthereumBalance(balanceInEth);
100
+ }
101
+ else {
102
+ safeSetEthereumBalance("0.0000");
103
+ }
104
+ }
105
+ catch (providerError) {
106
+ console.log("Provider balance fetch failed, using placeholder:", providerError);
107
+ safeSetEthereumBalance("0.0000");
108
+ }
109
+ }
110
+ else {
111
+ safeSetEthereumBalance(null);
112
+ }
113
+ // Solana placeholder
114
+ safeSetSolanaBalance(null);
115
+ }
116
+ catch (fetchError) {
117
+ console.error("Error fetching wallet balance:", fetchError);
118
+ safeSetError("Failed to fetch balance");
119
+ safeSetEthereumBalance(null);
120
+ safeSetSolanaBalance(null);
121
+ }
122
+ finally {
123
+ safeSetLoading(false);
124
+ fetchingRef.current = false;
125
+ }
126
+ };
63
127
  if (activeWallet?.address) {
64
- fetchBalances();
128
+ fetchBalancesWithCancel();
65
129
  }
66
130
  else {
67
- setEthereumBalance(null);
68
- setSolanaBalance(null);
69
- setError(null);
131
+ safeSetEthereumBalance(null);
132
+ safeSetSolanaBalance(null);
133
+ safeSetError(null);
70
134
  }
71
- }, [activeWallet?.address, fetchBalances]); // Include fetchBalances since it's stable with useCallback
135
+ return () => {
136
+ cancelled = true;
137
+ };
138
+ }, [activeWallet?.address]);
72
139
  return {
73
140
  ethereumBalance,
74
141
  solanaBalance,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWalletBalance.js","sourceRoot":"","sources":["../../../src/hooks/useWalletBalance.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,OAAO,EAAE,QAAQ,EAAE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QACP,KAAK;QACL,cAAc,EAAE,aAAa;KAC9B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ export interface SelectWalletModalProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ wallets: Array<{
5
+ address: string;
6
+ meta: {
7
+ name: string;
8
+ icon?: string;
9
+ };
10
+ walletClientType: string;
11
+ linked: boolean;
12
+ }>;
13
+ appWalletClientType: string;
14
+ setAppWalletClientType: (type: string) => void;
15
+ linkWalletToUser: () => Promise<void>;
16
+ embeddedWalletLinks?: Array<{
17
+ type: string;
18
+ address?: string;
19
+ number?: string;
20
+ }>;
21
+ icons: {
22
+ dragBar: string;
23
+ privyIcon: string;
24
+ caretDown: string;
25
+ linkWallet: string;
26
+ };
27
+ isMobileScreen?: boolean;
28
+ }
29
+ export declare const SelectWalletModal: (props: SelectWalletModalProps) => import("react/jsx-runtime").JSX.Element;
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modals/SelectWalletModal/index.tsx"],"names":[],"mappings":"AA4BA,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACtC,gBAAgB,EAAE,MAAM,CAAC;QACzB,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC,CAAC;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,gBAAgB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,mBAAmB,CAAC,EAAE,KAAK,CAAC;QAC1B,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAyKD,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,4CAoC9D,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useMemo, useCallback } from "react";
3
+ import { AnimatePresence } from "framer-motion";
4
+ import { SSelectWalletModal, SGradientWalletModalContent, SSelectWalletModalContent, SWalletItem, SAccordionButtonContainer, SWalletInfo, SWalletAddress, SWalletName, SWalletIcon, SAccordionButton, SEmbeddedWalletsList, SWalletItemList, SWalletHeader, SEmbeddedWalletItem, SUnlinkButton, } from "./styles";
5
+ import { modalVariants, modalContentVariants, mobileModalContentVariants, embeddedWalletsListVariants, } from "./variants";
6
+ const SelectWalletModalContent = ({ closeModal, wallets, appWalletClientType, setAppWalletClientType, linkWalletToUser, embeddedWalletLinks = [], icons, isMobileScreen = false, }) => {
7
+ const [expandedWallets, setExpandedWallets] = useState([]);
8
+ const filteredWallets = useMemo(() => wallets.filter((wallet) => wallet.linked), [wallets]);
9
+ const selectedWallet = useMemo(() => wallets.find((wallet) => wallet.walletClientType === appWalletClientType) || wallets[0], [wallets, appWalletClientType]);
10
+ const handleLinkNewWallet = useCallback(async () => {
11
+ try {
12
+ await linkWalletToUser();
13
+ }
14
+ catch (err) {
15
+ console.error(err);
16
+ }
17
+ }, [linkWalletToUser]);
18
+ return (_jsx(SGradientWalletModalContent, { variants: isMobileScreen ? mobileModalContentVariants : modalContentVariants, initial: "initial", animate: "animate", exit: "exit", children: _jsxs(SSelectWalletModalContent, { children: [filteredWallets.map((wallet) => {
19
+ const isSelected = wallet.walletClientType === selectedWallet.walletClientType;
20
+ const onClick = () => {
21
+ if (isSelected)
22
+ return;
23
+ setAppWalletClientType(wallet.walletClientType);
24
+ setTimeout(closeModal, 300);
25
+ };
26
+ const isPrivyWallet = wallet.walletClientType === "privy";
27
+ const embeddedWallets = embeddedWalletLinks
28
+ ?.filter(() => isPrivyWallet)
29
+ .map((walletLink) => {
30
+ const displayName = walletLink.type.split("_")[0];
31
+ const displayValue = walletLink.address || walletLink.number;
32
+ return (_jsxs(SEmbeddedWalletItem, { children: [_jsxs("div", { className: "wallet-info", children: [_jsx("span", { className: "small-text", children: displayName }), _jsx("span", { className: "small-text", children: displayValue })] }), _jsx(SUnlinkButton, { onClick: (e) => {
33
+ e.stopPropagation();
34
+ // Unlink logic should be handled by consumer
35
+ }, children: "UNLINK" })] }, walletLink.type));
36
+ });
37
+ return (_jsxs(SWalletItemList, { children: [isMobileScreen && (_jsx("img", { style: { marginInline: "auto" }, src: icons.dragBar, alt: "drag bar", width: 32 })), _jsx(SWalletHeader, { children: "SELECT OR LINK A WALLET" }), _jsxs(SWalletItem, { "$isActive": isSelected, onClick: onClick, children: [_jsxs(SWalletInfo, { children: [_jsxs(SWalletAddress, { children: [wallet.address.substring(0, 10), "...", " ", isSelected && (_jsx("span", { className: "small-text", children: "(selected)" }))] }), _jsx(SWalletName, { children: wallet.meta.name })] }), _jsxs(SAccordionButtonContainer, { className: "accordion-button-container", children: [_jsx(SWalletIcon, { src: wallet.meta.icon || icons.privyIcon, alt: wallet.meta.name }), isPrivyWallet &&
38
+ embeddedWallets &&
39
+ embeddedWallets.length > 0 && (_jsx(SAccordionButton, { "$isExpanded": expandedWallets.includes(wallet.address), onClick: (e) => {
40
+ e.stopPropagation();
41
+ setExpandedWallets((prev) => prev.includes(wallet.address)
42
+ ? prev.filter((addr) => addr !== wallet.address)
43
+ : [...prev, wallet.address]);
44
+ }, children: _jsx("img", { src: icons.caretDown, alt: "accordion icon" }) }))] })] }, wallet.address), isPrivyWallet &&
45
+ embeddedWallets &&
46
+ embeddedWallets.length > 0 && (_jsx(SEmbeddedWalletsList, { "$isActive": isSelected, initial: "closed", animate: expandedWallets.includes(wallet.address)
47
+ ? "open"
48
+ : "closed", variants: embeddedWalletsListVariants, children: embeddedWallets }))] }, wallet.address));
49
+ }), _jsxs(SWalletItem, { className: "link-wallet-option", "$isActive": false, onClick: handleLinkNewWallet, children: [_jsxs(SWalletInfo, { children: [_jsx(SWalletAddress, { children: "LINK A WALLET" }), _jsx(SWalletName, { children: "New Wallet" })] }), _jsx(SWalletIcon, { className: "large-icon", src: icons.linkWallet, alt: "link wallet" })] }, "link-wallet")] }) }));
50
+ };
51
+ export const SelectWalletModal = (props) => {
52
+ const { isOpen, onClose, isMobileScreen = false, ...rest } = props;
53
+ const handleOverlayClick = (e) => {
54
+ if (e.target === e.currentTarget) {
55
+ onClose();
56
+ }
57
+ };
58
+ return (_jsx(AnimatePresence, { children: isOpen ? (_jsx(SSelectWalletModal, { variants: modalVariants, initial: "initial", animate: "animate", exit: "exit", onClick: handleOverlayClick, ...(isMobileScreen && {
59
+ drag: "y",
60
+ dragConstraints: { top: 0, bottom: 0 },
61
+ dragElastic: 0.5,
62
+ onDragEnd: (_, info) => {
63
+ if (info.offset.y > 100)
64
+ onClose();
65
+ },
66
+ }), children: _jsx(SelectWalletModalContent, { closeModal: onClose, isMobileScreen: isMobileScreen, ...rest }) })) : null }));
67
+ };
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modals/SelectWalletModal/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,yBAAyB,EACzB,WAA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