@coin-voyage/paykit 0.1.21 → 0.1.22

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 (138) hide show
  1. package/LICENSE +26 -26
  2. package/README.md +35 -35
  3. package/dist/assets/chains.d.ts +1 -0
  4. package/dist/assets/chains.js +5 -1
  5. package/dist/assets/chains.js.map +1 -1
  6. package/dist/assets/logos.d.ts +26 -26
  7. package/dist/assets/logos.js +31 -28
  8. package/dist/assets/logos.js.map +1 -1
  9. package/dist/assets/mobile-with-logos.d.ts +1 -0
  10. package/dist/assets/mobile-with-logos.js +7 -0
  11. package/dist/assets/mobile-with-logos.js.map +1 -0
  12. package/dist/assets/scan-icon-with-logos.d.ts +4 -0
  13. package/dist/assets/{ScanIconWithLogos.js → scan-icon-with-logos.js} +19 -19
  14. package/dist/assets/scan-icon-with-logos.js.map +1 -0
  15. package/dist/components/Pages/About/graphics.js +39 -39
  16. package/dist/components/Pages/About/styles.js +123 -123
  17. package/dist/components/Pages/Confirmation/index.js +53 -53
  18. package/dist/components/Pages/Connectors/index.js +3 -11
  19. package/dist/components/Pages/Connectors/index.js.map +1 -1
  20. package/dist/components/Pages/Connectors/styles.js +248 -248
  21. package/dist/components/Pages/MobileConnectors/index.js +56 -41
  22. package/dist/components/Pages/MobileConnectors/index.js.map +1 -1
  23. package/dist/components/Pages/MobileConnectors/styles.js +51 -51
  24. package/dist/components/Pages/Onboarding/index.js +1 -1
  25. package/dist/components/Pages/Onboarding/index.js.map +1 -1
  26. package/dist/components/Pages/Onboarding/styles.js +208 -208
  27. package/dist/components/Pages/PayWithToken/index.js +39 -39
  28. package/dist/components/Pages/SelectMethod/index.js +7 -61
  29. package/dist/components/Pages/SelectMethod/index.js.map +1 -1
  30. package/dist/components/Pages/SelectMethod/styles.js +246 -246
  31. package/dist/components/Pages/SelectToken/index.js +8 -64
  32. package/dist/components/Pages/SelectToken/index.js.map +1 -1
  33. package/dist/components/pay-button/styles.js +28 -28
  34. package/dist/components/pay-modal/ConnectUsing.d.ts +1 -2
  35. package/dist/components/pay-modal/ConnectUsing.js +5 -6
  36. package/dist/components/pay-modal/ConnectUsing.js.map +1 -1
  37. package/dist/components/pay-modal/ConnectWithInjector/index.js +2 -4
  38. package/dist/components/pay-modal/ConnectWithInjector/index.js.map +1 -1
  39. package/dist/components/pay-modal/ConnectWithInjector/styles.js +82 -82
  40. package/dist/components/pay-modal/ConnectWithQRCode.d.ts +1 -2
  41. package/dist/components/pay-modal/ConnectWithQRCode.js +14 -23
  42. package/dist/components/pay-modal/ConnectWithQRCode.js.map +1 -1
  43. package/dist/components/pay-modal/index.js +7 -4
  44. package/dist/components/pay-modal/index.js.map +1 -1
  45. package/dist/components/spinners/CircleSpinner/styles.js +105 -105
  46. package/dist/components/spinners/SquircleSpinner/styles.js +56 -56
  47. package/dist/components/ui/Alert/styles.js +42 -42
  48. package/dist/components/ui/AnimationContainer/styles.js +32 -32
  49. package/dist/components/ui/BrowserIcon/styles.js +13 -13
  50. package/dist/components/ui/Button/styles.js +259 -259
  51. package/dist/components/ui/ChainSelectList/styles.js +209 -209
  52. package/dist/components/ui/ConnectorList/index.d.ts +1 -2
  53. package/dist/components/ui/ConnectorList/index.js +40 -34
  54. package/dist/components/ui/ConnectorList/index.js.map +1 -1
  55. package/dist/components/ui/ConnectorList/styles.js +285 -285
  56. package/dist/components/ui/CopyToClipboard/CopyToClipboardIcon.js +55 -55
  57. package/dist/components/ui/CopyToClipboard/index.d.ts +1 -1
  58. package/dist/components/ui/CopyToClipboard/index.js +34 -41
  59. package/dist/components/ui/CopyToClipboard/index.js.map +1 -1
  60. package/dist/components/ui/CustomQRCode/styles.js +140 -140
  61. package/dist/components/ui/Logo/styles.js +21 -21
  62. package/dist/components/ui/Modal/index.js +3 -4
  63. package/dist/components/ui/Modal/index.js.map +1 -1
  64. package/dist/components/ui/Modal/styles.js +645 -645
  65. package/dist/components/ui/OptionsList/index.d.ts +5 -12
  66. package/dist/components/ui/OptionsList/index.js +64 -65
  67. package/dist/components/ui/OptionsList/index.js.map +1 -1
  68. package/dist/components/ui/OptionsList/styles.js +150 -150
  69. package/dist/components/ui/OptionsList/types.d.ts +9 -0
  70. package/dist/components/ui/OptionsList/types.js +2 -0
  71. package/dist/components/ui/OptionsList/types.js.map +1 -0
  72. package/dist/components/ui/OrderHeader/index.js +68 -68
  73. package/dist/components/ui/PoweredByFooter/index.js +29 -29
  74. package/dist/components/ui/ScrollArea/styles.js +156 -156
  75. package/dist/components/ui/Skeleton/styles.js +8 -8
  76. package/dist/components/ui/Spinner/styles.js +13 -13
  77. package/dist/components/ui/ThemedButton/styles.js +151 -151
  78. package/dist/components/ui/TokenChainLogo/index.d.ts +6 -0
  79. package/dist/components/ui/TokenChainLogo/index.js +7 -0
  80. package/dist/components/ui/TokenChainLogo/index.js.map +1 -0
  81. package/dist/components/ui/TokenChainLogo/styles.d.ts +2 -0
  82. package/dist/components/ui/TokenChainLogo/styles.js +16 -0
  83. package/dist/components/ui/TokenChainLogo/styles.js.map +1 -0
  84. package/dist/components/ui/Tooltip/index.d.ts +1 -3
  85. package/dist/components/ui/Tooltip/index.js +2 -3
  86. package/dist/components/ui/Tooltip/index.js.map +1 -1
  87. package/dist/components/ui/Tooltip/styles.js +72 -72
  88. package/dist/hooks/useChainIsSupported.js +3 -3
  89. package/dist/hooks/useChainIsSupported.js.map +1 -1
  90. package/dist/hooks/useConnect.js +2 -17
  91. package/dist/hooks/useConnect.js.map +1 -1
  92. package/dist/hooks/useConnectors.d.ts +0 -4
  93. package/dist/hooks/useConnectors.js +0 -44
  94. package/dist/hooks/useConnectors.js.map +1 -1
  95. package/dist/hooks/useFocusTrap.js +8 -8
  96. package/dist/hooks/useMethodOptions.d.ts +12 -0
  97. package/dist/hooks/useMethodOptions.js +68 -0
  98. package/dist/hooks/useMethodOptions.js.map +1 -0
  99. package/dist/hooks/usePaymentState.d.ts +1 -1
  100. package/dist/hooks/usePaymentState.js +3 -3
  101. package/dist/hooks/usePaymentState.js.map +1 -1
  102. package/dist/hooks/useTokenOptions.d.ts +10 -0
  103. package/dist/hooks/useTokenOptions.js +51 -0
  104. package/dist/hooks/useTokenOptions.js.map +1 -0
  105. package/dist/hooks/useWalletConnectModal.js +55 -27
  106. package/dist/hooks/useWalletConnectModal.js.map +1 -1
  107. package/dist/hooks/useWalletConnectUri.js +8 -18
  108. package/dist/hooks/useWalletConnectUri.js.map +1 -1
  109. package/dist/hooks/useWallets.js +10 -12
  110. package/dist/hooks/useWallets.js.map +1 -1
  111. package/dist/lib/api/client.js +2 -1
  112. package/dist/lib/api/client.js.map +1 -1
  113. package/dist/lib/config/wallet.js +92 -247
  114. package/dist/lib/config/wallet.js.map +1 -1
  115. package/dist/lib/localizations/locales/ar-AE.js +2 -2
  116. package/dist/providers/api-provider.js +2 -1
  117. package/dist/providers/api-provider.js.map +1 -1
  118. package/dist/providers/paykit-provider.js +40 -4
  119. package/dist/providers/paykit-provider.js.map +1 -1
  120. package/dist/styles/index.js +84 -84
  121. package/dist/styles/themes/web95.js +16 -16
  122. package/dist/types/state.d.ts +9 -0
  123. package/dist/types/state.js +2 -0
  124. package/dist/types/state.js.map +1 -0
  125. package/dist/types.d.ts +0 -2
  126. package/dist/utils/index.d.ts +2 -1
  127. package/dist/utils/index.js +6 -1
  128. package/dist/utils/index.js.map +1 -1
  129. package/dist/utils/p3.js +5 -5
  130. package/package.json +7 -6
  131. package/dist/assets/ScanIconWithLogos.d.ts +0 -5
  132. package/dist/assets/ScanIconWithLogos.js.map +0 -1
  133. package/dist/components/contexts/web3/index.d.ts +0 -25
  134. package/dist/components/contexts/web3/index.js +0 -26
  135. package/dist/components/contexts/web3/index.js.map +0 -1
  136. package/dist/hooks/useLastConnector.d.ts +0 -4
  137. package/dist/hooks/useLastConnector.js +0 -21
  138. package/dist/hooks/useLastConnector.js.map +0 -1
@@ -2,224 +2,224 @@ import { motion } from "framer-motion";
2
2
  import { css } from "styled-components";
3
3
  import styled from "../../../styles/styled";
4
4
  import defaultTheme from "../../../lib/config/default-theme";
5
- export const SwitchNetworksContainer = styled.div `
6
- display: flex;
7
- flex-direction: column;
8
-
9
- @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
10
- flex-direction: column-reverse;
11
- }
5
+ export const SwitchNetworksContainer = styled.div `
6
+ display: flex;
7
+ flex-direction: column;
8
+
9
+ @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
10
+ flex-direction: column-reverse;
11
+ }
12
12
  `;
13
- export const ChainIcon = styled(motion.div) `
14
- display: block;
15
- position: relative;
16
- border-radius: 12px;
17
- overflow: hidden;
18
- width: 24px;
19
- height: 24px;
20
- min-width: 24px;
21
- min-height: 24px;
22
- background: var(--ck-body-background);
23
- svg {
24
- border-radius: inherit;
25
- display: block;
26
- position: relative;
27
- transform: translate3d(0, 0, 0);
28
- width: 100%;
29
- height: auto;
30
- }
13
+ export const ChainIcon = styled(motion.div) `
14
+ display: block;
15
+ position: relative;
16
+ border-radius: 12px;
17
+ overflow: hidden;
18
+ width: 24px;
19
+ height: 24px;
20
+ min-width: 24px;
21
+ min-height: 24px;
22
+ background: var(--ck-body-background);
23
+ svg {
24
+ border-radius: inherit;
25
+ display: block;
26
+ position: relative;
27
+ transform: translate3d(0, 0, 0);
28
+ width: 100%;
29
+ height: auto;
30
+ }
31
31
  ${(props) => props.$empty &&
32
- css `
33
- display: flex;
34
- align-items: center;
35
- justify-content: center;
36
- &:before {
37
- content: "?";
38
- color: var(--ck-body-color-muted);
39
- font-weight: bold;
40
- font-family: var(--ck-font-family);
41
- }
42
- `}
43
- @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
44
- border-radius: 16px;
45
- width: 32px;
46
- height: 32px;
47
- }
32
+ css `
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ &:before {
37
+ content: "?";
38
+ color: var(--ck-body-color-muted);
39
+ font-weight: bold;
40
+ font-family: var(--ck-font-family);
41
+ }
42
+ `}
43
+ @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
44
+ border-radius: 16px;
45
+ width: 32px;
46
+ height: 32px;
47
+ }
48
48
  `;
49
- export const ChainLogoContainer = styled(motion.div) `
50
- position: relative;
49
+ export const ChainLogoContainer = styled(motion.div) `
50
+ position: relative;
51
51
  `;
52
- export const ChainLogoSpinner = styled(motion.div) `
53
- position: absolute;
54
- inset: -6px;
55
- animation: rotateSpinner 1200ms linear infinite;
56
- pointer-events: none;
57
- svg {
58
- display: block;
59
- position: relative;
60
- transform: translate3d(0, 0, 0);
61
- width: 100%;
62
- height: auto;
63
- }
64
- @keyframes rotateSpinner {
65
- 0% {
66
- transform: rotate(0deg);
67
- }
68
- 100% {
69
- transform: rotate(360deg);
70
- }
71
- }
52
+ export const ChainLogoSpinner = styled(motion.div) `
53
+ position: absolute;
54
+ inset: -6px;
55
+ animation: rotateSpinner 1200ms linear infinite;
56
+ pointer-events: none;
57
+ svg {
58
+ display: block;
59
+ position: relative;
60
+ transform: translate3d(0, 0, 0);
61
+ width: 100%;
62
+ height: auto;
63
+ }
64
+ @keyframes rotateSpinner {
65
+ 0% {
66
+ transform: rotate(0deg);
67
+ }
68
+ 100% {
69
+ transform: rotate(360deg);
70
+ }
71
+ }
72
72
  `;
73
- export const ChainButtonContainer = styled.div `
74
- position: relative;
75
- margin: -8px -8px;
76
- &:after {
77
- border-radius: var(--border-radius, 0);
78
- z-index: 2;
79
- content: "";
80
- pointer-events: none;
81
- position: absolute;
82
- inset: 0 2px;
83
- box-shadow:
84
- inset 0 16px 8px -12px var(--background, var(--ck-body-background)),
85
- inset 0 -16px 8px -12px var(--background, var(--ck-body-background));
86
- }
73
+ export const ChainButtonContainer = styled.div `
74
+ position: relative;
75
+ margin: -8px -8px;
76
+ &:after {
77
+ border-radius: var(--border-radius, 0);
78
+ z-index: 2;
79
+ content: "";
80
+ pointer-events: none;
81
+ position: absolute;
82
+ inset: 0 2px;
83
+ box-shadow:
84
+ inset 0 16px 8px -12px var(--background, var(--ck-body-background)),
85
+ inset 0 -16px 8px -12px var(--background, var(--ck-body-background));
86
+ }
87
87
  `;
88
- export const ChainButtons = styled(motion.div) `
89
- padding: 8px;
90
- overflow-x: hidden;
91
- overflow-y: auto;
92
- max-height: 242px;
93
-
94
- -ms-overflow-style: none; /* Internet Explorer 10+ */
95
- scrollbar-width: none; /* Firefox */
96
- &::-webkit-scrollbar {
97
- display: none; /* Safari and Chrome */
98
- }
99
-
100
- @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
101
- padding: 8px 14px;
102
- margin: 2px -2px 0;
103
- max-height: 60vh;
104
- }
88
+ export const ChainButtons = styled(motion.div) `
89
+ padding: 8px;
90
+ overflow-x: hidden;
91
+ overflow-y: auto;
92
+ max-height: 242px;
93
+
94
+ -ms-overflow-style: none; /* Internet Explorer 10+ */
95
+ scrollbar-width: none; /* Firefox */
96
+ &::-webkit-scrollbar {
97
+ display: none; /* Safari and Chrome */
98
+ }
99
+
100
+ @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
101
+ padding: 8px 14px;
102
+ margin: 2px -2px 0;
103
+ max-height: 60vh;
104
+ }
105
105
  `;
106
- export const ChainButton = styled(motion.button) `
107
- appearance: none;
108
- cursor: pointer;
109
- user-select: none;
110
- position: relative;
111
- display: flex;
112
- align-items: center;
113
- justify-content: space-between;
114
- width: 100%;
115
- border-radius: 11px;
116
- margin: 0 0 1px;
117
- padding: 8px 0;
118
- padding-right: 154px;
119
- font-size: 15px;
120
- line-height: 18px;
121
- font-weight: 500;
122
- text-decoration: none;
123
- color: var(--ck-body-color);
124
- background: none;
125
- white-space: nowrap;
126
- transition:
127
- transform 100ms ease,
128
- background-color 100ms ease;
129
- transform: translateZ(0px);
130
- &:before {
131
- content: "";
132
- background: currentColor;
133
- position: absolute;
134
- z-index: -1;
135
- inset: 0 var(--ck-dropdown-active-inset, -8px);
136
- border-radius: var(--ck-dropdown-active-border-radius, 12px);
137
- opacity: 0;
138
- transition: opacity 180ms ease;
139
- }
140
- &:after {
141
- content: "";
142
- position: absolute;
143
- z-index: -1;
144
- inset: 0 var(--ck-dropdown-active-inset, -8px);
145
- border-radius: 12px;
146
- opacity: 0;
147
- transition: opacity 180ms ease;
148
- outline: 2px solid var(--ck-focus-color);
149
- }
150
- @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
151
- font-size: 17px;
152
- padding: 8px 0;
153
- }
154
- @media only screen and (min-width: ${defaultTheme.mobileWidth}px) {
155
- &:hover {
156
- &:before {
157
- transition-duration: 80ms;
158
- opacity: 0.05;
159
- }
160
- }
161
- }
162
- &:active {
163
- transform: scale(0.99) translateZ(0px);
164
- }
165
- &:disabled {
166
- //opacity: 0.4;
167
- pointer-events: none;
168
- }
169
- &:focus-visible {
170
- outline: none !important;
171
- &:after {
172
- opacity: 1;
173
- }
174
- }
106
+ export const ChainButton = styled(motion.button) `
107
+ appearance: none;
108
+ cursor: pointer;
109
+ user-select: none;
110
+ position: relative;
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: space-between;
114
+ width: 100%;
115
+ border-radius: 11px;
116
+ margin: 0 0 1px;
117
+ padding: 8px 0;
118
+ padding-right: 154px;
119
+ font-size: 15px;
120
+ line-height: 18px;
121
+ font-weight: 500;
122
+ text-decoration: none;
123
+ color: var(--ck-body-color);
124
+ background: none;
125
+ white-space: nowrap;
126
+ transition:
127
+ transform 100ms ease,
128
+ background-color 100ms ease;
129
+ transform: translateZ(0px);
130
+ &:before {
131
+ content: "";
132
+ background: currentColor;
133
+ position: absolute;
134
+ z-index: -1;
135
+ inset: 0 var(--ck-dropdown-active-inset, -8px);
136
+ border-radius: var(--ck-dropdown-active-border-radius, 12px);
137
+ opacity: 0;
138
+ transition: opacity 180ms ease;
139
+ }
140
+ &:after {
141
+ content: "";
142
+ position: absolute;
143
+ z-index: -1;
144
+ inset: 0 var(--ck-dropdown-active-inset, -8px);
145
+ border-radius: 12px;
146
+ opacity: 0;
147
+ transition: opacity 180ms ease;
148
+ outline: 2px solid var(--ck-focus-color);
149
+ }
150
+ @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
151
+ font-size: 17px;
152
+ padding: 8px 0;
153
+ }
154
+ @media only screen and (min-width: ${defaultTheme.mobileWidth}px) {
155
+ &:hover {
156
+ &:before {
157
+ transition-duration: 80ms;
158
+ opacity: 0.05;
159
+ }
160
+ }
161
+ }
162
+ &:active {
163
+ transform: scale(0.99) translateZ(0px);
164
+ }
165
+ &:disabled {
166
+ //opacity: 0.4;
167
+ pointer-events: none;
168
+ }
169
+ &:focus-visible {
170
+ outline: none !important;
171
+ &:after {
172
+ opacity: 1;
173
+ }
174
+ }
175
175
  ${(props) => props.$variant === "secondary" &&
176
- css `
177
- padding: 12px 4px;
178
- margin: 0 0 8px;
179
- &:last-child {
180
- margin-bottom: 0;
181
- }
182
- &:before {
183
- opacity: 0.05;
184
- }
185
- &:hover:before {
186
- opacity: 0.1;
187
- }
188
- `}
176
+ css `
177
+ padding: 12px 4px;
178
+ margin: 0 0 8px;
179
+ &:last-child {
180
+ margin-bottom: 0;
181
+ }
182
+ &:before {
183
+ opacity: 0.05;
184
+ }
185
+ &:hover:before {
186
+ opacity: 0.1;
187
+ }
188
+ `}
189
189
  `;
190
- export const ChainButtonStatus = styled(motion.div) `
191
- position: absolute;
192
- top: 0;
193
- bottom: 0;
194
- right: 0;
195
- display: flex;
196
- align-items: center;
197
- justify-content: center;
198
-
199
- color: var(--ck-body-color-muted);
200
- font-size: 15px;
201
- line-height: 18px;
202
- font-weight: 500;
203
- padding-right: 4px;
204
- span {
205
- display: block;
206
- position: relative;
207
- }
208
- @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
209
- font-size: 17px;
210
- padding: 0;
211
- }
190
+ export const ChainButtonStatus = styled(motion.div) `
191
+ position: absolute;
192
+ top: 0;
193
+ bottom: 0;
194
+ right: 0;
195
+ display: flex;
196
+ align-items: center;
197
+ justify-content: center;
198
+
199
+ color: var(--ck-body-color-muted);
200
+ font-size: 15px;
201
+ line-height: 18px;
202
+ font-weight: 500;
203
+ padding-right: 4px;
204
+ span {
205
+ display: block;
206
+ position: relative;
207
+ }
208
+ @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
209
+ font-size: 17px;
210
+ padding: 0;
211
+ }
212
212
  `;
213
- export const ChainButtonBg = styled(motion.div) `
214
- position: absolute;
215
- z-index: -1;
216
- inset: 0 var(--ck-dropdown-active-inset, -8px);
217
- background: var(--ck-dropdown-active-background, rgba(26, 136, 248, 0.1));
218
- box-shadow var(--ck-dropdown-active-box-shadow);
219
- border-radius: var(--ck-dropdown-active-border-radius, 12px);
220
-
221
- @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
222
- inset: 0 var(--ck-dropdown-active-inset, -8px);
223
- }
213
+ export const ChainButtonBg = styled(motion.div) `
214
+ position: absolute;
215
+ z-index: -1;
216
+ inset: 0 var(--ck-dropdown-active-inset, -8px);
217
+ background: var(--ck-dropdown-active-background, rgba(26, 136, 248, 0.1));
218
+ box-shadow var(--ck-dropdown-active-box-shadow);
219
+ border-radius: var(--ck-dropdown-active-border-radius, 12px);
220
+
221
+ @media only screen and (max-width: ${defaultTheme.mobileWidth}px) {
222
+ inset: 0 var(--ck-dropdown-active-inset, -8px);
223
+ }
224
224
  `;
225
225
  //# sourceMappingURL=styles.js.map
@@ -1,2 +1 @@
1
- declare const ConnectorList: () => import("react/jsx-runtime").JSX.Element;
2
- export default ConnectorList;
1
+ export default function ConnectorList(): import("react/jsx-runtime").JSX.Element;
@@ -3,24 +3,33 @@ import { ROUTES } from "../../../types/routes";
3
3
  import { ConnectorButton, ConnectorIcon, ConnectorLabel, ConnectorsContainer, RecentlyUsedTag, } from "./styles";
4
4
  import Alert from "../Alert";
5
5
  import { ScrollArea } from "../ScrollArea";
6
- import { useUniversalConnect } from "@coin-voyage/crypto/hooks";
7
- import { getConnectorId } from "@coin-voyage/crypto/lib/utils/connector";
6
+ import { useLastConnector, useUniversalConnect } from "@coin-voyage/crypto/hooks";
8
7
  import { isWalletInstalled } from "@coin-voyage/crypto/lib/utils/is-wallet-installed";
9
8
  import { useIsMobile } from "@coin-voyage/shared/hooks";
10
9
  import { detectBrowser } from "@coin-voyage/shared/utils";
11
- import { useLastConnector } from "../../../hooks/useLastConnector";
10
+ import useLocales from "../../../hooks/useLocales";
11
+ import { useWalletConnectUri } from "../../../hooks/useWalletConnectUri";
12
12
  import { useWallets } from "../../../hooks/useWallets";
13
13
  import { walletConfigs } from "../../../lib/config/wallet";
14
- import { isCoinbaseWalletConnector, isWalletConnectConnector, } from "../../../utils";
14
+ import { isCoinbaseWalletConnector, isMobileWalletConnector, isWalletConnectConnector, } from "../../../utils";
15
15
  import usePayContext from "../../contexts/pay";
16
- import { useWeb3 } from "../../contexts/web3";
17
- import useLocales from "../../../hooks/useLocales";
18
- const ConnectorList = () => {
16
+ const ignoreHoist = ["walletConnect", "WalletConnect", "mobileWallet"];
17
+ export default function ConnectorList() {
19
18
  const context = usePayContext();
19
+ const { connectorChainType } = context.paymentState;
20
20
  const isMobile = useIsMobile();
21
21
  const installedWallets = useWallets();
22
22
  const { lastConnectorId } = useLastConnector();
23
- const walletsToDisplay = context.options?.hideRecentBadge || lastConnectorId === "walletConnect" // do not hoist walletconnect to top of list
23
+ const mobileWallet = walletConfigs["mobileWallet"];
24
+ if (isMobile && connectorChainType && mobileWallet.chainTypes?.includes(connectorChainType)) {
25
+ installedWallets.push({
26
+ id: "mobileWallet",
27
+ ...mobileWallet,
28
+ isInstalled: true,
29
+ connectors: [],
30
+ });
31
+ }
32
+ const walletsToDisplay = context.options?.hideRecentBadge || (lastConnectorId && ignoreHoist.includes(lastConnectorId))
24
33
  ? installedWallets
25
34
  : [
26
35
  // move last used wallet to top of list
@@ -28,20 +37,17 @@ const ConnectorList = () => {
28
37
  ...installedWallets.filter((wallet) => lastConnectorId === wallet.id),
29
38
  ...installedWallets.filter((wallet) => lastConnectorId !== wallet.id),
30
39
  ];
31
- return (_jsxs(ScrollArea, { mobileDirection: "horizontal", children: [walletsToDisplay.length === 0 && _jsx(Alert, { error: true, children: "No wallets found." }), walletsToDisplay.length > 0 && (_jsx(ConnectorsContainer, { "$mobile": isMobile, "$totalResults": walletsToDisplay.length, children: walletsToDisplay.map((wallet) => (_jsx(ConnectorItem, { wallet: wallet, isRecent: wallet.id === lastConnectorId }, wallet.id))) }))] }));
32
- };
33
- export default ConnectorList;
40
+ return (_jsx(ScrollArea, { children: walletsToDisplay.length > 0 ? (_jsx(ConnectorsContainer, { "$totalResults": walletsToDisplay.length, children: walletsToDisplay.map((wallet) => (_jsx(ConnectorItem, { wallet: wallet, isRecent: wallet.id === lastConnectorId }, wallet.id))) })) :
41
+ _jsx(Alert, { error: true, children: "No wallets found." }) }));
42
+ }
34
43
  const ConnectorItem = ({ wallet, isRecent, }) => {
35
44
  const locales = useLocales();
36
- const { connect: { getUri }, } = useWeb3();
37
- const uri = getUri();
45
+ const { uri } = useWalletConnectUri();
38
46
  const isMobile = useIsMobile();
39
47
  const { route, setRoute, options, paymentState } = usePayContext();
40
- const { updateLastConnectorId } = useLastConnector();
41
48
  const { connect } = useUniversalConnect({
42
49
  onSuccess: (_, variables) => {
43
50
  if (variables?.connector) {
44
- updateLastConnectorId(getConnectorId(variables.connector));
45
51
  setRoute(ROUTES.SELECT_TOKEN);
46
52
  }
47
53
  },
@@ -53,31 +59,31 @@ const ConnectorItem = ({ wallet, isRecent, }) => {
53
59
  });
54
60
  const walletConfig = walletConfigs[wallet.id];
55
61
  let deeplink = !isWalletInstalled(wallet.id) && isMobile && walletConfig
56
- ? walletConfig.getWalletConnectDeeplink?.(uri ?? "")
62
+ ? walletConfig.getWalletDeeplink?.(uri ?? "", paymentState.connectorChainType)
57
63
  : undefined;
58
- const redirectToMoreWallets = isMobile && isWalletConnectConnector(wallet.id);
64
+ const redirectToMoreWallets = isMobile && (isWalletConnectConnector(wallet.id) || isMobileWalletConnector(wallet.id));
59
65
  // Safari requires opening popup on user gesture, so we connect immediately here
60
66
  const shouldConnectImmediately = (detectBrowser() === "safari" || detectBrowser() === "ios") &&
61
67
  isCoinbaseWalletConnector(wallet.id);
62
68
  if (redirectToMoreWallets || shouldConnectImmediately) {
63
69
  deeplink = undefined; // mobile redirects to more wallets page
64
70
  }
65
- return (_jsxs(ConnectorButton, { type: "button", as: deeplink ? "a" : undefined, href: deeplink ? deeplink : undefined, disabled: route !== ROUTES.CONNECTORS, onClick: deeplink
66
- ? undefined
67
- : () => {
68
- if (redirectToMoreWallets) {
69
- setRoute(ROUTES.MOBILECONNECTORS);
70
- }
71
- else {
72
- if (shouldConnectImmediately) {
73
- const walletConnector = wallet.connectors.find(w => w.chainType === paymentState.connectorChainType);
74
- if (!walletConnector)
75
- return;
76
- connect({ walletConnector: walletConnector });
77
- }
78
- setRoute(ROUTES.CONNECT);
79
- paymentState.setSelectedWallet(wallet);
80
- }
81
- }, children: [_jsx(ConnectorIcon, { "data-small": wallet.iconShouldShrink, "data-shape": wallet.iconShape, children: wallet.iconConnector ?? wallet.icon }), _jsxs(ConnectorLabel, { children: [isMobile ? (wallet.shortName ?? wallet.name) : wallet.name, !options?.hideRecentBadge && isRecent && (_jsx(RecentlyUsedTag, { children: locales.recent }))] })] }));
71
+ const handleClick = () => {
72
+ if (deeplink)
73
+ return;
74
+ if (redirectToMoreWallets) {
75
+ setRoute(ROUTES.MOBILECONNECTORS);
76
+ return;
77
+ }
78
+ if (shouldConnectImmediately) {
79
+ const walletConnector = wallet.connectors.find(w => w.chainType === paymentState.connectorChainType);
80
+ if (!walletConnector)
81
+ return;
82
+ connect({ walletConnector: walletConnector });
83
+ }
84
+ setRoute(ROUTES.CONNECT);
85
+ paymentState.setSelectedWallet(wallet);
86
+ };
87
+ return (_jsxs(ConnectorButton, { type: "button", as: deeplink ? "a" : undefined, href: deeplink, disabled: route !== ROUTES.CONNECTORS, onClick: handleClick, children: [_jsx(ConnectorIcon, { "data-small": wallet.iconShouldShrink, "data-shape": wallet.iconShape, children: wallet.iconConnector ?? wallet.icon }), _jsxs(ConnectorLabel, { children: [isMobile ? (wallet.shortName ?? wallet.name) : wallet.name, !options?.hideRecentBadge && isRecent && (_jsx(RecentlyUsedTag, { children: locales.recent }))] })] }));
82
88
  };
83
89
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/ConnectorList/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C,OAAO,EACL,eAAe,EACf,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,eAAe,GAChB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAA;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EACL,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,gBAAgB,CAAA;AACvB,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,UAAU,MAAM,2BAA2B,CAAA;AAElD,MAAM,aAAa,GAAG,GAAG,EAAE;IACzB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAA;IAC/B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAE9B,MAAM,gBAAgB,GAAG,UAAU,EAAE,CAAA;IACrC,MAAM,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