@funkit/connect-rn 2.1.0 → 3.0.0
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.
- package/CHANGELOG.md +51 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1075 -704
- package/dist/index.js.map +4 -4
- package/dist/src/flow/AddressCopiedToast.d.ts +4 -3
- package/dist/src/flow/AddressCopiedToast.d.ts.map +1 -1
- package/dist/src/flow/FunkitFlowProvider.d.ts.map +1 -1
- package/dist/src/geo/useCheckoutBlocked.d.ts.map +1 -1
- package/dist/src/geo/useUserIpInfo.d.ts +2 -21
- package/dist/src/geo/useUserIpInfo.d.ts.map +1 -1
- package/dist/src/icons/FunIcon.d.ts.map +1 -1
- package/dist/src/icons/SourceTokenCluster.d.ts.map +1 -1
- package/dist/src/icons/StatusIcon.d.ts +2 -0
- package/dist/src/icons/StatusIcon.d.ts.map +1 -0
- package/dist/src/icons/TokenChainIcon.d.ts.map +1 -1
- package/dist/src/identity/IdentityContext.d.ts.map +1 -1
- package/dist/src/providers/FunkitProvider.d.ts.map +1 -1
- package/dist/src/screens/AvailableChainsScreen.d.ts.map +1 -1
- package/dist/src/screens/CheckoutBlockedScreen.d.ts.map +1 -1
- package/dist/src/screens/NetworkSelector.d.ts.map +1 -1
- package/dist/src/screens/QrCodeScreen.d.ts.map +1 -1
- package/dist/src/screens/SelectMethodScreen.d.ts.map +1 -1
- package/dist/src/screens/TransferCryptoScreen.d.ts.map +1 -1
- package/dist/src/statsig/useDynamicConfig.d.ts +6 -0
- package/dist/src/statsig/useDynamicConfig.d.ts.map +1 -0
- package/dist/src/swapped/SwappedWebView.d.ts.map +1 -1
- package/dist/src/swapped/buildSwappedTheme.d.ts +7 -4
- package/dist/src/swapped/buildSwappedTheme.d.ts.map +1 -1
- package/dist/src/theme/buildFunkitTheme.d.ts +192 -0
- package/dist/src/theme/buildFunkitTheme.d.ts.map +1 -0
- package/dist/src/theme/restyle.d.ts +2818 -2224
- package/dist/src/theme/restyle.d.ts.map +1 -1
- package/dist/src/theme/themes.d.ts +34 -0
- package/dist/src/theme/themes.d.ts.map +1 -0
- package/dist/src/theme/toRestyleTheme.d.ts +257 -205
- package/dist/src/theme/toRestyleTheme.d.ts.map +1 -1
- package/dist/src/theme/tokens.d.ts +162 -139
- package/dist/src/theme/tokens.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useFops.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useTokenTransfer.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useUDAParams.d.ts +1 -1
- package/dist/src/transfer/hooks/useUDAParams.d.ts.map +1 -1
- package/dist/src/transfer/hooks/useWithdrawalFops.d.ts.map +1 -1
- package/dist/src/utils/customers.d.ts +2 -0
- package/dist/src/utils/customers.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,306 +1,306 @@
|
|
|
1
1
|
// src/theme/tokens.ts
|
|
2
|
-
|
|
3
|
-
family
|
|
4
|
-
weights: {
|
|
5
|
-
base: { cssWeight: "400" },
|
|
6
|
-
medium: { cssWeight: "500" }
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
function fontFamilyForWeight(fonts, weight) {
|
|
10
|
-
const { familySuffix } = fonts.weights[weight];
|
|
11
|
-
return familySuffix ? `${fonts.family}-${familySuffix}` : fonts.family;
|
|
2
|
+
function fontFamilyForWeight(family, styleName) {
|
|
3
|
+
return `${family}-${styleName}`;
|
|
12
4
|
}
|
|
5
|
+
var FONT_STYLE_CSS_WEIGHT = {
|
|
6
|
+
Regular: "400",
|
|
7
|
+
Medium: "500"
|
|
8
|
+
};
|
|
13
9
|
var lightTokens = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
btnIcon: "#FFFFFF",
|
|
33
|
-
btnIconHover: "#F9F9F9",
|
|
34
|
-
btnIconPressed: "#EFEFEF",
|
|
35
|
-
btnIconFocused: "#FFFFFF",
|
|
36
|
-
btnIconDisabled: "#FFFFFF",
|
|
37
|
-
btnDestructive: "#F34126",
|
|
38
|
-
btnDestructiveHover: "#DB3B22",
|
|
39
|
-
btnDestructivePressed: "#C2341E",
|
|
40
|
-
btnDestructiveFocused: "#F34126",
|
|
41
|
-
btnDestructiveDisabled: "#F34126",
|
|
42
|
-
pill: "#FFFFFF",
|
|
43
|
-
pillHover: "#F9F9F9",
|
|
44
|
-
pillPressed: "#EFEFEF",
|
|
45
|
-
pillFocused: "#FFFFFF",
|
|
46
|
-
pillDisabled: "#FFFFFF",
|
|
47
|
-
textPrimary: "#0F0F0F",
|
|
48
|
-
textSecondary: "#6C6C6C",
|
|
49
|
-
textSuccess: "#52A300",
|
|
50
|
-
textError: "#F34126",
|
|
51
|
-
textHyperlink: "#0F0F0F",
|
|
52
|
-
textWarning: "#F97316",
|
|
53
|
-
onBtnPrimary: "#FFFFFF",
|
|
54
|
-
onBtnPrimaryLoading: "#FFFFFF",
|
|
55
|
-
onBtnSecondary: "#0F0F0F",
|
|
56
|
-
onBtnSecondaryLoading: "#000000",
|
|
57
|
-
onBtnTertiary: "#0F0F0F",
|
|
58
|
-
onBtnIcon: "#6C6C6C",
|
|
59
|
-
onBtnDestructive: "#FFFFFF",
|
|
60
|
-
onBtnDestructiveLoading: "#FFFFFF",
|
|
61
|
-
borderModal: "#FFFFFF",
|
|
62
|
-
borderDefault: "#EFEFEF",
|
|
63
|
-
borderFocused: "#BEBEBE",
|
|
64
|
-
borderSelected: "#0F0F0F",
|
|
65
|
-
borderBtnPrimary: "#0F0F0F",
|
|
66
|
-
borderBtnSecondary: "#F9F9F9",
|
|
67
|
-
brandPrimary: "#0F0F0F"
|
|
10
|
+
background: {
|
|
11
|
+
modal: "#FFFFFF",
|
|
12
|
+
secondary: "#F9F9F9",
|
|
13
|
+
button: {
|
|
14
|
+
primary: { default: "#0F0F0F", pressed: "#1B1B1B" },
|
|
15
|
+
secondary: { default: "#F9F9F9", pressed: "#DDDDDD" },
|
|
16
|
+
tertiary: { default: "#FFFFFF", pressed: "#EFEFEF" },
|
|
17
|
+
icon: { default: "#FFFFFF", pressed: "#EFEFEF" },
|
|
18
|
+
destructive: {
|
|
19
|
+
default: "#F34126",
|
|
20
|
+
pressed: "#C2341E",
|
|
21
|
+
disabled: "#F34126"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
pill: { default: "#FFFFFF", pressed: "#EFEFEF", disabled: "#FFFFFF" }
|
|
25
|
+
},
|
|
26
|
+
opacity: {
|
|
27
|
+
disabled: 40
|
|
68
28
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
29
|
+
content: {
|
|
30
|
+
elements: {
|
|
31
|
+
primary: "#0F0F0F",
|
|
32
|
+
secondary: "#6C6C6C",
|
|
33
|
+
success: "#52A300",
|
|
34
|
+
error: "#F34126",
|
|
35
|
+
hyperlink: "#0F0F0F",
|
|
36
|
+
warning: "#F97316"
|
|
37
|
+
},
|
|
38
|
+
button: {
|
|
39
|
+
primary: { default: "#FFFFFF", loadingAlpha: "#FFFFFF4D" },
|
|
40
|
+
secondary: { default: "#0F0F0F", loadingAlpha: "#0000004D" },
|
|
41
|
+
tertiary: { default: "#0F0F0F" },
|
|
42
|
+
icon: { default: "#6C6C6C" },
|
|
43
|
+
destructive: { default: "#FFFFFF", loadingAlpha: "#FFFFFF80" }
|
|
44
|
+
}
|
|
75
45
|
},
|
|
76
|
-
|
|
77
|
-
modal:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
46
|
+
border: {
|
|
47
|
+
radius: { modal: 24, element: 12, elementInner: 8, button: 999 },
|
|
48
|
+
modal: { default: "#FFFFFF", weight: 1 },
|
|
49
|
+
elements: {
|
|
50
|
+
default: { color: "#EFEFEF", weight: 1 },
|
|
51
|
+
selected: { color: "#0F0F0F", weight: 1 }
|
|
52
|
+
},
|
|
53
|
+
button: { primary: "#0F0F0F", secondary: "#F9F9F9", weight: 0 }
|
|
82
54
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
55
|
+
font: {
|
|
56
|
+
body: {
|
|
57
|
+
family: "Inter",
|
|
58
|
+
weight: { base: "Regular", medium: "Medium" },
|
|
59
|
+
size: { base: 16, detail: 14 },
|
|
60
|
+
leading: { base: 22, detail: 20 }
|
|
61
|
+
},
|
|
62
|
+
header: {
|
|
63
|
+
family: "Inter",
|
|
64
|
+
weight: "Medium",
|
|
65
|
+
alignment: "Center",
|
|
66
|
+
size: { title: 18, subtitle: 16, amountInput: 48, amountSummary: 48 }
|
|
67
|
+
}
|
|
87
68
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
buttonLg: 48,
|
|
95
|
-
iconXs: 16,
|
|
96
|
-
iconSm: 16,
|
|
97
|
-
iconMd: 20,
|
|
98
|
-
iconLg: 20
|
|
69
|
+
spacing: {
|
|
70
|
+
padding: {
|
|
71
|
+
elements: { horizontal: 12 },
|
|
72
|
+
modal: { horizontal: 16 }
|
|
73
|
+
},
|
|
74
|
+
heights: { topBar: 56, button: 42 }
|
|
99
75
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
bodyBase: 16,
|
|
103
|
-
bodyDetail: 14,
|
|
104
|
-
headerTitle: 13,
|
|
105
|
-
headerSubtitle: 15,
|
|
106
|
-
amountInput: 48,
|
|
107
|
-
amountSummary: 48
|
|
76
|
+
brand: {
|
|
77
|
+
primary: "#0F0F0F"
|
|
108
78
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
79
|
+
button: {
|
|
80
|
+
icon: { size: { xs: 16, sm: 16, md: 20, lg: 20 } },
|
|
81
|
+
size: { xs: 36, sm: 40, md: 48, lg: 56 }
|
|
112
82
|
}
|
|
113
83
|
};
|
|
114
84
|
var darkTokens = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
btnTertiaryPressed: "#464646",
|
|
131
|
-
btnTertiaryFocused: "#0F0F0F",
|
|
132
|
-
btnTertiaryDisabled: "#0F0F0F",
|
|
133
|
-
btnIcon: "#0F0F0F",
|
|
134
|
-
btnIconHover: "#1B1B1B",
|
|
135
|
-
btnIconPressed: "#2D2D2D",
|
|
136
|
-
btnIconFocused: "#0F0F0F",
|
|
137
|
-
btnIconDisabled: "#0F0F0F",
|
|
138
|
-
btnDestructive: "#DB3B22",
|
|
139
|
-
btnDestructiveHover: "#F34126",
|
|
140
|
-
btnDestructivePressed: "#F88877",
|
|
141
|
-
btnDestructiveFocused: "#DB3B22",
|
|
142
|
-
btnDestructiveDisabled: "#DB3B22",
|
|
143
|
-
pill: "#0F0F0F",
|
|
144
|
-
pillHover: "#1B1B1B",
|
|
145
|
-
pillPressed: "#2D2D2D",
|
|
146
|
-
pillFocused: "#0F0F0F",
|
|
147
|
-
pillDisabled: "#0F0F0F",
|
|
148
|
-
textPrimary: "#FFFFFF",
|
|
149
|
-
textSecondary: "#929292",
|
|
150
|
-
textSuccess: "#52A300",
|
|
151
|
-
textError: "#F34126",
|
|
152
|
-
textHyperlink: "#4971F0",
|
|
153
|
-
textWarning: "#F97316",
|
|
154
|
-
onBtnPrimary: "#000000",
|
|
155
|
-
onBtnPrimaryLoading: "#000000",
|
|
156
|
-
onBtnSecondary: "#F9F9F9",
|
|
157
|
-
onBtnSecondaryLoading: "#FFFFFF",
|
|
158
|
-
onBtnTertiary: "#F9F9F9",
|
|
159
|
-
onBtnIcon: "#929292",
|
|
160
|
-
onBtnDestructive: "#FFFFFF",
|
|
161
|
-
onBtnDestructiveLoading: "#FFFFFF",
|
|
162
|
-
borderModal: "#1B1B1B",
|
|
163
|
-
borderDefault: "#2D2D2D",
|
|
164
|
-
borderFocused: "#464646",
|
|
165
|
-
borderSelected: "#F9F9F9",
|
|
166
|
-
borderBtnPrimary: "#F9F9F9",
|
|
167
|
-
borderBtnSecondary: "#1B1B1B",
|
|
168
|
-
brandPrimary: "#FFFFFF"
|
|
85
|
+
background: {
|
|
86
|
+
modal: "#0F0F0F",
|
|
87
|
+
secondary: "#1B1B1B",
|
|
88
|
+
button: {
|
|
89
|
+
primary: { default: "#FFFFFF", pressed: "#F9F9F9" },
|
|
90
|
+
secondary: { default: "#1B1B1B", pressed: "#2D2D2D" },
|
|
91
|
+
tertiary: { default: "#1B1B1B", pressed: "#2D2D2D" },
|
|
92
|
+
icon: { default: "#0F0F0F", pressed: "#1B1B1B" },
|
|
93
|
+
destructive: {
|
|
94
|
+
default: "#DB3B22",
|
|
95
|
+
pressed: "#F34126",
|
|
96
|
+
disabled: "#DB3B22"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
pill: { default: "#0F0F0F", pressed: "#1B1B1B", disabled: "#0F0F0F" }
|
|
169
100
|
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
element: 12,
|
|
173
|
-
elementInner: 8,
|
|
174
|
-
button: 999,
|
|
175
|
-
rounded: 999
|
|
101
|
+
opacity: {
|
|
102
|
+
disabled: 40
|
|
176
103
|
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
104
|
+
content: {
|
|
105
|
+
elements: {
|
|
106
|
+
primary: "#FFFFFF",
|
|
107
|
+
secondary: "#929292",
|
|
108
|
+
success: "#52A300",
|
|
109
|
+
error: "#F34126",
|
|
110
|
+
hyperlink: "#FFFFFF",
|
|
111
|
+
warning: "#F97316"
|
|
112
|
+
},
|
|
113
|
+
button: {
|
|
114
|
+
primary: { default: "#000000", loadingAlpha: "#0000004D" },
|
|
115
|
+
secondary: { default: "#F9F9F9", loadingAlpha: "#FFFFFF4D" },
|
|
116
|
+
tertiary: { default: "#F9F9F9" },
|
|
117
|
+
icon: { default: "#929292" },
|
|
118
|
+
destructive: { default: "#FFFFFF", loadingAlpha: "#FFFFFF80" }
|
|
119
|
+
}
|
|
183
120
|
},
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
121
|
+
border: {
|
|
122
|
+
radius: { modal: 24, element: 12, elementInner: 8, button: 999 },
|
|
123
|
+
modal: { default: "#1B1B1B", weight: 1 },
|
|
124
|
+
elements: {
|
|
125
|
+
default: { color: "#2D2D2D", weight: 1 },
|
|
126
|
+
selected: { color: "#FFFFFF", weight: 1 }
|
|
127
|
+
},
|
|
128
|
+
button: { primary: "#FFFFFF", secondary: "#1B1B1B", weight: 0 }
|
|
188
129
|
},
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
130
|
+
font: {
|
|
131
|
+
body: {
|
|
132
|
+
family: "Inter",
|
|
133
|
+
weight: { base: "Regular", medium: "Medium" },
|
|
134
|
+
size: { base: 16, detail: 14 },
|
|
135
|
+
leading: { base: 22, detail: 20 }
|
|
136
|
+
},
|
|
137
|
+
header: {
|
|
138
|
+
family: "Inter",
|
|
139
|
+
weight: "Medium",
|
|
140
|
+
alignment: "Center",
|
|
141
|
+
size: { title: 18, subtitle: 16, amountInput: 48, amountSummary: 48 }
|
|
142
|
+
}
|
|
200
143
|
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
144
|
+
spacing: {
|
|
145
|
+
padding: {
|
|
146
|
+
elements: { horizontal: 12 },
|
|
147
|
+
modal: { horizontal: 16 }
|
|
148
|
+
},
|
|
149
|
+
heights: { topBar: 56, button: 42 }
|
|
150
|
+
},
|
|
151
|
+
brand: {
|
|
152
|
+
primary: "#0F0F0F"
|
|
209
153
|
},
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
154
|
+
button: {
|
|
155
|
+
icon: { size: { xs: 16, sm: 16, md: 20, lg: 20 } },
|
|
156
|
+
size: { xs: 36, sm: 40, md: 48, lg: 56 }
|
|
213
157
|
}
|
|
214
158
|
};
|
|
215
159
|
|
|
216
160
|
// src/theme/toRestyleTheme.ts
|
|
217
161
|
import { createTheme } from "@shopify/restyle";
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
fontFamily: fontFamilyForWeight(
|
|
223
|
-
fontWeight:
|
|
224
|
-
};
|
|
225
|
-
const medium = {
|
|
226
|
-
fontFamily: fontFamilyForWeight(tokens.fonts, "medium"),
|
|
227
|
-
fontWeight: tokens.fonts.weights.medium.cssWeight
|
|
162
|
+
|
|
163
|
+
// src/theme/buildFunkitTheme.ts
|
|
164
|
+
function cut(family, styleName) {
|
|
165
|
+
return {
|
|
166
|
+
fontFamily: fontFamilyForWeight(family, styleName),
|
|
167
|
+
fontWeight: FONT_STYLE_CSS_WEIGHT[styleName]
|
|
228
168
|
};
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
169
|
+
}
|
|
170
|
+
function buildFunkitTheme(tokens) {
|
|
171
|
+
const { font } = tokens;
|
|
172
|
+
const base = cut(font.body.family, font.body.weight.base);
|
|
173
|
+
const medium = cut(font.body.family, font.body.weight.medium);
|
|
174
|
+
const header = cut(font.header.family, font.header.weight);
|
|
175
|
+
const headerAlign = font.header.alignment.toLowerCase();
|
|
176
|
+
return {
|
|
177
|
+
// Restyle's BaseTheme requires `colors`; intentionally empty — see above.
|
|
178
|
+
colors: {},
|
|
179
|
+
// ── Figma variable groups, verbatim ───────────────────────────────
|
|
180
|
+
background: tokens.background,
|
|
181
|
+
content: tokens.content,
|
|
182
|
+
border: tokens.border,
|
|
183
|
+
brand: tokens.brand,
|
|
184
|
+
opacity: tokens.opacity,
|
|
185
|
+
font: tokens.font,
|
|
186
|
+
// ── Non-color numeric buckets projected onto Restyle's reserved keys ─
|
|
187
|
+
spacing: {
|
|
188
|
+
none: 0,
|
|
189
|
+
elementsHorizontal: tokens.spacing.padding.elements.horizontal,
|
|
190
|
+
modalHorizontal: tokens.spacing.padding.modal.horizontal
|
|
191
|
+
},
|
|
192
|
+
borderRadii: {
|
|
193
|
+
modal: tokens.border.radius.modal,
|
|
194
|
+
element: tokens.border.radius.element,
|
|
195
|
+
elementInner: tokens.border.radius.elementInner,
|
|
196
|
+
button: tokens.border.radius.button,
|
|
197
|
+
// Structural (no Figma token): fully-circular avatars / icon wells.
|
|
198
|
+
rounded: 999
|
|
199
|
+
},
|
|
200
|
+
borderWidths: {
|
|
201
|
+
modal: tokens.border.modal.weight,
|
|
202
|
+
elementsDefault: tokens.border.elements.default.weight,
|
|
203
|
+
elementsSelected: tokens.border.elements.selected.weight,
|
|
204
|
+
button: tokens.border.button.weight
|
|
205
|
+
},
|
|
206
|
+
sizes: {
|
|
207
|
+
topBar: tokens.spacing.heights.topBar,
|
|
208
|
+
buttonHeight: tokens.spacing.heights.button,
|
|
209
|
+
buttonXs: tokens.button.size.xs,
|
|
210
|
+
buttonSm: tokens.button.size.sm,
|
|
211
|
+
buttonMd: tokens.button.size.md,
|
|
212
|
+
buttonLg: tokens.button.size.lg,
|
|
213
|
+
iconXs: tokens.button.icon.size.xs,
|
|
214
|
+
iconSm: tokens.button.icon.size.sm,
|
|
215
|
+
iconMd: tokens.button.icon.size.md,
|
|
216
|
+
iconLg: tokens.button.icon.size.lg
|
|
233
217
|
},
|
|
234
|
-
spacing: tokens.spacing,
|
|
235
|
-
borderRadii: tokens.radii,
|
|
236
|
-
borderWidths: tokens.borderWidths,
|
|
237
|
-
sizes: tokens.sizes,
|
|
238
218
|
breakpoints: {
|
|
239
219
|
phone: 0,
|
|
240
220
|
tablet: 768
|
|
241
221
|
},
|
|
222
|
+
// Text variants carry no `color` (Restyle colors is unused); the `Text`
|
|
223
|
+
// component defaults the color from `content/elements/*` and callers
|
|
224
|
+
// override per-node via `style`.
|
|
242
225
|
textVariants: {
|
|
243
226
|
defaults: {
|
|
244
227
|
...base,
|
|
245
|
-
fontSize:
|
|
246
|
-
lineHeight:
|
|
247
|
-
color: "textPrimary"
|
|
228
|
+
fontSize: font.body.size.base,
|
|
229
|
+
lineHeight: font.body.leading.base
|
|
248
230
|
},
|
|
249
231
|
body: {
|
|
250
232
|
...base,
|
|
251
|
-
fontSize:
|
|
252
|
-
lineHeight:
|
|
253
|
-
color: "textPrimary"
|
|
233
|
+
fontSize: font.body.size.base,
|
|
234
|
+
lineHeight: font.body.leading.base
|
|
254
235
|
},
|
|
255
236
|
bodyMedium: {
|
|
256
237
|
...medium,
|
|
257
|
-
fontSize:
|
|
258
|
-
lineHeight:
|
|
259
|
-
color: "textPrimary"
|
|
238
|
+
fontSize: font.body.size.base,
|
|
239
|
+
lineHeight: font.body.leading.base
|
|
260
240
|
},
|
|
261
241
|
detail: {
|
|
262
242
|
...base,
|
|
263
|
-
fontSize:
|
|
264
|
-
lineHeight:
|
|
265
|
-
color: "textSecondary"
|
|
243
|
+
fontSize: font.body.size.detail,
|
|
244
|
+
lineHeight: font.body.leading.detail
|
|
266
245
|
},
|
|
267
246
|
headerTitle: {
|
|
268
|
-
...
|
|
269
|
-
fontSize:
|
|
270
|
-
|
|
271
|
-
textAlign: "center"
|
|
247
|
+
...header,
|
|
248
|
+
fontSize: font.header.size.title,
|
|
249
|
+
textAlign: headerAlign
|
|
272
250
|
},
|
|
273
251
|
headerSubtitle: {
|
|
274
|
-
...
|
|
275
|
-
fontSize:
|
|
276
|
-
|
|
277
|
-
textAlign: "center"
|
|
252
|
+
...header,
|
|
253
|
+
fontSize: font.header.size.subtitle,
|
|
254
|
+
textAlign: headerAlign
|
|
278
255
|
},
|
|
279
256
|
amountInput: {
|
|
280
257
|
...medium,
|
|
281
|
-
fontSize:
|
|
282
|
-
color: "textPrimary"
|
|
258
|
+
fontSize: font.header.size.amountInput
|
|
283
259
|
},
|
|
284
260
|
amountSummary: {
|
|
285
261
|
...medium,
|
|
286
|
-
fontSize:
|
|
287
|
-
color: "textPrimary"
|
|
262
|
+
fontSize: font.header.size.amountSummary
|
|
288
263
|
}
|
|
289
264
|
},
|
|
290
265
|
// Per-weight `{ fontFamily, fontWeight }` the `Text` `weight` prop applies on
|
|
291
|
-
// top of any variant
|
|
292
|
-
// `fontFamilyForWeight`)
|
|
293
|
-
// variants use — letting a node override only its weight (e.g.
|
|
294
|
-
// `variant="detail" weight="medium"`) without a `*Medium` twin per variant.
|
|
266
|
+
// top of any variant (both are required for custom fonts — see
|
|
267
|
+
// `fontFamilyForWeight`).
|
|
295
268
|
textWeights: {
|
|
296
269
|
base,
|
|
297
270
|
medium
|
|
298
271
|
}
|
|
299
|
-
}
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// src/theme/toRestyleTheme.ts
|
|
276
|
+
function toRestyleTheme(tokens) {
|
|
277
|
+
return createTheme(buildFunkitTheme(tokens));
|
|
300
278
|
}
|
|
301
279
|
var defaultLightTheme = toRestyleTheme(lightTokens);
|
|
302
280
|
var defaultDarkTheme = toRestyleTheme(darkTokens);
|
|
303
281
|
|
|
282
|
+
// src/theme/themes.ts
|
|
283
|
+
function isPlainObject(value) {
|
|
284
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
285
|
+
}
|
|
286
|
+
function deepMerge(base, override) {
|
|
287
|
+
if (!isPlainObject(base)) {
|
|
288
|
+
return override === void 0 ? base : override;
|
|
289
|
+
}
|
|
290
|
+
const source = isPlainObject(override) ? override : {};
|
|
291
|
+
const cloned = {};
|
|
292
|
+
for (const key of Object.keys(base)) {
|
|
293
|
+
cloned[key] = deepMerge(base[key], source[key]);
|
|
294
|
+
}
|
|
295
|
+
return cloned;
|
|
296
|
+
}
|
|
297
|
+
function lightTheme(override) {
|
|
298
|
+
return toRestyleTheme(deepMerge(lightTokens, override));
|
|
299
|
+
}
|
|
300
|
+
function darkTheme(override) {
|
|
301
|
+
return toRestyleTheme(deepMerge(darkTokens, override));
|
|
302
|
+
}
|
|
303
|
+
|
|
304
304
|
// src/theme/useColorScheme.ts
|
|
305
305
|
import { useEffect, useState } from "react";
|
|
306
306
|
import { Appearance } from "react-native";
|
|
@@ -366,12 +366,16 @@ import {
|
|
|
366
366
|
var Box = createBox();
|
|
367
367
|
var RestyleText = createText();
|
|
368
368
|
var Text = forwardRef(
|
|
369
|
-
function Text2({ weight, style, ...rest }, ref) {
|
|
369
|
+
function Text2({ weight, variant, style, ...rest }, ref) {
|
|
370
370
|
const theme = useRestyleTheme();
|
|
371
371
|
const weightStyle = weight ? theme.textWeights?.[weight] : void 0;
|
|
372
|
+
const elements = theme.content?.elements;
|
|
373
|
+
const secondary = variant === "detail" || variant === "headerSubtitle";
|
|
374
|
+
const colorStyle = elements ? { color: secondary ? elements.secondary : elements.primary } : void 0;
|
|
372
375
|
return createElement(RestyleText, {
|
|
373
376
|
ref,
|
|
374
|
-
|
|
377
|
+
variant,
|
|
378
|
+
style: [colorStyle, weightStyle, style],
|
|
375
379
|
...rest
|
|
376
380
|
});
|
|
377
381
|
}
|
|
@@ -379,7 +383,7 @@ var Text = forwardRef(
|
|
|
379
383
|
var useTheme = () => useRestyleTheme();
|
|
380
384
|
|
|
381
385
|
// src/flow/AddressCopiedToast.tsx
|
|
382
|
-
import { StyleSheet
|
|
386
|
+
import { StyleSheet } from "react-native";
|
|
383
387
|
import Animated, { Easing, FadeOutUp, Keyframe } from "react-native-reanimated";
|
|
384
388
|
|
|
385
389
|
// src/icons/FigmaSystemIcons.tsx
|
|
@@ -387,7 +391,7 @@ import { SvgXml } from "react-native-svg";
|
|
|
387
391
|
import { jsx } from "react/jsx-runtime";
|
|
388
392
|
function useIconColor(color) {
|
|
389
393
|
const theme = useTheme();
|
|
390
|
-
return color ?? theme.
|
|
394
|
+
return color ?? theme.content.elements.primary;
|
|
391
395
|
}
|
|
392
396
|
function renderIcon(svg, size, color) {
|
|
393
397
|
return /* @__PURE__ */ jsx(
|
|
@@ -455,18 +459,19 @@ var enterAnimation = new Keyframe({
|
|
|
455
459
|
}).duration(450);
|
|
456
460
|
var exitAnimation = FadeOutUp.duration(350);
|
|
457
461
|
function AddressCopiedToast({
|
|
458
|
-
label
|
|
462
|
+
label = "Address copied"
|
|
459
463
|
}) {
|
|
464
|
+
const theme = useTheme();
|
|
460
465
|
return /* @__PURE__ */ jsxs(
|
|
461
466
|
Animated.View,
|
|
462
467
|
{
|
|
463
468
|
entering: enterAnimation,
|
|
464
469
|
exiting: exitAnimation,
|
|
465
|
-
style: styles.pill,
|
|
470
|
+
style: [styles.pill, { backgroundColor: theme.background.pill.default }],
|
|
466
471
|
accessibilityRole: "alert",
|
|
467
|
-
accessibilityLabel:
|
|
472
|
+
accessibilityLabel: label,
|
|
468
473
|
children: [
|
|
469
|
-
/* @__PURE__ */ jsx2(
|
|
474
|
+
/* @__PURE__ */ jsx2(Text, { variant: "bodyMedium", children: label }),
|
|
470
475
|
/* @__PURE__ */ jsx2(FigmaSuccessCheckIcon, { size: 16 })
|
|
471
476
|
]
|
|
472
477
|
}
|
|
@@ -476,7 +481,6 @@ var pill = {
|
|
|
476
481
|
height: 42,
|
|
477
482
|
paddingHorizontal: 16,
|
|
478
483
|
borderRadius: 999,
|
|
479
|
-
backgroundColor: "#ffffff",
|
|
480
484
|
flexDirection: "row",
|
|
481
485
|
alignItems: "center",
|
|
482
486
|
gap: 6,
|
|
@@ -485,12 +489,7 @@ var pill = {
|
|
|
485
489
|
shadowOffset: { width: 0, height: 4 },
|
|
486
490
|
shadowRadius: 12
|
|
487
491
|
};
|
|
488
|
-
var
|
|
489
|
-
color: "#111111",
|
|
490
|
-
fontSize: 16,
|
|
491
|
-
fontWeight: "500"
|
|
492
|
-
};
|
|
493
|
-
var styles = StyleSheet.create({ pill, label });
|
|
492
|
+
var styles = StyleSheet.create({ pill });
|
|
494
493
|
|
|
495
494
|
// src/theme/FunkitThemeProvider.tsx
|
|
496
495
|
import { ThemeProvider } from "@shopify/restyle";
|
|
@@ -559,23 +558,14 @@ import {
|
|
|
559
558
|
BottomSheetModal as BottomSheetModal2,
|
|
560
559
|
BottomSheetView as BottomSheetView2
|
|
561
560
|
} from "@gorhom/bottom-sheet";
|
|
562
|
-
|
|
563
|
-
|
|
561
|
+
|
|
562
|
+
// src/statsig/useDynamicConfig.ts
|
|
564
563
|
import {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
useContext as useContext3,
|
|
568
|
-
useEffect as useEffect11,
|
|
569
|
-
useMemo as useMemo9,
|
|
570
|
-
useRef as useRef7,
|
|
571
|
-
useState as useState9
|
|
572
|
-
} from "react";
|
|
573
|
-
import { Share, StyleSheet as StyleSheet3, View as View3 } from "react-native";
|
|
574
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
564
|
+
useDynamicConfig as useCoreDynamicConfig
|
|
565
|
+
} from "@funkit/connect-core";
|
|
575
566
|
|
|
576
|
-
// src/geo/
|
|
577
|
-
import {
|
|
578
|
-
import { useDynamicConfig, useEffectEvent } from "@funkit/connect-core";
|
|
567
|
+
// src/geo/useUserIpInfo.ts
|
|
568
|
+
import { useUserIpInfo as useCoreUserIpInfo } from "@funkit/connect-core";
|
|
579
569
|
|
|
580
570
|
// src/logging/logger.ts
|
|
581
571
|
import { FunLogger } from "@funkit/connect-core";
|
|
@@ -687,6 +677,43 @@ var logger = new FunLogger(
|
|
|
687
677
|
})
|
|
688
678
|
);
|
|
689
679
|
|
|
680
|
+
// src/geo/useUserIpInfo.ts
|
|
681
|
+
function useUserIpInfo() {
|
|
682
|
+
return useCoreUserIpInfo({
|
|
683
|
+
logger,
|
|
684
|
+
enabled: true,
|
|
685
|
+
staleTime: Number.POSITIVE_INFINITY
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
// src/statsig/useDynamicConfig.ts
|
|
690
|
+
var useDynamicConfig = (name, options) => {
|
|
691
|
+
const { userIpInfo } = useUserIpInfo();
|
|
692
|
+
return useCoreDynamicConfig(name, {
|
|
693
|
+
bypassCountryCode: options?.bypassCountryCode,
|
|
694
|
+
countryCode: userIpInfo?.alpha2
|
|
695
|
+
});
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
// src/flow/FunkitFlowProvider.tsx
|
|
699
|
+
import { useStatsigClient as useStatsigClient2 } from "@statsig/react-bindings";
|
|
700
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
701
|
+
import {
|
|
702
|
+
createContext as createContext3,
|
|
703
|
+
useCallback as useCallback8,
|
|
704
|
+
useContext as useContext3,
|
|
705
|
+
useEffect as useEffect11,
|
|
706
|
+
useMemo as useMemo9,
|
|
707
|
+
useRef as useRef7,
|
|
708
|
+
useState as useState9
|
|
709
|
+
} from "react";
|
|
710
|
+
import { Share, StyleSheet as StyleSheet4, View as View3 } from "react-native";
|
|
711
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
712
|
+
|
|
713
|
+
// src/geo/useCheckoutBlocked.ts
|
|
714
|
+
import { useEffect as useEffect2, useMemo as useMemo3 } from "react";
|
|
715
|
+
import { useEffectEvent } from "@funkit/connect-core";
|
|
716
|
+
|
|
690
717
|
// src/geo/isCountryBlocked.ts
|
|
691
718
|
var ALL_MATCH = "*";
|
|
692
719
|
function isCountryBlocked(blockedList, userIpInfo) {
|
|
@@ -703,58 +730,6 @@ function isCountryBlocked(blockedList, userIpInfo) {
|
|
|
703
730
|
return isBlocked;
|
|
704
731
|
}
|
|
705
732
|
|
|
706
|
-
// src/geo/useUserIpInfo.ts
|
|
707
|
-
import { useQuery } from "@tanstack/react-query";
|
|
708
|
-
var MOONPAY_LIVE_API_KEY = "pk_live_IxayBRQuBC3RzpPZkbGPrwUsRWAaeO";
|
|
709
|
-
function errData(error) {
|
|
710
|
-
return { error: error instanceof Error ? error.message : String(error) };
|
|
711
|
-
}
|
|
712
|
-
async function getIpViaMoonpay() {
|
|
713
|
-
const res = await fetch(
|
|
714
|
-
`https://api.moonpay.com/v3/ip_address?apiKey=${MOONPAY_LIVE_API_KEY}`
|
|
715
|
-
);
|
|
716
|
-
if (!res.ok) {
|
|
717
|
-
throw new Error(res.statusText);
|
|
718
|
-
}
|
|
719
|
-
const data = await res.json();
|
|
720
|
-
return { alpha2: data.alpha2, state: data.state };
|
|
721
|
-
}
|
|
722
|
-
async function getIpViaIpApi() {
|
|
723
|
-
const res = await fetch("https://ipapi.co/json");
|
|
724
|
-
if (!res.ok) {
|
|
725
|
-
throw new Error(res.statusText);
|
|
726
|
-
}
|
|
727
|
-
const data = await res.json();
|
|
728
|
-
return { alpha2: data.country_code, state: data.region_code };
|
|
729
|
-
}
|
|
730
|
-
function useUserIpInfo() {
|
|
731
|
-
const { data: userIpInfo, isLoading: isLoadingGeoCheck } = useQuery({
|
|
732
|
-
queryKey: ["getUserIpInfo"],
|
|
733
|
-
queryFn: async () => {
|
|
734
|
-
try {
|
|
735
|
-
return await getIpViaMoonpay();
|
|
736
|
-
} catch (moonpayError) {
|
|
737
|
-
logger.warn(
|
|
738
|
-
"connect-rn:getUserIpViaMoonpay:error",
|
|
739
|
-
errData(moonpayError)
|
|
740
|
-
);
|
|
741
|
-
try {
|
|
742
|
-
return await getIpViaIpApi();
|
|
743
|
-
} catch (ipApiError) {
|
|
744
|
-
logger.warn("connect-rn:getUserIpViaIpApi:error", errData(ipApiError));
|
|
745
|
-
throw ipApiError;
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
},
|
|
749
|
-
// Location is stable within a session; don't refetch aggressively.
|
|
750
|
-
staleTime: Number.POSITIVE_INFINITY,
|
|
751
|
-
refetchOnMount: false,
|
|
752
|
-
refetchOnReconnect: true,
|
|
753
|
-
refetchOnWindowFocus: false
|
|
754
|
-
});
|
|
755
|
-
return { userIpInfo, isLoadingGeoCheck };
|
|
756
|
-
}
|
|
757
|
-
|
|
758
733
|
// src/geo/useCheckoutBlocked.ts
|
|
759
734
|
function useCheckoutBlocked(params) {
|
|
760
735
|
const { userIpInfo, isLoadingGeoCheck } = useUserIpInfo();
|
|
@@ -889,7 +864,7 @@ function CryptoBitcoinIcon({ size = 28 }) {
|
|
|
889
864
|
xml: CIRCLE_BITCOIN_SVG,
|
|
890
865
|
width: size,
|
|
891
866
|
height: size,
|
|
892
|
-
color: theme.
|
|
867
|
+
color: theme.content.elements.primary
|
|
893
868
|
}
|
|
894
869
|
);
|
|
895
870
|
}
|
|
@@ -918,6 +893,7 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
918
893
|
() => svgCache.get(currentUri) ?? null
|
|
919
894
|
);
|
|
920
895
|
const [rasterLoaded, setRasterLoaded] = useState3(false);
|
|
896
|
+
const theme = useTheme();
|
|
921
897
|
useEffect3(() => {
|
|
922
898
|
setCurrentUri(uri);
|
|
923
899
|
setRasterLoaded(false);
|
|
@@ -971,8 +947,10 @@ function FunIcon({ uri, size = 32, fallbackUri }) {
|
|
|
971
947
|
width: size,
|
|
972
948
|
height: size,
|
|
973
949
|
borderRadius: "rounded",
|
|
974
|
-
|
|
975
|
-
|
|
950
|
+
style: [
|
|
951
|
+
clip,
|
|
952
|
+
{ backgroundColor: ready ? void 0 : theme.background.secondary }
|
|
953
|
+
],
|
|
976
954
|
children: isSvg ? xml != null ? /* @__PURE__ */ jsx5(SvgXml3, { xml, width: size, height: size }) : null : /* @__PURE__ */ jsx5(
|
|
977
955
|
Image,
|
|
978
956
|
{
|
|
@@ -1059,14 +1037,24 @@ function SourceTokenCluster({
|
|
|
1059
1037
|
const visible = icons.slice(0, maxVisible);
|
|
1060
1038
|
const overflow = icons.length - visible.length;
|
|
1061
1039
|
return /* @__PURE__ */ jsxs2(Box, { flexDirection: "row", alignItems: "center", style: { gap }, children: [
|
|
1062
|
-
visible.map((icon) => /* @__PURE__ */ jsx7(
|
|
1063
|
-
|
|
1040
|
+
visible.map((icon) => /* @__PURE__ */ jsx7(
|
|
1041
|
+
Box,
|
|
1064
1042
|
{
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1043
|
+
style: [
|
|
1044
|
+
iconRing(size),
|
|
1045
|
+
{ backgroundColor: theme.background.secondary }
|
|
1046
|
+
],
|
|
1047
|
+
children: /* @__PURE__ */ jsx7(
|
|
1048
|
+
FunIcon,
|
|
1049
|
+
{
|
|
1050
|
+
uri: toIconUri2(icon),
|
|
1051
|
+
size,
|
|
1052
|
+
fallbackUri: FALLBACK_ASSET_LOGO
|
|
1053
|
+
}
|
|
1054
|
+
)
|
|
1055
|
+
},
|
|
1056
|
+
icon
|
|
1057
|
+
)),
|
|
1070
1058
|
overflow > 0 ? (
|
|
1071
1059
|
// Both chips are a fixed `size`×`size` circle (Figma). The "+" glyph sits
|
|
1072
1060
|
// on `bgSecondary` (Add money `crypto2`); the "+N" count on `pillPressed`
|
|
@@ -1074,19 +1062,31 @@ function SourceTokenCluster({
|
|
|
1074
1062
|
/* @__PURE__ */ jsx7(
|
|
1075
1063
|
Box,
|
|
1076
1064
|
{
|
|
1077
|
-
backgroundColor: overflowMode === "plus" ? "bgSecondary" : "pillPressed",
|
|
1078
1065
|
alignItems: "center",
|
|
1079
1066
|
justifyContent: "center",
|
|
1080
|
-
style:
|
|
1067
|
+
style: [
|
|
1068
|
+
overflowCircle(size),
|
|
1069
|
+
{
|
|
1070
|
+
backgroundColor: overflowMode === "plus" ? theme.background.secondary : theme.background.pill.pressed
|
|
1071
|
+
}
|
|
1072
|
+
],
|
|
1081
1073
|
children: overflowMode === "plus" ? (
|
|
1082
1074
|
// The geometric "+" glyph centers cleanly; the text "+" did not.
|
|
1083
|
-
/* @__PURE__ */ jsx7(
|
|
1075
|
+
/* @__PURE__ */ jsx7(
|
|
1076
|
+
FigmaPlusIcon,
|
|
1077
|
+
{
|
|
1078
|
+
size,
|
|
1079
|
+
color: theme.content.elements.secondary
|
|
1080
|
+
}
|
|
1081
|
+
)
|
|
1084
1082
|
) : /* @__PURE__ */ jsx7(
|
|
1085
1083
|
Text,
|
|
1086
1084
|
{
|
|
1087
1085
|
variant: "bodyMedium",
|
|
1088
|
-
|
|
1089
|
-
|
|
1086
|
+
style: [
|
|
1087
|
+
overflowText(size),
|
|
1088
|
+
{ color: theme.content.elements.secondary }
|
|
1089
|
+
],
|
|
1090
1090
|
children: `+${overflow}`
|
|
1091
1091
|
}
|
|
1092
1092
|
)
|
|
@@ -1125,6 +1125,7 @@ function TokenChainIcon({
|
|
|
1125
1125
|
chainKey,
|
|
1126
1126
|
size = 24
|
|
1127
1127
|
}) {
|
|
1128
|
+
const theme = useTheme();
|
|
1128
1129
|
const badge = Math.round(size * 0.5);
|
|
1129
1130
|
return /* @__PURE__ */ jsxs3(Box, { width: size, height: size, children: [
|
|
1130
1131
|
/* @__PURE__ */ jsx8(
|
|
@@ -1138,11 +1139,13 @@ function TokenChainIcon({
|
|
|
1138
1139
|
chainKey ? /* @__PURE__ */ jsx8(
|
|
1139
1140
|
Box,
|
|
1140
1141
|
{
|
|
1141
|
-
backgroundColor: "bgModal",
|
|
1142
1142
|
borderRadius: "rounded",
|
|
1143
1143
|
alignItems: "center",
|
|
1144
1144
|
justifyContent: "center",
|
|
1145
|
-
style:
|
|
1145
|
+
style: [
|
|
1146
|
+
badgeRing(badge),
|
|
1147
|
+
{ backgroundColor: theme.background.modal }
|
|
1148
|
+
],
|
|
1146
1149
|
children: /* @__PURE__ */ jsx8(
|
|
1147
1150
|
FunIcon,
|
|
1148
1151
|
{
|
|
@@ -1173,7 +1176,35 @@ import Reanimated, {
|
|
|
1173
1176
|
useSharedValue,
|
|
1174
1177
|
withTiming
|
|
1175
1178
|
} from "react-native-reanimated";
|
|
1176
|
-
|
|
1179
|
+
|
|
1180
|
+
// src/icons/StatusIcon.tsx
|
|
1181
|
+
import { StyleSheet as StyleSheet2 } from "react-native";
|
|
1182
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1183
|
+
function StatusIcon() {
|
|
1184
|
+
const theme = useTheme();
|
|
1185
|
+
return /* @__PURE__ */ jsx9(
|
|
1186
|
+
Box,
|
|
1187
|
+
{
|
|
1188
|
+
borderRadius: "rounded",
|
|
1189
|
+
alignItems: "center",
|
|
1190
|
+
justifyContent: "center",
|
|
1191
|
+
style: [styles2.circle, { backgroundColor: theme.background.secondary }],
|
|
1192
|
+
children: /* @__PURE__ */ jsx9(
|
|
1193
|
+
FigmaAlertCircleIcon,
|
|
1194
|
+
{
|
|
1195
|
+
size: 20,
|
|
1196
|
+
color: theme.content.button.icon.default
|
|
1197
|
+
}
|
|
1198
|
+
)
|
|
1199
|
+
}
|
|
1200
|
+
);
|
|
1201
|
+
}
|
|
1202
|
+
var styles2 = StyleSheet2.create({
|
|
1203
|
+
circle: { width: 48, height: 48 }
|
|
1204
|
+
});
|
|
1205
|
+
|
|
1206
|
+
// src/screens/SelectMethodScreen.tsx
|
|
1207
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1177
1208
|
var DROPDOWN_OPEN_DURATION = 250;
|
|
1178
1209
|
var DROPDOWN_CLOSE_DURATION = 150;
|
|
1179
1210
|
var DROPDOWN_EASING = Easing2.bezier(0.22, 1, 0.36, 1);
|
|
@@ -1237,6 +1268,7 @@ function SelectMethodScreen({
|
|
|
1237
1268
|
payWithLabel = "Pay with",
|
|
1238
1269
|
initialDropdownOpen = false
|
|
1239
1270
|
}) {
|
|
1271
|
+
const theme = useTheme();
|
|
1240
1272
|
const selected = receiveTokens?.find((t) => t.id === selectedReceiveTokenId);
|
|
1241
1273
|
const showDropdown = receiveTokens && receiveTokens.length > 0 && selected;
|
|
1242
1274
|
const [dropdownOpen, setDropdownOpen] = useState4(initialDropdownOpen);
|
|
@@ -1244,15 +1276,30 @@ function SelectMethodScreen({
|
|
|
1244
1276
|
return /* @__PURE__ */ jsxs4(
|
|
1245
1277
|
Box,
|
|
1246
1278
|
{
|
|
1247
|
-
backgroundColor: "bgModal",
|
|
1248
1279
|
borderTopLeftRadius: "modal",
|
|
1249
1280
|
borderTopRightRadius: "modal",
|
|
1281
|
+
style: { backgroundColor: theme.background.modal },
|
|
1250
1282
|
children: [
|
|
1251
1283
|
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", style: topBar, children: [
|
|
1252
|
-
/* @__PURE__ */
|
|
1253
|
-
|
|
1284
|
+
/* @__PURE__ */ jsx10(
|
|
1285
|
+
Box,
|
|
1286
|
+
{
|
|
1287
|
+
style: [
|
|
1288
|
+
grabber,
|
|
1289
|
+
{ backgroundColor: theme.border.elements.default.color }
|
|
1290
|
+
]
|
|
1291
|
+
}
|
|
1292
|
+
),
|
|
1293
|
+
/* @__PURE__ */ jsx10(
|
|
1294
|
+
Text,
|
|
1295
|
+
{
|
|
1296
|
+
variant: "bodyMedium",
|
|
1297
|
+
style: { color: theme.content.elements.primary },
|
|
1298
|
+
children: title
|
|
1299
|
+
}
|
|
1300
|
+
)
|
|
1254
1301
|
] }),
|
|
1255
|
-
error ? /* @__PURE__ */
|
|
1302
|
+
error ? /* @__PURE__ */ jsx10(
|
|
1256
1303
|
SelectMethodError,
|
|
1257
1304
|
{
|
|
1258
1305
|
title: errorTitle,
|
|
@@ -1260,7 +1307,7 @@ function SelectMethodScreen({
|
|
|
1260
1307
|
retryLabel,
|
|
1261
1308
|
onRetry
|
|
1262
1309
|
}
|
|
1263
|
-
) : loading ? /* @__PURE__ */
|
|
1310
|
+
) : loading ? /* @__PURE__ */ jsx10(
|
|
1264
1311
|
SelectMethodLoading,
|
|
1265
1312
|
{
|
|
1266
1313
|
count: skeletonCount,
|
|
@@ -1270,8 +1317,16 @@ function SelectMethodScreen({
|
|
|
1270
1317
|
}
|
|
1271
1318
|
) : /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
1272
1319
|
showDropdown ? /* @__PURE__ */ jsxs4(Box, { style: depositSection, children: [
|
|
1273
|
-
/* @__PURE__ */
|
|
1274
|
-
|
|
1320
|
+
/* @__PURE__ */ jsx10(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx10(
|
|
1321
|
+
Text,
|
|
1322
|
+
{
|
|
1323
|
+
variant: "detail",
|
|
1324
|
+
weight: "medium",
|
|
1325
|
+
style: { color: theme.content.elements.secondary },
|
|
1326
|
+
children: depositToLabel
|
|
1327
|
+
}
|
|
1328
|
+
) }),
|
|
1329
|
+
/* @__PURE__ */ jsx10(
|
|
1275
1330
|
ReceiveTokenDropdown,
|
|
1276
1331
|
{
|
|
1277
1332
|
tokens: receiveTokens,
|
|
@@ -1289,24 +1344,36 @@ function SelectMethodScreen({
|
|
|
1289
1344
|
// "Pay with" section: a labeled, bordered card wrapping the method
|
|
1290
1345
|
// rows with hairline dividers between them (Figma node 11202:8282).
|
|
1291
1346
|
/* @__PURE__ */ jsxs4(Box, { style: payWithSection, children: [
|
|
1292
|
-
/* @__PURE__ */
|
|
1293
|
-
|
|
1347
|
+
/* @__PURE__ */ jsx10(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx10(
|
|
1348
|
+
Text,
|
|
1349
|
+
{
|
|
1350
|
+
variant: "detail",
|
|
1351
|
+
weight: "medium",
|
|
1352
|
+
style: { color: theme.content.elements.secondary },
|
|
1353
|
+
children: payWithLabel
|
|
1354
|
+
}
|
|
1355
|
+
) }),
|
|
1356
|
+
/* @__PURE__ */ jsx10(
|
|
1294
1357
|
Box,
|
|
1295
1358
|
{
|
|
1296
|
-
backgroundColor: "bgModal",
|
|
1297
|
-
borderColor: "borderDefault",
|
|
1298
1359
|
borderWidth: 1,
|
|
1299
1360
|
borderRadius: "element",
|
|
1300
|
-
style:
|
|
1361
|
+
style: [
|
|
1362
|
+
methodsCard,
|
|
1363
|
+
{
|
|
1364
|
+
backgroundColor: theme.background.modal,
|
|
1365
|
+
borderColor: theme.border.elements.default.color
|
|
1366
|
+
}
|
|
1367
|
+
],
|
|
1301
1368
|
children: methods.map((method, i) => /* @__PURE__ */ jsxs4(Box, { children: [
|
|
1302
|
-
i > 0 ? /* @__PURE__ */
|
|
1303
|
-
/* @__PURE__ */
|
|
1369
|
+
i > 0 ? /* @__PURE__ */ jsx10(MethodDivider, {}) : null,
|
|
1370
|
+
/* @__PURE__ */ jsx10(
|
|
1304
1371
|
Pressable,
|
|
1305
1372
|
{
|
|
1306
1373
|
onPress: () => onSelectMethod(method.id),
|
|
1307
1374
|
accessibilityRole: "button",
|
|
1308
1375
|
accessibilityLabel: method.title,
|
|
1309
|
-
children: /* @__PURE__ */
|
|
1376
|
+
children: /* @__PURE__ */ jsx10(PaymentMethodRow, { method })
|
|
1310
1377
|
}
|
|
1311
1378
|
)
|
|
1312
1379
|
] }, method.id))
|
|
@@ -1316,20 +1383,20 @@ function SelectMethodScreen({
|
|
|
1316
1383
|
) : (
|
|
1317
1384
|
// Methods-only: bare rows with full-width hairline dividers, no
|
|
1318
1385
|
// outer border (Figma node 11202:8632).
|
|
1319
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ jsx10(
|
|
1320
1387
|
ScrollView,
|
|
1321
1388
|
{
|
|
1322
1389
|
contentContainerStyle: listContent,
|
|
1323
1390
|
showsVerticalScrollIndicator: false,
|
|
1324
1391
|
children: methods.map((method, i) => /* @__PURE__ */ jsxs4(Box, { children: [
|
|
1325
|
-
i > 0 ? /* @__PURE__ */
|
|
1326
|
-
/* @__PURE__ */
|
|
1392
|
+
i > 0 ? /* @__PURE__ */ jsx10(MethodDivider, {}) : null,
|
|
1393
|
+
/* @__PURE__ */ jsx10(
|
|
1327
1394
|
Pressable,
|
|
1328
1395
|
{
|
|
1329
1396
|
onPress: () => onSelectMethod(method.id),
|
|
1330
1397
|
accessibilityRole: "button",
|
|
1331
1398
|
accessibilityLabel: method.title,
|
|
1332
|
-
children: /* @__PURE__ */
|
|
1399
|
+
children: /* @__PURE__ */ jsx10(PaymentMethodRow, { method })
|
|
1333
1400
|
}
|
|
1334
1401
|
)
|
|
1335
1402
|
] }, method.id))
|
|
@@ -1337,7 +1404,7 @@ function SelectMethodScreen({
|
|
|
1337
1404
|
)
|
|
1338
1405
|
)
|
|
1339
1406
|
] }),
|
|
1340
|
-
scrimVisible ? /* @__PURE__ */
|
|
1407
|
+
scrimVisible ? /* @__PURE__ */ jsx10(
|
|
1341
1408
|
AnimatedPressable,
|
|
1342
1409
|
{
|
|
1343
1410
|
entering: scrimEnter,
|
|
@@ -1358,26 +1425,54 @@ function SelectMethodError({
|
|
|
1358
1425
|
retryLabel,
|
|
1359
1426
|
onRetry
|
|
1360
1427
|
}) {
|
|
1428
|
+
const theme = useTheme();
|
|
1361
1429
|
return /* @__PURE__ */ jsxs4(Box, { alignItems: "center", justifyContent: "center", style: errorContainer, children: [
|
|
1430
|
+
/* @__PURE__ */ jsx10(StatusIcon, {}),
|
|
1362
1431
|
/* @__PURE__ */ jsxs4(Box, { alignItems: "center", style: errorText, children: [
|
|
1363
|
-
/* @__PURE__ */
|
|
1364
|
-
|
|
1432
|
+
/* @__PURE__ */ jsx10(
|
|
1433
|
+
Text,
|
|
1434
|
+
{
|
|
1435
|
+
variant: "bodyMedium",
|
|
1436
|
+
style: { color: theme.content.elements.primary },
|
|
1437
|
+
children: title
|
|
1438
|
+
}
|
|
1439
|
+
),
|
|
1440
|
+
/* @__PURE__ */ jsx10(
|
|
1441
|
+
Text,
|
|
1442
|
+
{
|
|
1443
|
+
variant: "detail",
|
|
1444
|
+
style: [
|
|
1445
|
+
errorMessageText,
|
|
1446
|
+
{ color: theme.content.elements.secondary }
|
|
1447
|
+
],
|
|
1448
|
+
children: message
|
|
1449
|
+
}
|
|
1450
|
+
)
|
|
1365
1451
|
] }),
|
|
1366
|
-
onRetry ? /* @__PURE__ */
|
|
1452
|
+
onRetry ? /* @__PURE__ */ jsx10(
|
|
1367
1453
|
Pressable,
|
|
1368
1454
|
{
|
|
1369
1455
|
onPress: onRetry,
|
|
1370
1456
|
accessibilityRole: "button",
|
|
1371
1457
|
accessibilityLabel: retryLabel,
|
|
1372
|
-
children: /* @__PURE__ */
|
|
1458
|
+
children: /* @__PURE__ */ jsx10(
|
|
1373
1459
|
Box,
|
|
1374
1460
|
{
|
|
1375
|
-
backgroundColor: "btnPrimary",
|
|
1376
1461
|
borderRadius: "button",
|
|
1377
1462
|
alignItems: "center",
|
|
1378
1463
|
justifyContent: "center",
|
|
1379
|
-
style:
|
|
1380
|
-
|
|
1464
|
+
style: [
|
|
1465
|
+
retryButton,
|
|
1466
|
+
{ backgroundColor: theme.background.button.primary.default }
|
|
1467
|
+
],
|
|
1468
|
+
children: /* @__PURE__ */ jsx10(
|
|
1469
|
+
Text,
|
|
1470
|
+
{
|
|
1471
|
+
variant: "bodyMedium",
|
|
1472
|
+
style: { color: theme.content.button.primary.default },
|
|
1473
|
+
children: retryLabel
|
|
1474
|
+
}
|
|
1475
|
+
)
|
|
1381
1476
|
}
|
|
1382
1477
|
)
|
|
1383
1478
|
}
|
|
@@ -1385,6 +1480,7 @@ function SelectMethodError({
|
|
|
1385
1480
|
] });
|
|
1386
1481
|
}
|
|
1387
1482
|
function PaymentMethodRow({ method }) {
|
|
1483
|
+
const theme = useTheme();
|
|
1388
1484
|
return /* @__PURE__ */ jsxs4(
|
|
1389
1485
|
Box,
|
|
1390
1486
|
{
|
|
@@ -1393,21 +1489,35 @@ function PaymentMethodRow({ method }) {
|
|
|
1393
1489
|
gap: "elementsHorizontal",
|
|
1394
1490
|
style: row,
|
|
1395
1491
|
children: [
|
|
1396
|
-
/* @__PURE__ */
|
|
1492
|
+
/* @__PURE__ */ jsx10(
|
|
1397
1493
|
Box,
|
|
1398
1494
|
{
|
|
1399
1495
|
width: 48,
|
|
1400
1496
|
height: 48,
|
|
1401
1497
|
borderRadius: "rounded",
|
|
1402
|
-
backgroundColor: "bgSecondary",
|
|
1403
1498
|
alignItems: "center",
|
|
1404
1499
|
justifyContent: "center",
|
|
1500
|
+
style: { backgroundColor: theme.background.secondary },
|
|
1405
1501
|
children: method.icon
|
|
1406
1502
|
}
|
|
1407
1503
|
),
|
|
1408
1504
|
/* @__PURE__ */ jsxs4(Box, { flex: 1, style: details, children: [
|
|
1409
|
-
/* @__PURE__ */
|
|
1410
|
-
|
|
1505
|
+
/* @__PURE__ */ jsx10(
|
|
1506
|
+
Text,
|
|
1507
|
+
{
|
|
1508
|
+
variant: "bodyMedium",
|
|
1509
|
+
style: { color: theme.content.elements.primary },
|
|
1510
|
+
children: method.title
|
|
1511
|
+
}
|
|
1512
|
+
),
|
|
1513
|
+
method.subtitle ? /* @__PURE__ */ jsx10(
|
|
1514
|
+
Text,
|
|
1515
|
+
{
|
|
1516
|
+
variant: "detail",
|
|
1517
|
+
style: { color: theme.content.elements.secondary },
|
|
1518
|
+
children: method.subtitle
|
|
1519
|
+
}
|
|
1520
|
+
) : null
|
|
1411
1521
|
] }),
|
|
1412
1522
|
method.trailing
|
|
1413
1523
|
]
|
|
@@ -1415,7 +1525,16 @@ function PaymentMethodRow({ method }) {
|
|
|
1415
1525
|
);
|
|
1416
1526
|
}
|
|
1417
1527
|
function MethodDivider() {
|
|
1418
|
-
|
|
1528
|
+
const theme = useTheme();
|
|
1529
|
+
return /* @__PURE__ */ jsx10(
|
|
1530
|
+
Box,
|
|
1531
|
+
{
|
|
1532
|
+
style: [
|
|
1533
|
+
divider,
|
|
1534
|
+
{ backgroundColor: theme.border.elements.default.color }
|
|
1535
|
+
]
|
|
1536
|
+
}
|
|
1537
|
+
);
|
|
1419
1538
|
}
|
|
1420
1539
|
function ReceiveTokenDropdown({
|
|
1421
1540
|
tokens,
|
|
@@ -1424,9 +1543,10 @@ function ReceiveTokenDropdown({
|
|
|
1424
1543
|
onToggle,
|
|
1425
1544
|
onSelect
|
|
1426
1545
|
}) {
|
|
1546
|
+
const theme = useTheme();
|
|
1427
1547
|
const selectable = tokens.length > 1;
|
|
1428
1548
|
return /* @__PURE__ */ jsxs4(Box, { style: dropdownAnchor, children: [
|
|
1429
|
-
/* @__PURE__ */
|
|
1549
|
+
/* @__PURE__ */ jsx10(
|
|
1430
1550
|
Pressable,
|
|
1431
1551
|
{
|
|
1432
1552
|
onPress: selectable ? onToggle : void 0,
|
|
@@ -1438,44 +1558,46 @@ function ReceiveTokenDropdown({
|
|
|
1438
1558
|
flexDirection: "row",
|
|
1439
1559
|
alignItems: "center",
|
|
1440
1560
|
justifyContent: "space-between",
|
|
1441
|
-
backgroundColor: "bgModal",
|
|
1442
|
-
borderColor: "borderDefault",
|
|
1443
1561
|
borderWidth: 1,
|
|
1444
1562
|
borderRadius: "element",
|
|
1445
|
-
style:
|
|
1563
|
+
style: [
|
|
1564
|
+
dropdownTrigger,
|
|
1565
|
+
{
|
|
1566
|
+
backgroundColor: theme.background.modal,
|
|
1567
|
+
borderColor: theme.border.elements.default.color
|
|
1568
|
+
}
|
|
1569
|
+
],
|
|
1446
1570
|
children: [
|
|
1447
1571
|
/* @__PURE__ */ jsxs4(Box, { flexDirection: "row", alignItems: "center", style: triggerLeft, children: [
|
|
1448
|
-
selected.icon ?? /* @__PURE__ */
|
|
1449
|
-
/* @__PURE__ */
|
|
1572
|
+
selected.icon ?? /* @__PURE__ */ jsx10(ReceiveTokenIconFallback, {}),
|
|
1573
|
+
/* @__PURE__ */ jsx10(
|
|
1450
1574
|
Text,
|
|
1451
1575
|
{
|
|
1452
1576
|
variant: "bodyMedium",
|
|
1453
|
-
color: "textPrimary",
|
|
1454
1577
|
numberOfLines: 1,
|
|
1455
|
-
style: triggerLabel,
|
|
1578
|
+
style: [triggerLabel, { color: theme.content.elements.primary }],
|
|
1456
1579
|
children: selected.label
|
|
1457
1580
|
}
|
|
1458
1581
|
)
|
|
1459
1582
|
] }),
|
|
1460
|
-
selectable ? /* @__PURE__ */
|
|
1583
|
+
selectable ? /* @__PURE__ */ jsx10(AnimatedChevron, { open }) : null
|
|
1461
1584
|
]
|
|
1462
1585
|
}
|
|
1463
1586
|
)
|
|
1464
1587
|
}
|
|
1465
1588
|
),
|
|
1466
|
-
open && selectable ? /* @__PURE__ */
|
|
1589
|
+
open && selectable ? /* @__PURE__ */ jsx10(
|
|
1467
1590
|
Reanimated.View,
|
|
1468
1591
|
{
|
|
1469
1592
|
entering: menuEnter,
|
|
1470
1593
|
exiting: menuExit,
|
|
1471
1594
|
style: dropdownMenuOverlay,
|
|
1472
|
-
children: /* @__PURE__ */
|
|
1595
|
+
children: /* @__PURE__ */ jsx10(
|
|
1473
1596
|
Box,
|
|
1474
1597
|
{
|
|
1475
|
-
backgroundColor: "bgModal",
|
|
1476
1598
|
borderRadius: "element",
|
|
1477
|
-
style: dropdownMenu,
|
|
1478
|
-
children: tokens.map((token) => /* @__PURE__ */
|
|
1599
|
+
style: [dropdownMenu, { backgroundColor: theme.background.modal }],
|
|
1600
|
+
children: tokens.map((token) => /* @__PURE__ */ jsx10(
|
|
1479
1601
|
Pressable,
|
|
1480
1602
|
{
|
|
1481
1603
|
onPress: () => onSelect(token.id),
|
|
@@ -1496,12 +1618,19 @@ function ReceiveTokenDropdown({
|
|
|
1496
1618
|
alignItems: "center",
|
|
1497
1619
|
style: triggerLeft,
|
|
1498
1620
|
children: [
|
|
1499
|
-
token.icon ?? /* @__PURE__ */
|
|
1500
|
-
/* @__PURE__ */
|
|
1621
|
+
token.icon ?? /* @__PURE__ */ jsx10(ReceiveTokenIconFallback, {}),
|
|
1622
|
+
/* @__PURE__ */ jsx10(
|
|
1623
|
+
Text,
|
|
1624
|
+
{
|
|
1625
|
+
variant: "bodyMedium",
|
|
1626
|
+
style: { color: theme.content.elements.primary },
|
|
1627
|
+
children: token.label
|
|
1628
|
+
}
|
|
1629
|
+
)
|
|
1501
1630
|
]
|
|
1502
1631
|
}
|
|
1503
1632
|
),
|
|
1504
|
-
token.id === selected.id ? /* @__PURE__ */
|
|
1633
|
+
token.id === selected.id ? /* @__PURE__ */ jsx10(CheckIcon, {}) : null
|
|
1505
1634
|
]
|
|
1506
1635
|
}
|
|
1507
1636
|
)
|
|
@@ -1515,18 +1644,19 @@ function ReceiveTokenDropdown({
|
|
|
1515
1644
|
] });
|
|
1516
1645
|
}
|
|
1517
1646
|
function ReceiveTokenIconFallback() {
|
|
1518
|
-
|
|
1647
|
+
const theme = useTheme();
|
|
1648
|
+
return /* @__PURE__ */ jsx10(
|
|
1519
1649
|
Box,
|
|
1520
1650
|
{
|
|
1521
1651
|
width: 24,
|
|
1522
1652
|
height: 24,
|
|
1523
1653
|
borderRadius: "rounded",
|
|
1524
|
-
backgroundColor:
|
|
1654
|
+
style: { backgroundColor: theme.background.pill.pressed }
|
|
1525
1655
|
}
|
|
1526
1656
|
);
|
|
1527
1657
|
}
|
|
1528
1658
|
function ChevronDownIcon() {
|
|
1529
|
-
return /* @__PURE__ */
|
|
1659
|
+
return /* @__PURE__ */ jsx10(FigmaChevronDownIcon, { size: 16 });
|
|
1530
1660
|
}
|
|
1531
1661
|
function AnimatedChevron({ open }) {
|
|
1532
1662
|
const rotation = useSharedValue(open ? 1 : 0);
|
|
@@ -1539,10 +1669,10 @@ function AnimatedChevron({ open }) {
|
|
|
1539
1669
|
const style = useAnimatedStyle(() => ({
|
|
1540
1670
|
transform: [{ rotate: `${rotation.value * 180}deg` }]
|
|
1541
1671
|
}));
|
|
1542
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ jsx10(Reanimated.View, { style, children: /* @__PURE__ */ jsx10(FigmaChevronDownIcon, { size: 16 }) });
|
|
1543
1673
|
}
|
|
1544
1674
|
function CheckIcon() {
|
|
1545
|
-
return /* @__PURE__ */
|
|
1675
|
+
return /* @__PURE__ */ jsx10(FigmaCheckIcon, { size: 16 });
|
|
1546
1676
|
}
|
|
1547
1677
|
function SelectMethodLoading({
|
|
1548
1678
|
count,
|
|
@@ -1550,71 +1680,103 @@ function SelectMethodLoading({
|
|
|
1550
1680
|
depositToLabel,
|
|
1551
1681
|
payWithLabel
|
|
1552
1682
|
}) {
|
|
1683
|
+
const theme = useTheme();
|
|
1553
1684
|
const opacity = usePulse();
|
|
1554
1685
|
const rowCount = count ?? (showDropdown ? 5 : 6);
|
|
1555
1686
|
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
1556
1687
|
showDropdown ? /* @__PURE__ */ jsxs4(Box, { style: depositSection, children: [
|
|
1557
|
-
/* @__PURE__ */
|
|
1688
|
+
/* @__PURE__ */ jsx10(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx10(
|
|
1689
|
+
Text,
|
|
1690
|
+
{
|
|
1691
|
+
variant: "detail",
|
|
1692
|
+
style: { color: theme.content.elements.secondary },
|
|
1693
|
+
children: depositToLabel
|
|
1694
|
+
}
|
|
1695
|
+
) }),
|
|
1558
1696
|
/* @__PURE__ */ jsxs4(
|
|
1559
1697
|
Box,
|
|
1560
1698
|
{
|
|
1561
1699
|
flexDirection: "row",
|
|
1562
1700
|
alignItems: "center",
|
|
1563
1701
|
justifyContent: "space-between",
|
|
1564
|
-
backgroundColor: "bgModal",
|
|
1565
|
-
borderColor: "borderDefault",
|
|
1566
1702
|
borderWidth: 1,
|
|
1567
1703
|
borderRadius: "element",
|
|
1568
|
-
style:
|
|
1704
|
+
style: [
|
|
1705
|
+
dropdownTrigger,
|
|
1706
|
+
{
|
|
1707
|
+
backgroundColor: theme.background.modal,
|
|
1708
|
+
borderColor: theme.border.elements.default.color
|
|
1709
|
+
}
|
|
1710
|
+
],
|
|
1569
1711
|
children: [
|
|
1570
1712
|
/* @__PURE__ */ jsxs4(Animated2.View, { style: [loadingSelectorLeft, { opacity }], children: [
|
|
1571
|
-
/* @__PURE__ */
|
|
1713
|
+
/* @__PURE__ */ jsx10(
|
|
1572
1714
|
Box,
|
|
1573
1715
|
{
|
|
1574
1716
|
width: 20,
|
|
1575
1717
|
height: 20,
|
|
1576
1718
|
borderRadius: "rounded",
|
|
1577
|
-
backgroundColor:
|
|
1719
|
+
style: { backgroundColor: theme.background.pill.pressed }
|
|
1578
1720
|
}
|
|
1579
1721
|
),
|
|
1580
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ jsx10(
|
|
1723
|
+
Box,
|
|
1724
|
+
{
|
|
1725
|
+
style: [
|
|
1726
|
+
skeletonTitleBar,
|
|
1727
|
+
{ backgroundColor: theme.background.pill.pressed }
|
|
1728
|
+
]
|
|
1729
|
+
}
|
|
1730
|
+
)
|
|
1581
1731
|
] }),
|
|
1582
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ jsx10(ChevronDownIcon, {})
|
|
1583
1733
|
]
|
|
1584
1734
|
}
|
|
1585
1735
|
)
|
|
1586
1736
|
] }) : null,
|
|
1587
1737
|
showDropdown ? /* @__PURE__ */ jsxs4(Box, { style: payWithSection, children: [
|
|
1588
|
-
/* @__PURE__ */
|
|
1589
|
-
|
|
1738
|
+
/* @__PURE__ */ jsx10(Box, { style: sectionLabel, children: /* @__PURE__ */ jsx10(
|
|
1739
|
+
Text,
|
|
1740
|
+
{
|
|
1741
|
+
variant: "detail",
|
|
1742
|
+
style: { color: theme.content.elements.secondary },
|
|
1743
|
+
children: payWithLabel
|
|
1744
|
+
}
|
|
1745
|
+
) }),
|
|
1746
|
+
/* @__PURE__ */ jsx10(
|
|
1590
1747
|
Box,
|
|
1591
1748
|
{
|
|
1592
|
-
backgroundColor: "bgModal",
|
|
1593
|
-
borderColor: "borderDefault",
|
|
1594
1749
|
borderWidth: 1,
|
|
1595
1750
|
borderRadius: "element",
|
|
1596
|
-
style:
|
|
1597
|
-
|
|
1751
|
+
style: [
|
|
1752
|
+
methodsCard,
|
|
1753
|
+
{
|
|
1754
|
+
backgroundColor: theme.background.modal,
|
|
1755
|
+
borderColor: theme.border.elements.default.color
|
|
1756
|
+
}
|
|
1757
|
+
],
|
|
1758
|
+
children: /* @__PURE__ */ jsx10(
|
|
1598
1759
|
Animated2.View,
|
|
1599
1760
|
{
|
|
1600
1761
|
style: { opacity },
|
|
1601
1762
|
accessibilityLabel: "Loading payment methods",
|
|
1602
|
-
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */
|
|
1763
|
+
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */ jsx10(PaymentMethodRowSkeleton, {}, i))
|
|
1603
1764
|
}
|
|
1604
1765
|
)
|
|
1605
1766
|
}
|
|
1606
1767
|
)
|
|
1607
|
-
] }) : /* @__PURE__ */
|
|
1768
|
+
] }) : /* @__PURE__ */ jsx10(Box, { style: skeletonListContent, children: /* @__PURE__ */ jsx10(
|
|
1608
1769
|
Animated2.View,
|
|
1609
1770
|
{
|
|
1610
1771
|
style: { opacity },
|
|
1611
1772
|
accessibilityLabel: "Loading payment methods",
|
|
1612
|
-
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */
|
|
1773
|
+
children: Array.from({ length: rowCount }, (_, i) => /* @__PURE__ */ jsx10(PaymentMethodRowSkeleton, {}, i))
|
|
1613
1774
|
}
|
|
1614
1775
|
) })
|
|
1615
1776
|
] });
|
|
1616
1777
|
}
|
|
1617
1778
|
function PaymentMethodRowSkeleton() {
|
|
1779
|
+
const theme = useTheme();
|
|
1618
1780
|
return /* @__PURE__ */ jsxs4(
|
|
1619
1781
|
Box,
|
|
1620
1782
|
{
|
|
@@ -1623,18 +1785,34 @@ function PaymentMethodRowSkeleton() {
|
|
|
1623
1785
|
gap: "elementsHorizontal",
|
|
1624
1786
|
style: skeletonRow,
|
|
1625
1787
|
children: [
|
|
1626
|
-
/* @__PURE__ */
|
|
1788
|
+
/* @__PURE__ */ jsx10(
|
|
1627
1789
|
Box,
|
|
1628
1790
|
{
|
|
1629
1791
|
width: 48,
|
|
1630
1792
|
height: 48,
|
|
1631
1793
|
borderRadius: "rounded",
|
|
1632
|
-
backgroundColor:
|
|
1794
|
+
style: { backgroundColor: theme.background.pill.pressed }
|
|
1633
1795
|
}
|
|
1634
1796
|
),
|
|
1635
1797
|
/* @__PURE__ */ jsxs4(Box, { flex: 1, style: skeletonDetails, children: [
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
|
|
1798
|
+
/* @__PURE__ */ jsx10(
|
|
1799
|
+
Box,
|
|
1800
|
+
{
|
|
1801
|
+
style: [
|
|
1802
|
+
skeletonTitleBar,
|
|
1803
|
+
{ backgroundColor: theme.background.pill.pressed }
|
|
1804
|
+
]
|
|
1805
|
+
}
|
|
1806
|
+
),
|
|
1807
|
+
/* @__PURE__ */ jsx10(
|
|
1808
|
+
Box,
|
|
1809
|
+
{
|
|
1810
|
+
style: [
|
|
1811
|
+
skeletonSubtitleBar,
|
|
1812
|
+
{ backgroundColor: theme.background.pill.pressed }
|
|
1813
|
+
]
|
|
1814
|
+
}
|
|
1815
|
+
)
|
|
1638
1816
|
] })
|
|
1639
1817
|
]
|
|
1640
1818
|
}
|
|
@@ -1750,7 +1928,7 @@ import {
|
|
|
1750
1928
|
ScrollView as ScrollView2,
|
|
1751
1929
|
useWindowDimensions
|
|
1752
1930
|
} from "react-native";
|
|
1753
|
-
import { jsx as
|
|
1931
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1754
1932
|
function AvailableChainsScreen({
|
|
1755
1933
|
networkLabel,
|
|
1756
1934
|
chains,
|
|
@@ -1761,33 +1939,40 @@ function AvailableChainsScreen({
|
|
|
1761
1939
|
onClose
|
|
1762
1940
|
}) {
|
|
1763
1941
|
const { height } = useWindowDimensions();
|
|
1942
|
+
const theme = useTheme();
|
|
1764
1943
|
return /* @__PURE__ */ jsxs5(
|
|
1765
1944
|
Box,
|
|
1766
1945
|
{
|
|
1767
|
-
backgroundColor: "bgModal",
|
|
1768
1946
|
borderTopLeftRadius: "modal",
|
|
1769
1947
|
borderTopRightRadius: "modal",
|
|
1770
|
-
style: sheet,
|
|
1948
|
+
style: [sheet, { backgroundColor: theme.background.modal }],
|
|
1771
1949
|
children: [
|
|
1772
1950
|
/* @__PURE__ */ jsxs5(Box, { flexDirection: "row", alignItems: "center", style: topBar2, children: [
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
1775
|
-
|
|
1951
|
+
/* @__PURE__ */ jsx11(Box, { style: topBarSpacer }),
|
|
1952
|
+
/* @__PURE__ */ jsx11(Box, { flex: 1, alignItems: "center", children: /* @__PURE__ */ jsx11(
|
|
1953
|
+
Text,
|
|
1954
|
+
{
|
|
1955
|
+
variant: "bodyMedium",
|
|
1956
|
+
style: { color: theme.content.elements.primary },
|
|
1957
|
+
children: title
|
|
1958
|
+
}
|
|
1959
|
+
) }),
|
|
1960
|
+
/* @__PURE__ */ jsx11(Box, { style: topBarSpacer })
|
|
1776
1961
|
] }),
|
|
1777
|
-
/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ jsx11(
|
|
1778
1963
|
ScrollView2,
|
|
1779
1964
|
{
|
|
1780
1965
|
style: [list, { maxHeight: height * 0.72 }],
|
|
1781
1966
|
showsVerticalScrollIndicator: false,
|
|
1782
1967
|
contentContainerStyle: listContent2,
|
|
1783
|
-
children: loading ? Array.from({ length: skeletonCount }, (_, index) => /* @__PURE__ */
|
|
1968
|
+
children: loading ? Array.from({ length: skeletonCount }, (_, index) => /* @__PURE__ */ jsx11(AvailableChainSkeleton, {}, index)) : chains.map((chain) => /* @__PURE__ */ jsxs5(
|
|
1784
1969
|
Box,
|
|
1785
1970
|
{
|
|
1786
1971
|
flexDirection: "row",
|
|
1787
1972
|
alignItems: "center",
|
|
1788
1973
|
style: row2,
|
|
1789
1974
|
children: [
|
|
1790
|
-
/* @__PURE__ */
|
|
1975
|
+
/* @__PURE__ */ jsx11(Box, { style: iconRing2, children: /* @__PURE__ */ jsx11(
|
|
1791
1976
|
FunIcon,
|
|
1792
1977
|
{
|
|
1793
1978
|
uri: chain.iconUri,
|
|
@@ -1795,30 +1980,53 @@ function AvailableChainsScreen({
|
|
|
1795
1980
|
fallbackUri: FALLBACK_ASSET_LOGO
|
|
1796
1981
|
}
|
|
1797
1982
|
) }),
|
|
1798
|
-
/* @__PURE__ */
|
|
1799
|
-
|
|
1983
|
+
/* @__PURE__ */ jsx11(Box, { flex: 1, children: /* @__PURE__ */ jsx11(
|
|
1984
|
+
Text,
|
|
1985
|
+
{
|
|
1986
|
+
variant: "bodyMedium",
|
|
1987
|
+
style: { color: theme.content.elements.primary },
|
|
1988
|
+
children: chain.name
|
|
1989
|
+
}
|
|
1990
|
+
) }),
|
|
1991
|
+
chain.minLabel ? /* @__PURE__ */ jsx11(
|
|
1992
|
+
Text,
|
|
1993
|
+
{
|
|
1994
|
+
variant: "detail",
|
|
1995
|
+
style: { color: theme.content.elements.secondary },
|
|
1996
|
+
children: chain.minLabel
|
|
1997
|
+
}
|
|
1998
|
+
) : null
|
|
1800
1999
|
]
|
|
1801
2000
|
},
|
|
1802
2001
|
chain.id
|
|
1803
2002
|
))
|
|
1804
2003
|
}
|
|
1805
2004
|
),
|
|
1806
|
-
/* @__PURE__ */
|
|
2005
|
+
/* @__PURE__ */ jsx11(Box, { style: buttonContainer, children: /* @__PURE__ */ jsx11(
|
|
1807
2006
|
Pressable2,
|
|
1808
2007
|
{
|
|
1809
2008
|
onPress: onClose,
|
|
1810
2009
|
accessibilityRole: "button",
|
|
1811
2010
|
accessibilityLabel: gotItLabel,
|
|
1812
|
-
children: /* @__PURE__ */
|
|
2011
|
+
children: /* @__PURE__ */ jsx11(
|
|
1813
2012
|
Box,
|
|
1814
2013
|
{
|
|
1815
2014
|
flexDirection: "row",
|
|
1816
2015
|
alignItems: "center",
|
|
1817
2016
|
justifyContent: "center",
|
|
1818
|
-
backgroundColor: "btnPrimary",
|
|
1819
2017
|
borderRadius: "button",
|
|
1820
|
-
style:
|
|
1821
|
-
|
|
2018
|
+
style: [
|
|
2019
|
+
gotItButton,
|
|
2020
|
+
{ backgroundColor: theme.background.button.primary.default }
|
|
2021
|
+
],
|
|
2022
|
+
children: /* @__PURE__ */ jsx11(
|
|
2023
|
+
Text,
|
|
2024
|
+
{
|
|
2025
|
+
variant: "bodyMedium",
|
|
2026
|
+
style: { color: theme.content.button.primary.default },
|
|
2027
|
+
children: gotItLabel
|
|
2028
|
+
}
|
|
2029
|
+
)
|
|
1822
2030
|
}
|
|
1823
2031
|
)
|
|
1824
2032
|
}
|
|
@@ -1828,10 +2036,35 @@ function AvailableChainsScreen({
|
|
|
1828
2036
|
);
|
|
1829
2037
|
}
|
|
1830
2038
|
function AvailableChainSkeleton() {
|
|
2039
|
+
const theme = useTheme();
|
|
1831
2040
|
return /* @__PURE__ */ jsxs5(Box, { flexDirection: "row", alignItems: "center", style: row2, children: [
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
|
|
1834
|
-
|
|
2041
|
+
/* @__PURE__ */ jsx11(
|
|
2042
|
+
Box,
|
|
2043
|
+
{
|
|
2044
|
+
style: [
|
|
2045
|
+
skeletonIcon,
|
|
2046
|
+
{ backgroundColor: theme.background.pill.pressed }
|
|
2047
|
+
]
|
|
2048
|
+
}
|
|
2049
|
+
),
|
|
2050
|
+
/* @__PURE__ */ jsx11(Box, { flex: 1, children: /* @__PURE__ */ jsx11(
|
|
2051
|
+
Box,
|
|
2052
|
+
{
|
|
2053
|
+
style: [
|
|
2054
|
+
skeletonName,
|
|
2055
|
+
{ backgroundColor: theme.background.pill.pressed }
|
|
2056
|
+
]
|
|
2057
|
+
}
|
|
2058
|
+
) }),
|
|
2059
|
+
/* @__PURE__ */ jsx11(
|
|
2060
|
+
Box,
|
|
2061
|
+
{
|
|
2062
|
+
style: [
|
|
2063
|
+
skeletonMin,
|
|
2064
|
+
{ backgroundColor: theme.background.pill.pressed }
|
|
2065
|
+
]
|
|
2066
|
+
}
|
|
2067
|
+
)
|
|
1835
2068
|
] });
|
|
1836
2069
|
}
|
|
1837
2070
|
var sheet = { paddingBottom: 34 };
|
|
@@ -1861,55 +2094,72 @@ var iconRing2 = {
|
|
|
1861
2094
|
};
|
|
1862
2095
|
|
|
1863
2096
|
// src/screens/CheckoutBlockedScreen.tsx
|
|
1864
|
-
import { Linking, Pressable as Pressable3, StyleSheet as
|
|
1865
|
-
import { jsx as
|
|
2097
|
+
import { Linking, Pressable as Pressable3, StyleSheet as StyleSheet3 } from "react-native";
|
|
2098
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1866
2099
|
var FUN_REGIONAL_RESTRICTIONS_URL = "https://intercom.help/funxyz/en/articles/9827689-regional-restrictions";
|
|
1867
2100
|
function CheckoutBlockedScreen() {
|
|
2101
|
+
const theme = useTheme();
|
|
1868
2102
|
return /* @__PURE__ */ jsxs6(
|
|
1869
2103
|
Box,
|
|
1870
2104
|
{
|
|
1871
|
-
backgroundColor: "bgModal",
|
|
1872
2105
|
borderTopLeftRadius: "modal",
|
|
1873
2106
|
borderTopRightRadius: "modal",
|
|
2107
|
+
style: { backgroundColor: theme.background.modal },
|
|
1874
2108
|
children: [
|
|
1875
|
-
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", style:
|
|
1876
|
-
/* @__PURE__ */
|
|
1877
|
-
/* @__PURE__ */ jsx11(Text, { variant: "bodyMedium", color: "textPrimary", children: "Add money" })
|
|
1878
|
-
] }),
|
|
1879
|
-
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", justifyContent: "center", style: styles2.content, children: [
|
|
1880
|
-
/* @__PURE__ */ jsx11(
|
|
2109
|
+
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", style: styles3.topBar, children: [
|
|
2110
|
+
/* @__PURE__ */ jsx12(
|
|
1881
2111
|
Box,
|
|
1882
2112
|
{
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
style: styles2.iconCircle,
|
|
1888
|
-
children: /* @__PURE__ */ jsx11(FigmaAlertCircleIcon, { size: 20 })
|
|
2113
|
+
style: [
|
|
2114
|
+
styles3.grabber,
|
|
2115
|
+
{ backgroundColor: theme.border.elements.default.color }
|
|
2116
|
+
]
|
|
1889
2117
|
}
|
|
1890
2118
|
),
|
|
1891
|
-
/* @__PURE__ */
|
|
1892
|
-
|
|
2119
|
+
/* @__PURE__ */ jsx12(
|
|
2120
|
+
Text,
|
|
2121
|
+
{
|
|
2122
|
+
variant: "bodyMedium",
|
|
2123
|
+
style: { color: theme.content.elements.primary },
|
|
2124
|
+
children: "Add money"
|
|
2125
|
+
}
|
|
2126
|
+
)
|
|
2127
|
+
] }),
|
|
2128
|
+
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", justifyContent: "center", style: styles3.content, children: [
|
|
2129
|
+
/* @__PURE__ */ jsx12(StatusIcon, {}),
|
|
2130
|
+
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", style: styles3.textGroup, children: [
|
|
2131
|
+
/* @__PURE__ */ jsx12(
|
|
2132
|
+
Text,
|
|
2133
|
+
{
|
|
2134
|
+
variant: "bodyMedium",
|
|
2135
|
+
style: { color: theme.content.elements.primary },
|
|
2136
|
+
children: "Not available"
|
|
2137
|
+
}
|
|
2138
|
+
),
|
|
1893
2139
|
/* @__PURE__ */ jsxs6(Box, { alignItems: "center", children: [
|
|
1894
|
-
/* @__PURE__ */
|
|
2140
|
+
/* @__PURE__ */ jsx12(
|
|
1895
2141
|
Text,
|
|
1896
2142
|
{
|
|
1897
2143
|
variant: "detail",
|
|
1898
|
-
|
|
1899
|
-
|
|
2144
|
+
style: [
|
|
2145
|
+
styles3.descriptionText,
|
|
2146
|
+
{ color: theme.content.elements.secondary }
|
|
2147
|
+
],
|
|
1900
2148
|
children: "This service is not available in your region."
|
|
1901
2149
|
}
|
|
1902
2150
|
),
|
|
1903
|
-
/* @__PURE__ */
|
|
2151
|
+
/* @__PURE__ */ jsx12(
|
|
1904
2152
|
Pressable3,
|
|
1905
2153
|
{
|
|
1906
2154
|
onPress: () => Linking.openURL(FUN_REGIONAL_RESTRICTIONS_URL),
|
|
1907
|
-
children: /* @__PURE__ */
|
|
2155
|
+
children: /* @__PURE__ */ jsx12(
|
|
1908
2156
|
Text,
|
|
1909
2157
|
{
|
|
1910
2158
|
variant: "detail",
|
|
1911
|
-
|
|
1912
|
-
|
|
2159
|
+
style: [
|
|
2160
|
+
styles3.linkText,
|
|
2161
|
+
{ color: theme.content.elements.secondary }
|
|
2162
|
+
],
|
|
1913
2163
|
children: "View available regions."
|
|
1914
2164
|
}
|
|
1915
2165
|
)
|
|
@@ -1922,7 +2172,7 @@ function CheckoutBlockedScreen() {
|
|
|
1922
2172
|
}
|
|
1923
2173
|
);
|
|
1924
2174
|
}
|
|
1925
|
-
var
|
|
2175
|
+
var styles3 = StyleSheet3.create({
|
|
1926
2176
|
topBar: { height: 64, paddingTop: 25, paddingBottom: 12 },
|
|
1927
2177
|
grabber: {
|
|
1928
2178
|
position: "absolute",
|
|
@@ -1937,7 +2187,6 @@ var styles2 = StyleSheet2.create({
|
|
|
1937
2187
|
paddingHorizontal: 16,
|
|
1938
2188
|
paddingBottom: 34
|
|
1939
2189
|
},
|
|
1940
|
-
iconCircle: { width: 48, height: 48 },
|
|
1941
2190
|
textGroup: { gap: 8 },
|
|
1942
2191
|
descriptionText: { textAlign: "center" },
|
|
1943
2192
|
linkText: { textAlign: "center", textDecorationLine: "underline" }
|
|
@@ -1957,23 +2206,23 @@ function useScreenSize() {
|
|
|
1957
2206
|
|
|
1958
2207
|
// src/icons/CopyAddressIcon.tsx
|
|
1959
2208
|
import { SvgXml as SvgXml4 } from "react-native-svg";
|
|
1960
|
-
import { jsx as
|
|
2209
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1961
2210
|
var COPY_ADDRESS_SVG = `<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.2 5.8V4.26C10.2 3.64394 10.2 3.33591 10.0801 3.10061C9.97465 2.89363 9.80637 2.72535 9.59939 2.61989C9.36409 2.5 9.05606 2.5 8.44 2.5H4.26C3.64394 2.5 3.33591 2.5 3.10061 2.61989C2.89363 2.72535 2.72535 2.89363 2.61989 3.10061C2.5 3.33591 2.5 3.64394 2.5 4.26V8.44C2.5 9.05606 2.5 9.36409 2.61989 9.59939C2.72535 9.80637 2.89363 9.97465 3.10061 10.0801C3.33591 10.2 3.64394 10.2 4.26 10.2H5.8M7.56 13.5H11.74C12.3561 13.5 12.6641 13.5 12.8994 13.3801C13.1064 13.2746 13.2746 13.1064 13.3801 12.8994C13.5 12.6641 13.5 12.3561 13.5 11.74V7.56C13.5 6.94394 13.5 6.63591 13.3801 6.40061C13.2746 6.19363 13.1064 6.02535 12.8994 5.91989C12.6641 5.8 12.3561 5.8 11.74 5.8H7.56C6.94394 5.8 6.63591 5.8 6.40061 5.91989C6.19363 6.02535 6.02535 6.19363 5.91989 6.40061C5.8 6.63591 5.8 6.94394 5.8 7.56V11.74C5.8 12.3561 5.8 12.6641 5.91989 12.8994C6.02535 13.1064 6.19363 13.2746 6.40061 13.3801C6.63591 13.5 6.94394 13.5 7.56 13.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
1962
2211
|
function CopyAddressIcon({ size = 16 }) {
|
|
1963
2212
|
const theme = useTheme();
|
|
1964
|
-
return /* @__PURE__ */
|
|
2213
|
+
return /* @__PURE__ */ jsx13(
|
|
1965
2214
|
SvgXml4,
|
|
1966
2215
|
{
|
|
1967
2216
|
xml: COPY_ADDRESS_SVG,
|
|
1968
2217
|
width: size,
|
|
1969
2218
|
height: size,
|
|
1970
|
-
color: theme.
|
|
2219
|
+
color: theme.content.button.secondary.default
|
|
1971
2220
|
}
|
|
1972
2221
|
);
|
|
1973
2222
|
}
|
|
1974
2223
|
|
|
1975
2224
|
// src/screens/QrCodeScreen.tsx
|
|
1976
|
-
import { jsx as
|
|
2225
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1977
2226
|
function QrCodeScreen({
|
|
1978
2227
|
qrCode,
|
|
1979
2228
|
centerIcon,
|
|
@@ -1987,6 +2236,7 @@ function QrCodeScreen({
|
|
|
1987
2236
|
onCopyAddress
|
|
1988
2237
|
}) {
|
|
1989
2238
|
const { isShort } = useScreenSize();
|
|
2239
|
+
const theme = useTheme();
|
|
1990
2240
|
const [copied, setCopied] = useState5(false);
|
|
1991
2241
|
const copyTimer = useRef2(void 0);
|
|
1992
2242
|
useEffect5(() => () => clearTimeout(copyTimer.current), []);
|
|
@@ -2000,15 +2250,21 @@ function QrCodeScreen({
|
|
|
2000
2250
|
return /* @__PURE__ */ jsxs7(
|
|
2001
2251
|
Box,
|
|
2002
2252
|
{
|
|
2003
|
-
backgroundColor: "bgModal",
|
|
2004
2253
|
borderTopLeftRadius: "modal",
|
|
2005
2254
|
borderTopRightRadius: "modal",
|
|
2006
|
-
style: sheet2,
|
|
2255
|
+
style: [sheet2, { backgroundColor: theme.background.modal }],
|
|
2007
2256
|
children: [
|
|
2008
2257
|
/* @__PURE__ */ jsxs7(Box, { flexDirection: "row", alignItems: "center", style: topBar3, children: [
|
|
2009
|
-
/* @__PURE__ */
|
|
2010
|
-
/* @__PURE__ */
|
|
2011
|
-
|
|
2258
|
+
/* @__PURE__ */ jsx14(Box, { style: topBarSpacer2 }),
|
|
2259
|
+
/* @__PURE__ */ jsx14(Box, { flex: 1, alignItems: "center", children: /* @__PURE__ */ jsx14(
|
|
2260
|
+
Text,
|
|
2261
|
+
{
|
|
2262
|
+
variant: "bodyMedium",
|
|
2263
|
+
style: { color: theme.content.elements.primary },
|
|
2264
|
+
children: title
|
|
2265
|
+
}
|
|
2266
|
+
) }),
|
|
2267
|
+
/* @__PURE__ */ jsx14(Box, { style: topBarSpacer2 })
|
|
2012
2268
|
] }),
|
|
2013
2269
|
/* @__PURE__ */ jsxs7(Box, { style: { paddingVertical: isShort ? 0 : 16 }, children: [
|
|
2014
2270
|
/* @__PURE__ */ jsxs7(
|
|
@@ -2021,15 +2277,19 @@ function QrCodeScreen({
|
|
|
2021
2277
|
/* @__PURE__ */ jsxs7(
|
|
2022
2278
|
Box,
|
|
2023
2279
|
{
|
|
2024
|
-
backgroundColor: "bgModal",
|
|
2025
|
-
borderColor: "borderDefault",
|
|
2026
2280
|
borderWidth: 1.5,
|
|
2027
2281
|
alignItems: "center",
|
|
2028
2282
|
justifyContent: "center",
|
|
2029
|
-
style:
|
|
2283
|
+
style: [
|
|
2284
|
+
qrFrame,
|
|
2285
|
+
{
|
|
2286
|
+
backgroundColor: theme.background.modal,
|
|
2287
|
+
borderColor: theme.border.elements.default.color
|
|
2288
|
+
}
|
|
2289
|
+
],
|
|
2030
2290
|
children: [
|
|
2031
2291
|
qrCode,
|
|
2032
|
-
centerIcon ? /* @__PURE__ */
|
|
2292
|
+
centerIcon ? /* @__PURE__ */ jsx14(
|
|
2033
2293
|
Box,
|
|
2034
2294
|
{
|
|
2035
2295
|
alignItems: "center",
|
|
@@ -2042,8 +2302,18 @@ function QrCodeScreen({
|
|
|
2042
2302
|
}
|
|
2043
2303
|
),
|
|
2044
2304
|
address ? /* @__PURE__ */ jsxs7(Box, { alignItems: "center", style: addressGroup, children: [
|
|
2045
|
-
/* @__PURE__ */
|
|
2046
|
-
|
|
2305
|
+
/* @__PURE__ */ jsx14(
|
|
2306
|
+
Text,
|
|
2307
|
+
{
|
|
2308
|
+
variant: "body",
|
|
2309
|
+
style: [
|
|
2310
|
+
addressText,
|
|
2311
|
+
{ color: theme.content.elements.secondary }
|
|
2312
|
+
],
|
|
2313
|
+
children: address
|
|
2314
|
+
}
|
|
2315
|
+
),
|
|
2316
|
+
onCopyAddress ? /* @__PURE__ */ jsx14(
|
|
2047
2317
|
Pressable4,
|
|
2048
2318
|
{
|
|
2049
2319
|
onPress: handleCopy,
|
|
@@ -2055,14 +2325,25 @@ function QrCodeScreen({
|
|
|
2055
2325
|
flexDirection: "row",
|
|
2056
2326
|
alignItems: "center",
|
|
2057
2327
|
justifyContent: "center",
|
|
2058
|
-
backgroundColor: "btnSecondary",
|
|
2059
|
-
borderColor: "btnSecondary",
|
|
2060
2328
|
borderWidth: 1,
|
|
2061
2329
|
borderRadius: "element",
|
|
2062
|
-
style:
|
|
2330
|
+
style: [
|
|
2331
|
+
copyButton,
|
|
2332
|
+
{
|
|
2333
|
+
backgroundColor: theme.background.button.secondary.default,
|
|
2334
|
+
borderColor: theme.background.button.secondary.default
|
|
2335
|
+
}
|
|
2336
|
+
],
|
|
2063
2337
|
children: [
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
/* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ jsx14(CopyAddressIcon, {}),
|
|
2339
|
+
/* @__PURE__ */ jsx14(
|
|
2340
|
+
Text,
|
|
2341
|
+
{
|
|
2342
|
+
variant: "bodyMedium",
|
|
2343
|
+
style: { color: theme.content.button.secondary.default },
|
|
2344
|
+
children: copied ? copiedLabel : copyLabel
|
|
2345
|
+
}
|
|
2346
|
+
)
|
|
2066
2347
|
]
|
|
2067
2348
|
}
|
|
2068
2349
|
)
|
|
@@ -2072,22 +2353,31 @@ function QrCodeScreen({
|
|
|
2072
2353
|
]
|
|
2073
2354
|
}
|
|
2074
2355
|
),
|
|
2075
|
-
/* @__PURE__ */
|
|
2356
|
+
/* @__PURE__ */ jsx14(Box, { style: buttonContainer2, children: /* @__PURE__ */ jsx14(
|
|
2076
2357
|
Pressable4,
|
|
2077
2358
|
{
|
|
2078
2359
|
onPress: onClose,
|
|
2079
2360
|
accessibilityRole: "button",
|
|
2080
2361
|
accessibilityLabel: doneLabel,
|
|
2081
|
-
children: /* @__PURE__ */
|
|
2362
|
+
children: /* @__PURE__ */ jsx14(
|
|
2082
2363
|
Box,
|
|
2083
2364
|
{
|
|
2084
2365
|
flexDirection: "row",
|
|
2085
2366
|
alignItems: "center",
|
|
2086
2367
|
justifyContent: "center",
|
|
2087
|
-
backgroundColor: "btnPrimary",
|
|
2088
2368
|
borderRadius: "button",
|
|
2089
|
-
style:
|
|
2090
|
-
|
|
2369
|
+
style: [
|
|
2370
|
+
doneButton,
|
|
2371
|
+
{ backgroundColor: theme.background.button.primary.default }
|
|
2372
|
+
],
|
|
2373
|
+
children: /* @__PURE__ */ jsx14(
|
|
2374
|
+
Text,
|
|
2375
|
+
{
|
|
2376
|
+
variant: "bodyMedium",
|
|
2377
|
+
style: { color: theme.content.button.primary.default },
|
|
2378
|
+
children: doneLabel
|
|
2379
|
+
}
|
|
2380
|
+
)
|
|
2091
2381
|
}
|
|
2092
2382
|
)
|
|
2093
2383
|
}
|
|
@@ -2151,7 +2441,7 @@ import Animated3, {
|
|
|
2151
2441
|
FadeOut,
|
|
2152
2442
|
LinearTransition
|
|
2153
2443
|
} from "react-native-reanimated";
|
|
2154
|
-
import { jsx as
|
|
2444
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2155
2445
|
function toIconUri3(icon) {
|
|
2156
2446
|
return icon.startsWith("http") ? icon : chainIconUri(icon);
|
|
2157
2447
|
}
|
|
@@ -2162,19 +2452,24 @@ function NetworkSelector({
|
|
|
2162
2452
|
}) {
|
|
2163
2453
|
const [animate, setAnimate] = useState6(false);
|
|
2164
2454
|
useEffect6(() => setAnimate(true), []);
|
|
2165
|
-
|
|
2455
|
+
const theme = useTheme();
|
|
2456
|
+
return /* @__PURE__ */ jsx15(
|
|
2166
2457
|
Box,
|
|
2167
2458
|
{
|
|
2168
2459
|
flexDirection: "row",
|
|
2169
2460
|
alignItems: "center",
|
|
2170
|
-
backgroundColor: "bgSecondary",
|
|
2171
|
-
borderColor: "borderDefault",
|
|
2172
2461
|
borderWidth: 1,
|
|
2173
2462
|
borderRadius: "rounded",
|
|
2174
|
-
style:
|
|
2463
|
+
style: [
|
|
2464
|
+
track,
|
|
2465
|
+
{
|
|
2466
|
+
backgroundColor: theme.background.secondary,
|
|
2467
|
+
borderColor: theme.border.elements.default.color
|
|
2468
|
+
}
|
|
2469
|
+
],
|
|
2175
2470
|
children: networks.map((network) => {
|
|
2176
2471
|
const selected = network.id === selectedId;
|
|
2177
|
-
return /* @__PURE__ */
|
|
2472
|
+
return /* @__PURE__ */ jsx15(
|
|
2178
2473
|
AnimatedPressable2,
|
|
2179
2474
|
{
|
|
2180
2475
|
onPress: () => onSelect(network.id),
|
|
@@ -2183,7 +2478,7 @@ function NetworkSelector({
|
|
|
2183
2478
|
accessibilityLabel: network.label,
|
|
2184
2479
|
style: selected ? selectedPress : iconPress,
|
|
2185
2480
|
layout: animate ? segmentLayout : void 0,
|
|
2186
|
-
children: selected ? /* @__PURE__ */
|
|
2481
|
+
children: selected ? /* @__PURE__ */ jsx15(
|
|
2187
2482
|
Animated3.View,
|
|
2188
2483
|
{
|
|
2189
2484
|
entering: animate ? FadeIn.duration(SLIDE_MS) : void 0,
|
|
@@ -2195,19 +2490,30 @@ function NetworkSelector({
|
|
|
2195
2490
|
flexDirection: "row",
|
|
2196
2491
|
alignItems: "center",
|
|
2197
2492
|
justifyContent: "center",
|
|
2198
|
-
backgroundColor: "bgModal",
|
|
2199
|
-
borderColor: "borderDefault",
|
|
2200
2493
|
borderWidth: 1,
|
|
2201
2494
|
borderRadius: "rounded",
|
|
2202
|
-
style:
|
|
2495
|
+
style: [
|
|
2496
|
+
selectedPill,
|
|
2497
|
+
{
|
|
2498
|
+
backgroundColor: theme.background.modal,
|
|
2499
|
+
borderColor: theme.border.elements.default.color
|
|
2500
|
+
}
|
|
2501
|
+
],
|
|
2203
2502
|
children: [
|
|
2204
|
-
/* @__PURE__ */
|
|
2205
|
-
/* @__PURE__ */
|
|
2503
|
+
/* @__PURE__ */ jsx15(ChainGlyph, { iconKeys: network.iconKeys }),
|
|
2504
|
+
/* @__PURE__ */ jsx15(
|
|
2505
|
+
Text,
|
|
2506
|
+
{
|
|
2507
|
+
variant: "bodyMedium",
|
|
2508
|
+
style: { color: theme.content.elements.primary },
|
|
2509
|
+
children: network.label
|
|
2510
|
+
}
|
|
2511
|
+
)
|
|
2206
2512
|
]
|
|
2207
2513
|
}
|
|
2208
2514
|
)
|
|
2209
2515
|
}
|
|
2210
|
-
) : /* @__PURE__ */
|
|
2516
|
+
) : /* @__PURE__ */ jsx15(ChainGlyph, { iconKeys: network.iconKeys })
|
|
2211
2517
|
},
|
|
2212
2518
|
network.id
|
|
2213
2519
|
);
|
|
@@ -2223,7 +2529,7 @@ var segmentLayout = LinearTransition.duration(SLIDE_MS).easing(
|
|
|
2223
2529
|
);
|
|
2224
2530
|
function ChainGlyph({ iconKeys }) {
|
|
2225
2531
|
if (iconKeys.length <= 1) {
|
|
2226
|
-
return /* @__PURE__ */
|
|
2532
|
+
return /* @__PURE__ */ jsx15(
|
|
2227
2533
|
FunIcon,
|
|
2228
2534
|
{
|
|
2229
2535
|
uri: toIconUri3(iconKeys[0] ?? ""),
|
|
@@ -2232,7 +2538,7 @@ function ChainGlyph({ iconKeys }) {
|
|
|
2232
2538
|
}
|
|
2233
2539
|
);
|
|
2234
2540
|
}
|
|
2235
|
-
return /* @__PURE__ */
|
|
2541
|
+
return /* @__PURE__ */ jsx15(Box, { width: 24, height: 24, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx15(Box, { flexDirection: "row", flexWrap: "wrap", style: miniGrid, children: iconKeys.slice(0, 4).map((key) => /* @__PURE__ */ jsx15(
|
|
2236
2542
|
FunIcon,
|
|
2237
2543
|
{
|
|
2238
2544
|
uri: toIconUri3(key),
|
|
@@ -2259,7 +2565,7 @@ var iconPress = {
|
|
|
2259
2565
|
var miniGrid = { width: 23.5, gap: 1.5 };
|
|
2260
2566
|
|
|
2261
2567
|
// src/screens/TransferCryptoScreen.tsx
|
|
2262
|
-
import { jsx as
|
|
2568
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2263
2569
|
function TransferCryptoScreen({
|
|
2264
2570
|
depositAddress,
|
|
2265
2571
|
networks,
|
|
@@ -2296,35 +2602,42 @@ function TransferCryptoScreen({
|
|
|
2296
2602
|
return /* @__PURE__ */ jsxs9(
|
|
2297
2603
|
Box,
|
|
2298
2604
|
{
|
|
2299
|
-
backgroundColor: "bgModal",
|
|
2300
2605
|
borderTopLeftRadius: "modal",
|
|
2301
2606
|
borderTopRightRadius: "modal",
|
|
2607
|
+
style: { backgroundColor: theme.background.modal },
|
|
2302
2608
|
children: [
|
|
2303
2609
|
/* @__PURE__ */ jsxs9(Box, { flexDirection: "row", alignItems: "center", style: topBar4, children: [
|
|
2304
|
-
/* @__PURE__ */
|
|
2610
|
+
/* @__PURE__ */ jsx16(
|
|
2305
2611
|
Pressable6,
|
|
2306
2612
|
{
|
|
2307
2613
|
onPress: onBack,
|
|
2308
2614
|
hitSlop: 12,
|
|
2309
2615
|
accessibilityRole: "button",
|
|
2310
2616
|
accessibilityLabel: "Back",
|
|
2311
|
-
children: /* @__PURE__ */
|
|
2617
|
+
children: /* @__PURE__ */ jsx16(Box, { alignItems: "center", justifyContent: "center", style: iconButton, children: /* @__PURE__ */ jsx16(FigmaChevronLeftIcon, {}) })
|
|
2312
2618
|
}
|
|
2313
2619
|
),
|
|
2314
|
-
/* @__PURE__ */
|
|
2315
|
-
|
|
2620
|
+
/* @__PURE__ */ jsx16(Box, { flex: 1, alignItems: "center", children: /* @__PURE__ */ jsx16(
|
|
2621
|
+
Text,
|
|
2622
|
+
{
|
|
2623
|
+
variant: "bodyMedium",
|
|
2624
|
+
style: { color: theme.content.elements.primary },
|
|
2625
|
+
children: title
|
|
2626
|
+
}
|
|
2627
|
+
) }),
|
|
2628
|
+
/* @__PURE__ */ jsx16(
|
|
2316
2629
|
Pressable6,
|
|
2317
2630
|
{
|
|
2318
2631
|
onPress: onShowQrCode,
|
|
2319
2632
|
hitSlop: 12,
|
|
2320
2633
|
accessibilityRole: "button",
|
|
2321
2634
|
accessibilityLabel: "Show QR code",
|
|
2322
|
-
children: /* @__PURE__ */
|
|
2635
|
+
children: /* @__PURE__ */ jsx16(Box, { alignItems: "center", justifyContent: "center", style: iconButton, children: /* @__PURE__ */ jsx16(FigmaQrScanIcon, {}) })
|
|
2323
2636
|
}
|
|
2324
2637
|
)
|
|
2325
2638
|
] }),
|
|
2326
2639
|
/* @__PURE__ */ jsxs9(Box, { style: content2, children: [
|
|
2327
|
-
/* @__PURE__ */
|
|
2640
|
+
/* @__PURE__ */ jsx16(
|
|
2328
2641
|
NetworkSelector,
|
|
2329
2642
|
{
|
|
2330
2643
|
networks,
|
|
@@ -2339,31 +2652,44 @@ function TransferCryptoScreen({
|
|
|
2339
2652
|
justifyContent: "flex-end",
|
|
2340
2653
|
style: addressRegion,
|
|
2341
2654
|
children: [
|
|
2342
|
-
/* @__PURE__ */
|
|
2655
|
+
/* @__PURE__ */ jsx16(
|
|
2343
2656
|
Box,
|
|
2344
2657
|
{
|
|
2345
2658
|
flex: 1,
|
|
2346
2659
|
alignItems: "center",
|
|
2347
2660
|
justifyContent: "center",
|
|
2348
|
-
backgroundColor: "bgModal",
|
|
2349
|
-
borderColor: "borderDefault",
|
|
2350
2661
|
borderWidth: 1,
|
|
2351
2662
|
borderRadius: "element",
|
|
2352
|
-
style:
|
|
2663
|
+
style: [
|
|
2664
|
+
addressCard,
|
|
2665
|
+
{
|
|
2666
|
+
backgroundColor: theme.background.modal,
|
|
2667
|
+
borderColor: theme.border.elements.default.color
|
|
2668
|
+
}
|
|
2669
|
+
],
|
|
2353
2670
|
children: /* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: addressColumn, children: [
|
|
2354
2671
|
/* @__PURE__ */ jsxs9(Box, { alignItems: "center", style: addressGroup2, children: [
|
|
2355
|
-
/* @__PURE__ */
|
|
2356
|
-
|
|
2672
|
+
/* @__PURE__ */ jsx16(
|
|
2673
|
+
Text,
|
|
2674
|
+
{
|
|
2675
|
+
variant: "body",
|
|
2676
|
+
style: { color: theme.content.elements.secondary },
|
|
2677
|
+
children: depositAddressLabel
|
|
2678
|
+
}
|
|
2679
|
+
),
|
|
2680
|
+
/* @__PURE__ */ jsx16(
|
|
2357
2681
|
Text,
|
|
2358
2682
|
{
|
|
2359
2683
|
variant: "bodyMedium",
|
|
2360
|
-
|
|
2361
|
-
|
|
2684
|
+
style: [
|
|
2685
|
+
addressText2,
|
|
2686
|
+
{ color: theme.content.elements.primary }
|
|
2687
|
+
],
|
|
2362
2688
|
children: depositAddress
|
|
2363
2689
|
}
|
|
2364
2690
|
)
|
|
2365
2691
|
] }),
|
|
2366
|
-
showPreview ? /* @__PURE__ */
|
|
2692
|
+
showPreview ? /* @__PURE__ */ jsx16(
|
|
2367
2693
|
Pressable6,
|
|
2368
2694
|
{
|
|
2369
2695
|
onPress: onShowChains,
|
|
@@ -2374,10 +2700,12 @@ function TransferCryptoScreen({
|
|
|
2374
2700
|
{
|
|
2375
2701
|
flexDirection: "row",
|
|
2376
2702
|
alignItems: "center",
|
|
2377
|
-
|
|
2378
|
-
|
|
2703
|
+
style: [
|
|
2704
|
+
previewPill,
|
|
2705
|
+
{ backgroundColor: theme.background.secondary }
|
|
2706
|
+
],
|
|
2379
2707
|
children: [
|
|
2380
|
-
/* @__PURE__ */
|
|
2708
|
+
/* @__PURE__ */ jsx16(
|
|
2381
2709
|
SourceTokenCluster,
|
|
2382
2710
|
{
|
|
2383
2711
|
icons: supportedTokenIcons,
|
|
@@ -2385,18 +2713,18 @@ function TransferCryptoScreen({
|
|
|
2385
2713
|
gap: 4
|
|
2386
2714
|
}
|
|
2387
2715
|
),
|
|
2388
|
-
/* @__PURE__ */
|
|
2716
|
+
/* @__PURE__ */ jsx16(
|
|
2389
2717
|
FigmaChevronRightIcon,
|
|
2390
2718
|
{
|
|
2391
2719
|
size: 16,
|
|
2392
|
-
color: theme.
|
|
2720
|
+
color: theme.content.elements.secondary
|
|
2393
2721
|
}
|
|
2394
2722
|
)
|
|
2395
2723
|
]
|
|
2396
2724
|
}
|
|
2397
2725
|
)
|
|
2398
2726
|
}
|
|
2399
|
-
) : minimumDepositLabel ? /* @__PURE__ */
|
|
2727
|
+
) : minimumDepositLabel ? /* @__PURE__ */ jsx16(
|
|
2400
2728
|
MinimumDepositPill,
|
|
2401
2729
|
{
|
|
2402
2730
|
label: minimumDepositLabel,
|
|
@@ -2407,21 +2735,21 @@ function TransferCryptoScreen({
|
|
|
2407
2735
|
}
|
|
2408
2736
|
),
|
|
2409
2737
|
/* @__PURE__ */ jsxs9(Box, { flexDirection: "row", style: buttonsRow, children: [
|
|
2410
|
-
/* @__PURE__ */
|
|
2738
|
+
/* @__PURE__ */ jsx16(
|
|
2411
2739
|
PillButton,
|
|
2412
2740
|
{
|
|
2413
2741
|
label: copied ? copiedLabel : copyLabel,
|
|
2414
2742
|
accessibilityLabel: copied ? "Address copied" : "Copy address",
|
|
2415
|
-
icon: /* @__PURE__ */
|
|
2743
|
+
icon: /* @__PURE__ */ jsx16(FigmaCopyIcon, { color: theme.content.button.primary.default }),
|
|
2416
2744
|
onPress: handleCopy
|
|
2417
2745
|
}
|
|
2418
2746
|
),
|
|
2419
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ jsx16(
|
|
2420
2748
|
PillButton,
|
|
2421
2749
|
{
|
|
2422
2750
|
label: shareLabel,
|
|
2423
2751
|
accessibilityLabel: "Share address",
|
|
2424
|
-
icon: /* @__PURE__ */
|
|
2752
|
+
icon: /* @__PURE__ */ jsx16(FigmaShareIcon, { color: theme.content.button.primary.default }),
|
|
2425
2753
|
onPress: onShareAddress
|
|
2426
2754
|
}
|
|
2427
2755
|
)
|
|
@@ -2435,11 +2763,12 @@ function TransferCryptoScreen({
|
|
|
2435
2763
|
);
|
|
2436
2764
|
}
|
|
2437
2765
|
function MinimumDepositPill({
|
|
2438
|
-
label
|
|
2766
|
+
label,
|
|
2439
2767
|
iconKey
|
|
2440
2768
|
}) {
|
|
2441
|
-
|
|
2442
|
-
|
|
2769
|
+
const theme = useTheme();
|
|
2770
|
+
return /* @__PURE__ */ jsx16(Box, { alignItems: "center", justifyContent: "flex-start", style: minimumPill, children: /* @__PURE__ */ jsxs9(Box, { flexDirection: "row", alignItems: "center", style: minimumPillRow, children: [
|
|
2771
|
+
iconKey ? /* @__PURE__ */ jsx16(
|
|
2443
2772
|
FunIcon,
|
|
2444
2773
|
{
|
|
2445
2774
|
uri: iconKey.startsWith("http") ? iconKey : chainIconUri(iconKey),
|
|
@@ -2447,16 +2776,24 @@ function MinimumDepositPill({
|
|
|
2447
2776
|
fallbackUri: FALLBACK_ASSET_LOGO
|
|
2448
2777
|
}
|
|
2449
2778
|
) : null,
|
|
2450
|
-
/* @__PURE__ */
|
|
2779
|
+
/* @__PURE__ */ jsx16(
|
|
2780
|
+
Text,
|
|
2781
|
+
{
|
|
2782
|
+
variant: "detail",
|
|
2783
|
+
style: { color: theme.content.elements.secondary },
|
|
2784
|
+
children: label
|
|
2785
|
+
}
|
|
2786
|
+
)
|
|
2451
2787
|
] }) });
|
|
2452
2788
|
}
|
|
2453
2789
|
function PillButton({
|
|
2454
|
-
label
|
|
2790
|
+
label,
|
|
2455
2791
|
accessibilityLabel,
|
|
2456
2792
|
icon,
|
|
2457
2793
|
onPress
|
|
2458
2794
|
}) {
|
|
2459
|
-
|
|
2795
|
+
const theme = useTheme();
|
|
2796
|
+
return /* @__PURE__ */ jsx16(
|
|
2460
2797
|
Pressable6,
|
|
2461
2798
|
{
|
|
2462
2799
|
onPress,
|
|
@@ -2469,12 +2806,21 @@ function PillButton({
|
|
|
2469
2806
|
flexDirection: "row",
|
|
2470
2807
|
alignItems: "center",
|
|
2471
2808
|
justifyContent: "center",
|
|
2472
|
-
backgroundColor: "btnPrimary",
|
|
2473
2809
|
borderRadius: "button",
|
|
2474
|
-
style:
|
|
2810
|
+
style: [
|
|
2811
|
+
pillButton,
|
|
2812
|
+
{ backgroundColor: theme.background.button.primary.default }
|
|
2813
|
+
],
|
|
2475
2814
|
children: [
|
|
2476
2815
|
icon,
|
|
2477
|
-
/* @__PURE__ */
|
|
2816
|
+
/* @__PURE__ */ jsx16(
|
|
2817
|
+
Text,
|
|
2818
|
+
{
|
|
2819
|
+
variant: "bodyMedium",
|
|
2820
|
+
style: { color: theme.content.button.primary.default },
|
|
2821
|
+
children: label
|
|
2822
|
+
}
|
|
2823
|
+
)
|
|
2478
2824
|
]
|
|
2479
2825
|
}
|
|
2480
2826
|
)
|
|
@@ -2527,7 +2873,7 @@ var pillButtonPress = { flex: 1 };
|
|
|
2527
2873
|
var pillButton = { height: 56, paddingHorizontal: 24, gap: 8 };
|
|
2528
2874
|
|
|
2529
2875
|
// src/screens/WithdrawMethodScreen.tsx
|
|
2530
|
-
import { jsx as
|
|
2876
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2531
2877
|
var EMPTY_TITLE = "Withdrawals unavailable";
|
|
2532
2878
|
var EMPTY_MESSAGE = "Cash withdrawals aren't available in your region right now.";
|
|
2533
2879
|
var BELOW_MIN_TITLE = "Balance too low";
|
|
@@ -2553,7 +2899,7 @@ function WithdrawMethodScreen({
|
|
|
2553
2899
|
}) {
|
|
2554
2900
|
const terminalError = getTerminalError(isBelowMinimum, isEmpty);
|
|
2555
2901
|
if (terminalError && !hasError && !loading) {
|
|
2556
|
-
return /* @__PURE__ */
|
|
2902
|
+
return /* @__PURE__ */ jsx17(
|
|
2557
2903
|
SelectMethodScreen,
|
|
2558
2904
|
{
|
|
2559
2905
|
title,
|
|
@@ -2565,7 +2911,7 @@ function WithdrawMethodScreen({
|
|
|
2565
2911
|
}
|
|
2566
2912
|
);
|
|
2567
2913
|
}
|
|
2568
|
-
return /* @__PURE__ */
|
|
2914
|
+
return /* @__PURE__ */ jsx17(
|
|
2569
2915
|
SelectMethodScreen,
|
|
2570
2916
|
{
|
|
2571
2917
|
title,
|
|
@@ -2596,100 +2942,109 @@ import {
|
|
|
2596
2942
|
var px = (value) => `${value}px`;
|
|
2597
2943
|
var toRawHex = (color) => color.replace(/^#/, "");
|
|
2598
2944
|
function buildSwappedThemeQueryParamsRN(theme) {
|
|
2599
|
-
const {
|
|
2945
|
+
const { background, content: content3, border, borderRadii } = theme;
|
|
2600
2946
|
return {
|
|
2601
|
-
iframeBackground: toRawHex(
|
|
2602
|
-
widgetBackground: toRawHex(
|
|
2603
|
-
textColor: toRawHex(
|
|
2604
|
-
spinnerColor: toRawHex(
|
|
2947
|
+
iframeBackground: toRawHex(background.modal),
|
|
2948
|
+
widgetBackground: toRawHex(background.modal),
|
|
2949
|
+
textColor: toRawHex(content3.elements.primary),
|
|
2950
|
+
spinnerColor: toRawHex(content3.elements.primary),
|
|
2605
2951
|
modalRadii: px(borderRadii.modal),
|
|
2606
|
-
skeletonColor: toRawHex(
|
|
2607
|
-
skeletonSecondaryColor: toRawHex(
|
|
2952
|
+
skeletonColor: toRawHex(border.elements.default.color),
|
|
2953
|
+
skeletonSecondaryColor: toRawHex(background.secondary)
|
|
2608
2954
|
};
|
|
2609
2955
|
}
|
|
2610
2956
|
function buildSwappedThemeRN(theme, isDarkMode) {
|
|
2611
|
-
const {
|
|
2957
|
+
const {
|
|
2958
|
+
background,
|
|
2959
|
+
content: content3,
|
|
2960
|
+
border,
|
|
2961
|
+
brand,
|
|
2962
|
+
borderRadii,
|
|
2963
|
+
sizes,
|
|
2964
|
+
spacing,
|
|
2965
|
+
textVariants
|
|
2966
|
+
} = theme;
|
|
2612
2967
|
return {
|
|
2613
2968
|
colors: {
|
|
2614
2969
|
// ── Core text ─────────────────────────────────────────────────────
|
|
2615
|
-
primaryText:
|
|
2616
|
-
secondaryText:
|
|
2617
|
-
tertiaryText:
|
|
2970
|
+
primaryText: content3.elements.primary,
|
|
2971
|
+
secondaryText: content3.elements.secondary,
|
|
2972
|
+
tertiaryText: content3.elements.secondary,
|
|
2618
2973
|
// ── Surfaces ──────────────────────────────────────────────────────
|
|
2619
|
-
modalBackground:
|
|
2620
|
-
offBackground:
|
|
2621
|
-
hoverState:
|
|
2622
|
-
lightStroke:
|
|
2623
|
-
mediumStroke:
|
|
2624
|
-
heavyStroke:
|
|
2625
|
-
modalBorder:
|
|
2626
|
-
modalHeaderDivider:
|
|
2627
|
-
modalFooterDivider:
|
|
2974
|
+
modalBackground: background.modal,
|
|
2975
|
+
offBackground: background.secondary,
|
|
2976
|
+
hoverState: background.secondary,
|
|
2977
|
+
lightStroke: border.elements.default.color,
|
|
2978
|
+
mediumStroke: border.elements.default.color,
|
|
2979
|
+
heavyStroke: border.elements.default.color,
|
|
2980
|
+
modalBorder: border.modal.default,
|
|
2981
|
+
modalHeaderDivider: border.elements.default.color,
|
|
2982
|
+
modalFooterDivider: border.elements.default.color,
|
|
2628
2983
|
// ── Accent / brand ────────────────────────────────────────────────
|
|
2629
|
-
actionColor:
|
|
2630
|
-
accentColor:
|
|
2631
|
-
accentColorForeground:
|
|
2984
|
+
actionColor: brand.primary,
|
|
2985
|
+
accentColor: brand.primary,
|
|
2986
|
+
accentColorForeground: content3.button.primary.default,
|
|
2632
2987
|
// ── Status ────────────────────────────────────────────────────────
|
|
2633
|
-
error:
|
|
2634
|
-
success:
|
|
2988
|
+
error: content3.elements.error,
|
|
2989
|
+
success: content3.elements.success,
|
|
2635
2990
|
// ── Spinner ───────────────────────────────────────────────────────
|
|
2636
|
-
spinnerIndicator:
|
|
2637
|
-
spinnerBackground:
|
|
2638
|
-
// ── Primary button
|
|
2991
|
+
spinnerIndicator: content3.elements.primary,
|
|
2992
|
+
spinnerBackground: border.elements.default.color,
|
|
2993
|
+
// ── Primary button (hover ← pressed, disabled ← default fill) ─────
|
|
2639
2994
|
// web spreads both `buttonBackground*` (ThemeVars) and `buttonPrimary*`
|
|
2640
2995
|
// (widget aliases); the widget reads whichever is present.
|
|
2641
|
-
buttonBackground:
|
|
2642
|
-
buttonBackgroundHover:
|
|
2643
|
-
buttonBackgroundPressed:
|
|
2644
|
-
buttonBackgroundDisabled:
|
|
2645
|
-
buttonPrimary:
|
|
2646
|
-
buttonPrimaryHover:
|
|
2647
|
-
buttonDisabled:
|
|
2648
|
-
buttonTextPrimary:
|
|
2649
|
-
buttonTextHover:
|
|
2650
|
-
buttonTextDisabled:
|
|
2651
|
-
buttonTextSecondary:
|
|
2652
|
-
buttonTextSecondaryDisabled:
|
|
2996
|
+
buttonBackground: background.button.primary.default,
|
|
2997
|
+
buttonBackgroundHover: background.button.primary.pressed,
|
|
2998
|
+
buttonBackgroundPressed: background.button.primary.pressed,
|
|
2999
|
+
buttonBackgroundDisabled: background.button.primary.default,
|
|
3000
|
+
buttonPrimary: background.button.primary.default,
|
|
3001
|
+
buttonPrimaryHover: background.button.primary.pressed,
|
|
3002
|
+
buttonDisabled: background.button.primary.default,
|
|
3003
|
+
buttonTextPrimary: content3.button.primary.default,
|
|
3004
|
+
buttonTextHover: content3.button.primary.default,
|
|
3005
|
+
buttonTextDisabled: content3.button.primary.default,
|
|
3006
|
+
buttonTextSecondary: content3.button.secondary.default,
|
|
3007
|
+
buttonTextSecondaryDisabled: content3.button.secondary.default,
|
|
2653
3008
|
buttonFocusedOutline: "none",
|
|
2654
3009
|
buttonBorderGradient: "none",
|
|
2655
3010
|
buttonHoverBorderGradient: "none",
|
|
2656
3011
|
buttonDisabledBorderGradient: "none",
|
|
2657
|
-
// ── Tertiary button
|
|
2658
|
-
buttonBackgroundTertiary:
|
|
2659
|
-
buttonBackgroundHoverTertiary:
|
|
2660
|
-
buttonBackgroundDisabledTertiary:
|
|
2661
|
-
buttonTextTertiary:
|
|
2662
|
-
buttonTextDisabledTertiary:
|
|
3012
|
+
// ── Tertiary button (hover ← pressed, disabled ← default fill) ────
|
|
3013
|
+
buttonBackgroundTertiary: background.button.tertiary.default,
|
|
3014
|
+
buttonBackgroundHoverTertiary: background.button.tertiary.pressed,
|
|
3015
|
+
buttonBackgroundDisabledTertiary: background.button.tertiary.default,
|
|
3016
|
+
buttonTextTertiary: content3.button.tertiary.default,
|
|
3017
|
+
buttonTextDisabledTertiary: content3.button.tertiary.default,
|
|
2663
3018
|
buttonBorderTertiary: "transparent",
|
|
2664
|
-
buttonBorderFocusedTertiary:
|
|
2665
|
-
// ── Icon button / top bar
|
|
2666
|
-
headerButtonBackground:
|
|
2667
|
-
buttonIconBackgroundHover:
|
|
2668
|
-
buttonIconBackgroundPressed:
|
|
2669
|
-
buttonIconStroke:
|
|
2670
|
-
modalTopbarIcon:
|
|
2671
|
-
modalTopbarIconBackground:
|
|
2672
|
-
modalTopbarIconBackgroundHover:
|
|
2673
|
-
modalTopbarIconBackgroundPressed:
|
|
2674
|
-
// ── Input
|
|
2675
|
-
inputBackground:
|
|
2676
|
-
inputBackgroundHover:
|
|
2677
|
-
inputBorderBase:
|
|
2678
|
-
inputBorderHover:
|
|
2679
|
-
inputLabel:
|
|
2680
|
-
inputBorder:
|
|
2681
|
-
inputBorderFocused:
|
|
2682
|
-
inputBorderActive:
|
|
2683
|
-
inputPlaceholder:
|
|
3019
|
+
buttonBorderFocusedTertiary: border.elements.selected.color,
|
|
3020
|
+
// ── Icon button / top bar (hover ← pressed) ───────────────────────
|
|
3021
|
+
headerButtonBackground: background.button.icon.default,
|
|
3022
|
+
buttonIconBackgroundHover: background.button.icon.pressed,
|
|
3023
|
+
buttonIconBackgroundPressed: background.button.icon.pressed,
|
|
3024
|
+
buttonIconStroke: content3.button.icon.default,
|
|
3025
|
+
modalTopbarIcon: content3.button.icon.default,
|
|
3026
|
+
modalTopbarIconBackground: background.button.icon.default,
|
|
3027
|
+
modalTopbarIconBackgroundHover: background.button.icon.pressed,
|
|
3028
|
+
modalTopbarIconBackgroundPressed: background.button.icon.pressed,
|
|
3029
|
+
// ── Input (hover/focused ← border/elements variables) ─────────────
|
|
3030
|
+
inputBackground: background.modal,
|
|
3031
|
+
inputBackgroundHover: background.secondary,
|
|
3032
|
+
inputBorderBase: border.elements.default.color,
|
|
3033
|
+
inputBorderHover: border.elements.selected.color,
|
|
3034
|
+
inputLabel: content3.elements.primary,
|
|
3035
|
+
inputBorder: border.elements.default.color,
|
|
3036
|
+
inputBorderFocused: content3.elements.secondary,
|
|
3037
|
+
inputBorderActive: content3.elements.secondary,
|
|
3038
|
+
inputPlaceholder: content3.elements.secondary,
|
|
2684
3039
|
// ── Selection ─────────────────────────────────────────────────────
|
|
2685
|
-
selectedOptionBorder:
|
|
2686
|
-
focusedOptionBorder:
|
|
3040
|
+
selectedOptionBorder: border.elements.selected.color,
|
|
3041
|
+
focusedOptionBorder: border.elements.selected.color,
|
|
2687
3042
|
// ── Widget aliases (mirrors web buildSwappedTheme) ────────────────
|
|
2688
|
-
boxBackground:
|
|
2689
|
-
secondaryButtonBg:
|
|
2690
|
-
secondaryButtonText:
|
|
2691
|
-
secondaryButtonHover:
|
|
2692
|
-
secondaryButtonTextHover:
|
|
3043
|
+
boxBackground: background.secondary,
|
|
3044
|
+
secondaryButtonBg: background.button.tertiary.default,
|
|
3045
|
+
secondaryButtonText: content3.button.tertiary.default,
|
|
3046
|
+
secondaryButtonHover: background.button.tertiary.pressed,
|
|
3047
|
+
secondaryButtonTextHover: content3.button.tertiary.default
|
|
2693
3048
|
},
|
|
2694
3049
|
radii: {
|
|
2695
3050
|
modal: px(borderRadii.modal),
|
|
@@ -2704,13 +3059,13 @@ function buildSwappedThemeRN(theme, isDarkMode) {
|
|
|
2704
3059
|
headerHeight: px(sizes.topBar),
|
|
2705
3060
|
headerFontWeight: String(textVariants.headerTitle.fontWeight ?? "500"),
|
|
2706
3061
|
// web: topbarIconColor ← modalTopbarIcon (the icon on the top-bar buttons)
|
|
2707
|
-
topbarIconColor:
|
|
3062
|
+
topbarIconColor: content3.button.icon.default,
|
|
2708
3063
|
topbarTextFontSize: px(textVariants.headerTitle.fontSize ?? 13),
|
|
2709
3064
|
headerIconWrapperSize: px(sizes.buttonXs),
|
|
2710
3065
|
headerIconSize: px(sizes.iconMd),
|
|
2711
3066
|
buttonFontWeight: String(textVariants.bodyMedium.fontWeight ?? "500"),
|
|
2712
3067
|
modalBottomBarButtonHeight: px(sizes.buttonHeight),
|
|
2713
|
-
iframeBackground:
|
|
3068
|
+
iframeBackground: background.modal,
|
|
2714
3069
|
// Same fixed paddings web sends (web: modalBaseHorizontalPadding + 6px).
|
|
2715
3070
|
topbarPaddingX: px(spacing.modalHorizontal + 6),
|
|
2716
3071
|
topbarPaddingY: "12px",
|
|
@@ -2837,7 +3192,7 @@ function createWebViewSwappedTransport({
|
|
|
2837
3192
|
}
|
|
2838
3193
|
|
|
2839
3194
|
// src/swapped/SwappedWebView.tsx
|
|
2840
|
-
import { jsx as
|
|
3195
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2841
3196
|
function SwappedWebView({ url, onMessage, style }) {
|
|
2842
3197
|
const webViewRef = useRef4(null);
|
|
2843
3198
|
const lastCommittedUrlRef = useRef4(url);
|
|
@@ -2886,8 +3241,14 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
2886
3241
|
);
|
|
2887
3242
|
};
|
|
2888
3243
|
const renderLoading = useCallback2(
|
|
2889
|
-
() => /* @__PURE__ */
|
|
2890
|
-
|
|
3244
|
+
() => /* @__PURE__ */ jsx18(
|
|
3245
|
+
View,
|
|
3246
|
+
{
|
|
3247
|
+
style: [loadingOverlay, { backgroundColor: theme.background.modal }],
|
|
3248
|
+
children: /* @__PURE__ */ jsx18(ActivityIndicator, { color: theme.content.elements.secondary })
|
|
3249
|
+
}
|
|
3250
|
+
),
|
|
3251
|
+
[theme.background.modal, theme.content.elements.secondary]
|
|
2891
3252
|
);
|
|
2892
3253
|
const handleError = (event) => {
|
|
2893
3254
|
logger.warn("connect-rn:swapped:webview:error", {
|
|
@@ -2902,7 +3263,7 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
2902
3263
|
url: event.nativeEvent.url
|
|
2903
3264
|
});
|
|
2904
3265
|
};
|
|
2905
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ jsx18(
|
|
2906
3267
|
WebView,
|
|
2907
3268
|
{
|
|
2908
3269
|
ref: webViewRef,
|
|
@@ -2926,7 +3287,7 @@ function SwappedWebView({ url, onMessage, style }) {
|
|
|
2926
3287
|
contentInsetAdjustmentBehavior: "never",
|
|
2927
3288
|
setSupportMultipleWindows: false,
|
|
2928
3289
|
originWhitelist: ["https://*"],
|
|
2929
|
-
style: [{ backgroundColor: theme.
|
|
3290
|
+
style: [{ backgroundColor: theme.background.modal }, style]
|
|
2930
3291
|
}
|
|
2931
3292
|
);
|
|
2932
3293
|
}
|
|
@@ -2941,11 +3302,12 @@ var loadingOverlay = {
|
|
|
2941
3302
|
};
|
|
2942
3303
|
|
|
2943
3304
|
// src/swapped/SwappedScreenShell.tsx
|
|
2944
|
-
import { jsx as
|
|
3305
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2945
3306
|
function SwappedScreenShell({
|
|
2946
3307
|
url,
|
|
2947
3308
|
onMessage
|
|
2948
3309
|
}) {
|
|
3310
|
+
const theme = useTheme();
|
|
2949
3311
|
const handleMessage = useCallback3(
|
|
2950
3312
|
(msg) => {
|
|
2951
3313
|
if (msg.type === "SWAPPED_ERROR") {
|
|
@@ -2957,14 +3319,13 @@ function SwappedScreenShell({
|
|
|
2957
3319
|
},
|
|
2958
3320
|
[onMessage]
|
|
2959
3321
|
);
|
|
2960
|
-
return /* @__PURE__ */
|
|
3322
|
+
return /* @__PURE__ */ jsx19(
|
|
2961
3323
|
Box,
|
|
2962
3324
|
{
|
|
2963
|
-
backgroundColor: "bgModal",
|
|
2964
3325
|
borderTopLeftRadius: "modal",
|
|
2965
3326
|
borderTopRightRadius: "modal",
|
|
2966
|
-
style: sheet3,
|
|
2967
|
-
children: /* @__PURE__ */
|
|
3327
|
+
style: [sheet3, { backgroundColor: theme.background.modal }],
|
|
3328
|
+
children: /* @__PURE__ */ jsx19(SwappedWebView, { url, onMessage: handleMessage, style: fill })
|
|
2968
3329
|
}
|
|
2969
3330
|
);
|
|
2970
3331
|
}
|
|
@@ -2973,7 +3334,7 @@ var sheet3 = { height: SHEET_HEIGHT, overflow: "hidden" };
|
|
|
2973
3334
|
var fill = { flex: 1 };
|
|
2974
3335
|
|
|
2975
3336
|
// src/swapped/SwappedScreen.tsx
|
|
2976
|
-
import { jsx as
|
|
3337
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2977
3338
|
function SwappedScreen({
|
|
2978
3339
|
url,
|
|
2979
3340
|
onClose,
|
|
@@ -3000,7 +3361,7 @@ function SwappedScreen({
|
|
|
3000
3361
|
},
|
|
3001
3362
|
[onBack, onClose, onSuccess]
|
|
3002
3363
|
);
|
|
3003
|
-
return /* @__PURE__ */
|
|
3364
|
+
return /* @__PURE__ */ jsx20(SwappedScreenShell, { url, onMessage: handleMessage });
|
|
3004
3365
|
}
|
|
3005
3366
|
|
|
3006
3367
|
// src/swapped/SwappedWithdrawScreen.tsx
|
|
@@ -3008,7 +3369,7 @@ import {
|
|
|
3008
3369
|
isValidOrderData
|
|
3009
3370
|
} from "@funkit/connect-core";
|
|
3010
3371
|
import { useCallback as useCallback5 } from "react";
|
|
3011
|
-
import { jsx as
|
|
3372
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3012
3373
|
function SwappedWithdrawScreen({
|
|
3013
3374
|
url,
|
|
3014
3375
|
onClose,
|
|
@@ -3052,7 +3413,7 @@ function SwappedWithdrawScreen({
|
|
|
3052
3413
|
},
|
|
3053
3414
|
[onBack, onClose, onNewWithdrawal, onWithdrawalSuccess, onOrderData]
|
|
3054
3415
|
);
|
|
3055
|
-
return /* @__PURE__ */
|
|
3416
|
+
return /* @__PURE__ */ jsx21(SwappedScreenShell, { url, onMessage: handleMessage });
|
|
3056
3417
|
}
|
|
3057
3418
|
|
|
3058
3419
|
// src/transfer/availableChains.ts
|
|
@@ -3199,17 +3560,27 @@ import {
|
|
|
3199
3560
|
FOPS_STALE_TIME,
|
|
3200
3561
|
getDepositAddressForChain,
|
|
3201
3562
|
sortFops,
|
|
3202
|
-
useDynamicConfig as useDynamicConfig3,
|
|
3203
3563
|
useSwappedDefaultCurrencyQuery
|
|
3204
3564
|
} from "@funkit/connect-core";
|
|
3205
3565
|
import { useTheme as useTheme3 } from "@shopify/restyle";
|
|
3206
|
-
import { useQuery as
|
|
3566
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
3207
3567
|
import { useMemo as useMemo6 } from "react";
|
|
3208
3568
|
|
|
3209
3569
|
// src/identity/IdentityContext.tsx
|
|
3210
3570
|
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
3211
|
-
|
|
3571
|
+
|
|
3572
|
+
// src/utils/customers.ts
|
|
3573
|
+
import { MALLARD_API_KEY } from "@funkit/api-base";
|
|
3574
|
+
function isMallardApiKey(apiKey) {
|
|
3575
|
+
return apiKey === MALLARD_API_KEY;
|
|
3576
|
+
}
|
|
3577
|
+
|
|
3578
|
+
// src/identity/IdentityContext.tsx
|
|
3579
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3212
3580
|
function generateSyntheticUserId(apiKey, externalUserId) {
|
|
3581
|
+
if (isMallardApiKey(apiKey)) {
|
|
3582
|
+
return externalUserId;
|
|
3583
|
+
}
|
|
3213
3584
|
return `${apiKey}|${externalUserId}`;
|
|
3214
3585
|
}
|
|
3215
3586
|
function resolveFunkitIdentity(config, walletAddress) {
|
|
@@ -3227,7 +3598,7 @@ function FunkitIdentityProvider({
|
|
|
3227
3598
|
identity,
|
|
3228
3599
|
children
|
|
3229
3600
|
}) {
|
|
3230
|
-
return /* @__PURE__ */
|
|
3601
|
+
return /* @__PURE__ */ jsx22(FunkitIdentityContext.Provider, { value: identity, children });
|
|
3231
3602
|
}
|
|
3232
3603
|
function useFunkitIdentity() {
|
|
3233
3604
|
const identity = useContext2(FunkitIdentityContext);
|
|
@@ -3246,13 +3617,12 @@ import {
|
|
|
3246
3617
|
import {
|
|
3247
3618
|
getCheckoutTokenTransferParams
|
|
3248
3619
|
} from "@funkit/connect-core";
|
|
3249
|
-
import { useQuery
|
|
3620
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3250
3621
|
|
|
3251
3622
|
// src/transfer/hooks/useUDAParams.ts
|
|
3252
|
-
import { useDynamicConfig as useDynamicConfig2 } from "@funkit/connect-core";
|
|
3253
3623
|
import { useMemo as useMemo5 } from "react";
|
|
3254
3624
|
function useUDAParams(dynamicRoutingId) {
|
|
3255
|
-
const udaParams =
|
|
3625
|
+
const udaParams = useDynamicConfig("uda_params");
|
|
3256
3626
|
return useMemo5(
|
|
3257
3627
|
() => udaParams.find((param) => param.dynamicRoutingId === dynamicRoutingId)?.params,
|
|
3258
3628
|
[udaParams, dynamicRoutingId]
|
|
@@ -3277,7 +3647,7 @@ function useTransferInit({
|
|
|
3277
3647
|
recipientAddr: resolvedRecipient,
|
|
3278
3648
|
udaParams
|
|
3279
3649
|
});
|
|
3280
|
-
const { data, isLoading, isFetching } =
|
|
3650
|
+
const { data, isLoading, isFetching } = useQuery({
|
|
3281
3651
|
queryKey: ["initializeCheckoutTokenTransferAddress", params],
|
|
3282
3652
|
queryFn: ({ queryKey: [, queryParams] }) => queryParams ? initializeCheckoutTokenTransferAddress({
|
|
3283
3653
|
...queryParams,
|
|
@@ -3304,8 +3674,8 @@ function useFops({
|
|
|
3304
3674
|
enabled = true
|
|
3305
3675
|
}) {
|
|
3306
3676
|
const { apiKey, userId } = useFunkitIdentity();
|
|
3307
|
-
const isSwappedEnabled = !!
|
|
3308
|
-
const fopPriority =
|
|
3677
|
+
const isSwappedEnabled = !!useDynamicConfig("enableswappeddeposit");
|
|
3678
|
+
const fopPriority = useDynamicConfig("foppriority");
|
|
3309
3679
|
const { userIpInfo } = useUserIpInfo();
|
|
3310
3680
|
const countryCode = userIpInfo?.alpha2 || DEFAULT_COUNTRY_CODE;
|
|
3311
3681
|
const {
|
|
@@ -3334,7 +3704,7 @@ function useFops({
|
|
|
3334
3704
|
const targetChain = checkoutConfig?.targetChain;
|
|
3335
3705
|
const recipientAddress = targetChain ? getDepositAddressForChain(Number(targetChain), transferInit) : void 0;
|
|
3336
3706
|
const isEnabled = enabled && isSwappedEnabled && !!apiKey && !!targetAsset && !!targetChain && !!recipientAddress && !!transferInit && !isSwappedCurrencyCodeLoading;
|
|
3337
|
-
const query =
|
|
3707
|
+
const query = useQuery2({
|
|
3338
3708
|
queryKey: [
|
|
3339
3709
|
"fops",
|
|
3340
3710
|
userId,
|
|
@@ -3416,19 +3786,18 @@ import {
|
|
|
3416
3786
|
getExchangeRate,
|
|
3417
3787
|
resolveSwappedWithdrawalLegs,
|
|
3418
3788
|
sortFops as sortFops2,
|
|
3419
|
-
useDynamicConfig as useDynamicConfig4,
|
|
3420
3789
|
useSwappedDefaultCurrencyQuery as useSwappedDefaultCurrencyQuery2
|
|
3421
3790
|
} from "@funkit/connect-core";
|
|
3422
3791
|
import { useTheme as useTheme4 } from "@shopify/restyle";
|
|
3423
3792
|
import { useStatsigClient } from "@statsig/react-bindings";
|
|
3424
|
-
import { useQuery as
|
|
3793
|
+
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
3425
3794
|
import { useMemo as useMemo7 } from "react";
|
|
3426
3795
|
|
|
3427
3796
|
// src/transfer/hooks/useFiatExchangeRates.ts
|
|
3428
3797
|
import { getFiatExchangeRates } from "@funkit/api-base";
|
|
3429
|
-
import { useQuery as
|
|
3798
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
3430
3799
|
function useFiatExchangeRates(enabled = true) {
|
|
3431
|
-
const { data, isLoading, error } =
|
|
3800
|
+
const { data, isLoading, error } = useQuery3({
|
|
3432
3801
|
queryKey: ["fiatExchangeRates"],
|
|
3433
3802
|
queryFn: () => getFiatExchangeRates({ logger }),
|
|
3434
3803
|
refetchOnMount: false,
|
|
@@ -3444,7 +3813,7 @@ function useFiatExchangeRates(enabled = true) {
|
|
|
3444
3813
|
// src/transfer/hooks/useWithdrawalFops.ts
|
|
3445
3814
|
var WITHDRAW_FOPS_QUERY_KEY = "withdrawFops";
|
|
3446
3815
|
function useWithdrawalRoute(config) {
|
|
3447
|
-
const sourceOverrides =
|
|
3816
|
+
const sourceOverrides = useDynamicConfig("swappedwithdrawalsourceoverrides");
|
|
3448
3817
|
return useMemo7(
|
|
3449
3818
|
() => resolveSwappedWithdrawalLegs({
|
|
3450
3819
|
source: config.sourceToken,
|
|
@@ -3461,7 +3830,7 @@ function useWithdrawalSellCap(config, walletAddress) {
|
|
|
3461
3830
|
const { sourceUsdBalance } = config;
|
|
3462
3831
|
const isBalanceCallback = typeof sourceUsdBalance === "function";
|
|
3463
3832
|
const hasBalanceInfo = sourceUsdBalance != null;
|
|
3464
|
-
const balanceQuery =
|
|
3833
|
+
const balanceQuery = useQuery4({
|
|
3465
3834
|
queryKey: [
|
|
3466
3835
|
"withdrawSourceUsdBalance",
|
|
3467
3836
|
walletAddress,
|
|
@@ -3561,8 +3930,8 @@ function useWithdrawalFops({
|
|
|
3561
3930
|
}) {
|
|
3562
3931
|
const { apiKey, userId } = useFunkitIdentity();
|
|
3563
3932
|
const { isLoading: isStatsigLoading } = useStatsigClient();
|
|
3564
|
-
const isWithdrawalEnabled = !!
|
|
3565
|
-
const fopPriority =
|
|
3933
|
+
const isWithdrawalEnabled = !!useDynamicConfig("enableswappedwithdrawal");
|
|
3934
|
+
const fopPriority = useDynamicConfig("foppriority");
|
|
3566
3935
|
const walletAddress = config.withdrawalWallet.address();
|
|
3567
3936
|
const route = useWithdrawalRoute(config);
|
|
3568
3937
|
const { userIpInfo, isLoadingGeoCheck } = useUserIpInfo();
|
|
@@ -3582,7 +3951,7 @@ function useWithdrawalFops({
|
|
|
3582
3951
|
);
|
|
3583
3952
|
const { usdBalance, eurMax, isBelowMinimumBalance, isAwaitingCap } = useWithdrawalSellCap(config, walletAddress);
|
|
3584
3953
|
const isEnabled = enabled && isWithdrawalEnabled && !!apiKey && !!userId && !!walletAddress && walletAddress !== "0x" && !!countryCode && !isSwappedCurrencyCodeLoading && !isAwaitingCap;
|
|
3585
|
-
const query =
|
|
3954
|
+
const query = useQuery4({
|
|
3586
3955
|
queryKey: [
|
|
3587
3956
|
WITHDRAW_FOPS_QUERY_KEY,
|
|
3588
3957
|
userId,
|
|
@@ -3750,10 +4119,9 @@ function useWithdrawalExecution({
|
|
|
3750
4119
|
import { getSupportedAssets } from "@funkit/api-base";
|
|
3751
4120
|
import {
|
|
3752
4121
|
isTransferChainEnabled,
|
|
3753
|
-
resolveTokenTransferConfig
|
|
3754
|
-
useDynamicConfig as useDynamicConfig5
|
|
4122
|
+
resolveTokenTransferConfig
|
|
3755
4123
|
} from "@funkit/connect-core";
|
|
3756
|
-
import { useQuery as
|
|
4124
|
+
import { useQuery as useQuery5 } from "@tanstack/react-query";
|
|
3757
4125
|
import { useMemo as useMemo8 } from "react";
|
|
3758
4126
|
|
|
3759
4127
|
// src/transfer/supportedTokens.ts
|
|
@@ -3790,11 +4158,11 @@ function useSupportedTokens({
|
|
|
3790
4158
|
transferInit
|
|
3791
4159
|
} = {}) {
|
|
3792
4160
|
const { apiKey } = useFunkitIdentity();
|
|
3793
|
-
const tokenTransferConfig =
|
|
3794
|
-
const disabledChainAssets =
|
|
4161
|
+
const tokenTransferConfig = useDynamicConfig("tokentransferconfig");
|
|
4162
|
+
const disabledChainAssets = useDynamicConfig(
|
|
3795
4163
|
"disabletokentransferchainsandassets"
|
|
3796
4164
|
);
|
|
3797
|
-
const { data, isLoading } =
|
|
4165
|
+
const { data, isLoading } = useQuery5({
|
|
3798
4166
|
queryKey: ["getSupportedAssets", apiKey],
|
|
3799
4167
|
queryFn: ({ queryKey: [, key] }) => getSupportedAssets({ apiKey: key, logger }),
|
|
3800
4168
|
enabled: enabled && !!apiKey,
|
|
@@ -3829,8 +4197,7 @@ import { bitcoinChain as bitcoinChain2, solanaChain as solanaChain3, tronChain a
|
|
|
3829
4197
|
import {
|
|
3830
4198
|
getDepositAddressForChain as getDepositAddressForChain2,
|
|
3831
4199
|
getMinTransferValueForChain as getMinTransferValueForChain2,
|
|
3832
|
-
getTransferTokenQrCodeUri
|
|
3833
|
-
useDynamicConfig as useDynamicConfig6
|
|
4200
|
+
getTransferTokenQrCodeUri
|
|
3834
4201
|
} from "@funkit/connect-core";
|
|
3835
4202
|
var DEFAULT_MAX_SLIPPAGE_PERCENT = 0.25;
|
|
3836
4203
|
function resolveBlockchain(chainId) {
|
|
@@ -3856,7 +4223,7 @@ function useTokenTransfer({
|
|
|
3856
4223
|
dynamicRoutingId,
|
|
3857
4224
|
enabled
|
|
3858
4225
|
});
|
|
3859
|
-
const minTransferLimits =
|
|
4226
|
+
const minTransferLimits = useDynamicConfig("mintokentransfervalue");
|
|
3860
4227
|
const minTransferUsd = selectedChainId !== void 0 ? Math.ceil(
|
|
3861
4228
|
getMinTransferValueForChain2(selectedChainId, minTransferLimits)
|
|
3862
4229
|
) : 0;
|
|
@@ -3877,9 +4244,9 @@ function useTokenTransfer({
|
|
|
3877
4244
|
|
|
3878
4245
|
// src/transfer/QrCode.tsx
|
|
3879
4246
|
import QRCode from "react-native-qrcode-svg";
|
|
3880
|
-
import { jsx as
|
|
4247
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3881
4248
|
function QrCode({ value, size = 220, ecl = "H" }) {
|
|
3882
|
-
return /* @__PURE__ */
|
|
4249
|
+
return /* @__PURE__ */ jsx23(
|
|
3883
4250
|
QRCode,
|
|
3884
4251
|
{
|
|
3885
4252
|
value,
|
|
@@ -3941,7 +4308,7 @@ function useKeyboardHeight(enabled) {
|
|
|
3941
4308
|
}
|
|
3942
4309
|
|
|
3943
4310
|
// src/flow/FlowSheet.tsx
|
|
3944
|
-
import { jsx as
|
|
4311
|
+
import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3945
4312
|
function FlowSheet({
|
|
3946
4313
|
isOpen,
|
|
3947
4314
|
session,
|
|
@@ -3981,7 +4348,7 @@ function FlowSheet({
|
|
|
3981
4348
|
easing: Easing4.bezier(0.22, 1, 0.36, 1)
|
|
3982
4349
|
});
|
|
3983
4350
|
const renderBackdrop = useCallback7(
|
|
3984
|
-
(props) => /* @__PURE__ */
|
|
4351
|
+
(props) => /* @__PURE__ */ jsx24(
|
|
3985
4352
|
BottomSheetBackdrop,
|
|
3986
4353
|
{
|
|
3987
4354
|
...props,
|
|
@@ -3994,7 +4361,7 @@ function FlowSheet({
|
|
|
3994
4361
|
);
|
|
3995
4362
|
return /* @__PURE__ */ jsxs10(BottomSheetModalProvider, { children: [
|
|
3996
4363
|
children,
|
|
3997
|
-
/* @__PURE__ */
|
|
4364
|
+
/* @__PURE__ */ jsx24(
|
|
3998
4365
|
BottomSheetModal,
|
|
3999
4366
|
{
|
|
4000
4367
|
ref: setRef,
|
|
@@ -4008,7 +4375,7 @@ function FlowSheet({
|
|
|
4008
4375
|
backgroundComponent: FlowSheetBackground,
|
|
4009
4376
|
children: /* @__PURE__ */ jsxs10(BottomSheetView, { children: [
|
|
4010
4377
|
content3,
|
|
4011
|
-
keyboardHeight > 0 ? /* @__PURE__ */
|
|
4378
|
+
keyboardHeight > 0 ? /* @__PURE__ */ jsx24(View2, { style: { height: keyboardHeight } }) : null
|
|
4012
4379
|
] })
|
|
4013
4380
|
}
|
|
4014
4381
|
)
|
|
@@ -4020,15 +4387,15 @@ function FlowSheetBackground({
|
|
|
4020
4387
|
}) {
|
|
4021
4388
|
const theme = useTheme();
|
|
4022
4389
|
const surface = {
|
|
4023
|
-
backgroundColor: theme.
|
|
4390
|
+
backgroundColor: theme.background.modal,
|
|
4024
4391
|
borderTopLeftRadius: theme.borderRadii.modal,
|
|
4025
4392
|
borderTopRightRadius: theme.borderRadii.modal
|
|
4026
4393
|
};
|
|
4027
4394
|
const extension = {
|
|
4028
4395
|
...bottomExtension,
|
|
4029
|
-
backgroundColor: theme.
|
|
4396
|
+
backgroundColor: theme.background.modal
|
|
4030
4397
|
};
|
|
4031
|
-
return /* @__PURE__ */
|
|
4398
|
+
return /* @__PURE__ */ jsx24(View2, { pointerEvents, style: [style, surface], children: /* @__PURE__ */ jsx24(View2, { style: extension }) });
|
|
4032
4399
|
}
|
|
4033
4400
|
var bottomExtension = {
|
|
4034
4401
|
position: "absolute",
|
|
@@ -4039,7 +4406,7 @@ var bottomExtension = {
|
|
|
4039
4406
|
};
|
|
4040
4407
|
|
|
4041
4408
|
// src/flow/FunkitFlowProvider.tsx
|
|
4042
|
-
import { Fragment as Fragment2, jsx as
|
|
4409
|
+
import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4043
4410
|
var CLOSED = {
|
|
4044
4411
|
isOpen: false,
|
|
4045
4412
|
stack: [],
|
|
@@ -4138,8 +4505,8 @@ function FunkitFlowProvider({
|
|
|
4138
4505
|
}, TOAST_VISIBLE_MS);
|
|
4139
4506
|
}, []);
|
|
4140
4507
|
useEffect11(() => () => clearToast(), [clearToast]);
|
|
4141
|
-
return /* @__PURE__ */
|
|
4142
|
-
/* @__PURE__ */
|
|
4508
|
+
return /* @__PURE__ */ jsx25(FunkitFlowContext.Provider, { value, children: /* @__PURE__ */ jsxs11(View3, { style: rootContainer, children: [
|
|
4509
|
+
/* @__PURE__ */ jsx25(
|
|
4143
4510
|
FlowSheet,
|
|
4144
4511
|
{
|
|
4145
4512
|
isOpen: state.isOpen,
|
|
@@ -4148,7 +4515,7 @@ function FunkitFlowProvider({
|
|
|
4148
4515
|
keyboardAvoidEnabled: current === "swapped",
|
|
4149
4516
|
content: (
|
|
4150
4517
|
// Mounted only while open so the flow queries run only then.
|
|
4151
|
-
state.isOpen && state.flow ? state.flow.mode === "deposit" ? /* @__PURE__ */
|
|
4518
|
+
state.isOpen && state.flow ? state.flow.mode === "deposit" ? /* @__PURE__ */ jsx25(
|
|
4152
4519
|
FlowContent,
|
|
4153
4520
|
{
|
|
4154
4521
|
config: state.flow.config,
|
|
@@ -4158,7 +4525,7 @@ function FunkitFlowProvider({
|
|
|
4158
4525
|
onCopySuccess: showCopiedToast,
|
|
4159
4526
|
callbacks: state.flow.callbacks
|
|
4160
4527
|
}
|
|
4161
|
-
) : /* @__PURE__ */
|
|
4528
|
+
) : /* @__PURE__ */ jsx25(
|
|
4162
4529
|
WithdrawalFlowContent,
|
|
4163
4530
|
{
|
|
4164
4531
|
config: state.flow.config,
|
|
@@ -4171,7 +4538,7 @@ function FunkitFlowProvider({
|
|
|
4171
4538
|
children
|
|
4172
4539
|
}
|
|
4173
4540
|
),
|
|
4174
|
-
toastMounted ? /* @__PURE__ */
|
|
4541
|
+
toastMounted ? /* @__PURE__ */ jsx25(
|
|
4175
4542
|
View3,
|
|
4176
4543
|
{
|
|
4177
4544
|
style: [
|
|
@@ -4179,7 +4546,7 @@ function FunkitFlowProvider({
|
|
|
4179
4546
|
{ paddingTop: insets.top + TOAST_INSET_OFFSET }
|
|
4180
4547
|
],
|
|
4181
4548
|
pointerEvents: "none",
|
|
4182
|
-
children: copiedToastShown ? /* @__PURE__ */
|
|
4549
|
+
children: copiedToastShown ? /* @__PURE__ */ jsx25(AddressCopiedToast, {}) : null
|
|
4183
4550
|
}
|
|
4184
4551
|
) : null
|
|
4185
4552
|
] }) });
|
|
@@ -4245,7 +4612,7 @@ function FlowContent({
|
|
|
4245
4612
|
(n) => n.chainId != null && belongsToNetwork(initialChainId, n.chainId)
|
|
4246
4613
|
);
|
|
4247
4614
|
const selectedChain = depositNetworks.find((n) => n.id === selectedNetworkId) ?? initialNetwork ?? depositNetworks[0];
|
|
4248
|
-
const minTransferLimits =
|
|
4615
|
+
const minTransferLimits = useDynamicConfig("mintokentransfervalue");
|
|
4249
4616
|
const {
|
|
4250
4617
|
savedFops,
|
|
4251
4618
|
genericFops,
|
|
@@ -4257,6 +4624,7 @@ function FlowContent({
|
|
|
4257
4624
|
checkoutConfig: activeCheckoutConfig,
|
|
4258
4625
|
dynamicRoutingId: activeDynamicRoutingId
|
|
4259
4626
|
});
|
|
4627
|
+
const { isLoading: isStatsigLoading } = useStatsigClient2();
|
|
4260
4628
|
const [selectedSwappedUrl, setSelectedSwappedUrl] = useState9();
|
|
4261
4629
|
const availableChains = buildAvailableChains({
|
|
4262
4630
|
chainFilters: tokenChainFilters,
|
|
@@ -4294,7 +4662,7 @@ function FlowContent({
|
|
|
4294
4662
|
nestedSheetRef.current?.dismiss();
|
|
4295
4663
|
}, []);
|
|
4296
4664
|
const renderNestedBackdrop = useCallback8(
|
|
4297
|
-
(props) => /* @__PURE__ */
|
|
4665
|
+
(props) => /* @__PURE__ */ jsx25(
|
|
4298
4666
|
BottomSheetBackdrop2,
|
|
4299
4667
|
{
|
|
4300
4668
|
...props,
|
|
@@ -4316,8 +4684,8 @@ function FlowContent({
|
|
|
4316
4684
|
id: CRYPTO_METHOD_ID,
|
|
4317
4685
|
title: "Crypto",
|
|
4318
4686
|
subtitle: "No limit",
|
|
4319
|
-
icon: /* @__PURE__ */
|
|
4320
|
-
trailing: cryptoSourceIcons.length ? /* @__PURE__ */
|
|
4687
|
+
icon: /* @__PURE__ */ jsx25(CryptoBitcoinIcon, {}),
|
|
4688
|
+
trailing: cryptoSourceIcons.length ? /* @__PURE__ */ jsx25(
|
|
4321
4689
|
SourceTokenCluster,
|
|
4322
4690
|
{
|
|
4323
4691
|
icons: cryptoSourceIcons,
|
|
@@ -4330,7 +4698,7 @@ function FlowContent({
|
|
|
4330
4698
|
id: row3.id,
|
|
4331
4699
|
title: row3.name,
|
|
4332
4700
|
subtitle: row3.subtitle,
|
|
4333
|
-
icon: /* @__PURE__ */
|
|
4701
|
+
icon: /* @__PURE__ */ jsx25(FunIcon, { uri: row3.iconUri, fallbackUri: FALLBACK_ASSET_LOGO })
|
|
4334
4702
|
}));
|
|
4335
4703
|
const methods = isSwappedEnabled ? [
|
|
4336
4704
|
...toCashRows(savedFops),
|
|
@@ -4342,11 +4710,11 @@ function FlowContent({
|
|
|
4342
4710
|
(c, i) => ({
|
|
4343
4711
|
id: String(i),
|
|
4344
4712
|
label: c.badgeText ? `${c.tokenSymbol} (${c.badgeText})` : c.tokenSymbol,
|
|
4345
|
-
icon: /* @__PURE__ */
|
|
4713
|
+
icon: /* @__PURE__ */ jsx25(TokenChainIcon, { symbol: c.tokenSymbol, iconSrc: c.iconSrc })
|
|
4346
4714
|
})
|
|
4347
4715
|
);
|
|
4348
4716
|
const selectedReceiveTokenId = selectedCandidate && candidates ? String(candidates.indexOf(selectedCandidate)) : void 0;
|
|
4349
|
-
return /* @__PURE__ */
|
|
4717
|
+
return /* @__PURE__ */ jsx25(
|
|
4350
4718
|
SelectMethodScreen,
|
|
4351
4719
|
{
|
|
4352
4720
|
methods,
|
|
@@ -4358,7 +4726,7 @@ function FlowContent({
|
|
|
4358
4726
|
setSelectedCandidate(picked);
|
|
4359
4727
|
}
|
|
4360
4728
|
},
|
|
4361
|
-
loading: isLoadingGeoCheck || isAddressLoading || isSwappedEnabled && isFopsLoading,
|
|
4729
|
+
loading: isLoadingGeoCheck || isAddressLoading || isStatsigLoading || isSwappedEnabled && isFopsLoading,
|
|
4362
4730
|
error: isSwappedEnabled && isFopsError,
|
|
4363
4731
|
onRetry: refetchFops,
|
|
4364
4732
|
onSelectMethod: (id) => {
|
|
@@ -4386,7 +4754,7 @@ function FlowContent({
|
|
|
4386
4754
|
label: chain.label,
|
|
4387
4755
|
iconKeys: chain.iconKeys ?? []
|
|
4388
4756
|
}));
|
|
4389
|
-
return /* @__PURE__ */
|
|
4757
|
+
return /* @__PURE__ */ jsx25(
|
|
4390
4758
|
TransferCryptoScreen,
|
|
4391
4759
|
{
|
|
4392
4760
|
depositAddress: displayAddress,
|
|
@@ -4404,7 +4772,7 @@ function FlowContent({
|
|
|
4404
4772
|
);
|
|
4405
4773
|
}
|
|
4406
4774
|
case "swapped":
|
|
4407
|
-
return selectedSwappedUrl ? /* @__PURE__ */
|
|
4775
|
+
return selectedSwappedUrl ? /* @__PURE__ */ jsx25(
|
|
4408
4776
|
SwappedScreen,
|
|
4409
4777
|
{
|
|
4410
4778
|
url: selectedSwappedUrl,
|
|
@@ -4419,7 +4787,7 @@ function FlowContent({
|
|
|
4419
4787
|
const bottomSheetScreen = (() => {
|
|
4420
4788
|
switch (nestedScreen) {
|
|
4421
4789
|
case "availableChains":
|
|
4422
|
-
return /* @__PURE__ */
|
|
4790
|
+
return /* @__PURE__ */ jsx25(
|
|
4423
4791
|
AvailableChainsScreen,
|
|
4424
4792
|
{
|
|
4425
4793
|
networkLabel: selectedChain?.label ?? "",
|
|
@@ -4428,11 +4796,11 @@ function FlowContent({
|
|
|
4428
4796
|
}
|
|
4429
4797
|
);
|
|
4430
4798
|
case "qrCode":
|
|
4431
|
-
return /* @__PURE__ */
|
|
4799
|
+
return /* @__PURE__ */ jsx25(
|
|
4432
4800
|
QrCodeScreen,
|
|
4433
4801
|
{
|
|
4434
|
-
qrCode: config.qrCode ?? (qrCodeUri ? /* @__PURE__ */
|
|
4435
|
-
centerIcon: /* @__PURE__ */
|
|
4802
|
+
qrCode: config.qrCode ?? (qrCodeUri ? /* @__PURE__ */ jsx25(QrCode, { value: qrCodeUri, size: 235 }) : null),
|
|
4803
|
+
centerIcon: /* @__PURE__ */ jsx25(QrChainCluster, { iconKeys: selectedChain?.iconKeys ?? [] }),
|
|
4436
4804
|
address: rawAddress,
|
|
4437
4805
|
onCopyAddress: rawAddress ? () => copyAddressAndToast(rawAddress) : void 0,
|
|
4438
4806
|
onClose: closeNestedScreen
|
|
@@ -4443,11 +4811,11 @@ function FlowContent({
|
|
|
4443
4811
|
}
|
|
4444
4812
|
})();
|
|
4445
4813
|
if (isGeoblocked) {
|
|
4446
|
-
return /* @__PURE__ */
|
|
4814
|
+
return /* @__PURE__ */ jsx25(CheckoutBlockedScreen, {});
|
|
4447
4815
|
}
|
|
4448
4816
|
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
4449
4817
|
screen,
|
|
4450
|
-
/* @__PURE__ */
|
|
4818
|
+
/* @__PURE__ */ jsx25(
|
|
4451
4819
|
BottomSheetModal2,
|
|
4452
4820
|
{
|
|
4453
4821
|
ref: nestedSheetRef,
|
|
@@ -4456,7 +4824,7 @@ function FlowContent({
|
|
|
4456
4824
|
backgroundComponent: FlowSheetBackground,
|
|
4457
4825
|
backdropComponent: renderNestedBackdrop,
|
|
4458
4826
|
onDismiss: () => setNestedScreen(null),
|
|
4459
|
-
children: /* @__PURE__ */
|
|
4827
|
+
children: /* @__PURE__ */ jsx25(BottomSheetView2, { children: bottomSheetScreen })
|
|
4460
4828
|
}
|
|
4461
4829
|
)
|
|
4462
4830
|
] });
|
|
@@ -4493,10 +4861,10 @@ function WithdrawalFlowContent({
|
|
|
4493
4861
|
void queryClient.invalidateQueries({ queryKey: [WITHDRAW_FOPS_QUERY_KEY] });
|
|
4494
4862
|
}, [queryClient]);
|
|
4495
4863
|
if (isGeoblocked) {
|
|
4496
|
-
return /* @__PURE__ */
|
|
4864
|
+
return /* @__PURE__ */ jsx25(CheckoutBlockedScreen, {});
|
|
4497
4865
|
}
|
|
4498
4866
|
if (hasExecutionError) {
|
|
4499
|
-
return /* @__PURE__ */
|
|
4867
|
+
return /* @__PURE__ */ jsx25(
|
|
4500
4868
|
WithdrawMethodScreen,
|
|
4501
4869
|
{
|
|
4502
4870
|
title: config.title,
|
|
@@ -4518,10 +4886,10 @@ function WithdrawalFlowContent({
|
|
|
4518
4886
|
id: String(i),
|
|
4519
4887
|
title: row3.name,
|
|
4520
4888
|
subtitle: row3.subtitle,
|
|
4521
|
-
icon: /* @__PURE__ */
|
|
4889
|
+
icon: /* @__PURE__ */ jsx25(FunIcon, { uri: row3.iconUri, fallbackUri: FALLBACK_ASSET_LOGO })
|
|
4522
4890
|
})
|
|
4523
4891
|
);
|
|
4524
|
-
return /* @__PURE__ */
|
|
4892
|
+
return /* @__PURE__ */ jsx25(
|
|
4525
4893
|
WithdrawMethodScreen,
|
|
4526
4894
|
{
|
|
4527
4895
|
title: config.title,
|
|
@@ -4545,7 +4913,7 @@ function WithdrawalFlowContent({
|
|
|
4545
4913
|
);
|
|
4546
4914
|
}
|
|
4547
4915
|
case "swapped":
|
|
4548
|
-
return selectedFop?.embeddedFlowUrl ? /* @__PURE__ */
|
|
4916
|
+
return selectedFop?.embeddedFlowUrl ? /* @__PURE__ */ jsx25(
|
|
4549
4917
|
SwappedWithdrawScreen,
|
|
4550
4918
|
{
|
|
4551
4919
|
url: selectedFop.embeddedFlowUrl,
|
|
@@ -4587,7 +4955,7 @@ var TOAST_EXIT_MS = 350;
|
|
|
4587
4955
|
var TOAST_INSET_OFFSET = 20;
|
|
4588
4956
|
var rootContainer = { flex: 1 };
|
|
4589
4957
|
var toastOverlay = {
|
|
4590
|
-
...
|
|
4958
|
+
...StyleSheet4.absoluteFill,
|
|
4591
4959
|
zIndex: 1,
|
|
4592
4960
|
alignItems: "center"
|
|
4593
4961
|
};
|
|
@@ -4600,7 +4968,7 @@ function useFunkitFlow() {
|
|
|
4600
4968
|
}
|
|
4601
4969
|
|
|
4602
4970
|
// src/version.ts
|
|
4603
|
-
var CONNECT_RN_VERSION = true ? "
|
|
4971
|
+
var CONNECT_RN_VERSION = true ? "3.0.0" : "0.0.0-dev";
|
|
4604
4972
|
|
|
4605
4973
|
// src/providers/FunkitStatsigProvider.tsx
|
|
4606
4974
|
import {
|
|
@@ -4793,7 +5161,7 @@ function useClientAsyncInitRN(sdkKey, initialUser, statsigOptions = null) {
|
|
|
4793
5161
|
}
|
|
4794
5162
|
|
|
4795
5163
|
// src/providers/FunkitStatsigProvider.tsx
|
|
4796
|
-
import { jsx as
|
|
5164
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
4797
5165
|
var STATSIG_API = "https://data-api.fun.xyz/v1";
|
|
4798
5166
|
var STATSIG_CLIENT_KEY = "client-UmFd8WIJljA7cLmZuDqs3X25M8sKd5WIQP4BSC2bRbM";
|
|
4799
5167
|
var STATSIG_SDK_TYPE = "react-native";
|
|
@@ -4829,12 +5197,13 @@ function FunkitStatsigProvider({
|
|
|
4829
5197
|
tier: isDevelopment ? "development" : "production"
|
|
4830
5198
|
}
|
|
4831
5199
|
});
|
|
4832
|
-
return /* @__PURE__ */
|
|
5200
|
+
return /* @__PURE__ */ jsx26(StatsigProvider, { client, children });
|
|
4833
5201
|
}
|
|
4834
5202
|
|
|
4835
5203
|
// src/providers/FunkitProvider.tsx
|
|
4836
|
-
import { jsx as
|
|
5204
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4837
5205
|
var ANONYMOUS_CONFIG = { apiKey: "" };
|
|
5206
|
+
var IS_DEV_BUILD = typeof __DEV__ !== "undefined" && !!__DEV__;
|
|
4838
5207
|
function createFallbackQueryClient() {
|
|
4839
5208
|
return new QueryClient({
|
|
4840
5209
|
defaultOptions: {
|
|
@@ -4851,7 +5220,7 @@ function FunkitProvider({
|
|
|
4851
5220
|
queryClient,
|
|
4852
5221
|
themes,
|
|
4853
5222
|
colorScheme,
|
|
4854
|
-
debug =
|
|
5223
|
+
debug = IS_DEV_BUILD,
|
|
4855
5224
|
copyToClipboard: copyToClipboard2
|
|
4856
5225
|
}) {
|
|
4857
5226
|
const fallbackClient = useRef8(void 0);
|
|
@@ -4876,13 +5245,13 @@ function FunkitProvider({
|
|
|
4876
5245
|
""
|
|
4877
5246
|
);
|
|
4878
5247
|
}, [identity]);
|
|
4879
|
-
return /* @__PURE__ */
|
|
5248
|
+
return /* @__PURE__ */ jsx27(SafeAreaProvider, { children: /* @__PURE__ */ jsx27(
|
|
4880
5249
|
FunkitStatsigProvider,
|
|
4881
5250
|
{
|
|
4882
5251
|
apiKey: identity.apiKey,
|
|
4883
5252
|
userId: identity.userId,
|
|
4884
5253
|
isDevelopment: debug,
|
|
4885
|
-
children: /* @__PURE__ */
|
|
5254
|
+
children: /* @__PURE__ */ jsx27(QueryClientProvider, { client, children: /* @__PURE__ */ jsx27(FunkitIdentityProvider, { identity, children: /* @__PURE__ */ jsx27(FunkitThemeProvider, { themes, colorScheme, children: /* @__PURE__ */ jsx27(FunkitFlowProvider, { copyToClipboard: copyToClipboard2, children }) }) }) })
|
|
4886
5255
|
}
|
|
4887
5256
|
) });
|
|
4888
5257
|
}
|
|
@@ -4907,10 +5276,12 @@ export {
|
|
|
4907
5276
|
FunkitProvider,
|
|
4908
5277
|
FunkitThemeProvider,
|
|
4909
5278
|
Text,
|
|
5279
|
+
darkTheme,
|
|
4910
5280
|
darkTokens,
|
|
4911
5281
|
defaultDarkTheme,
|
|
4912
5282
|
defaultLightTheme,
|
|
4913
5283
|
fontFamilyForWeight,
|
|
5284
|
+
lightTheme,
|
|
4914
5285
|
lightTokens,
|
|
4915
5286
|
normalizeColorScheme,
|
|
4916
5287
|
resolveColorScheme,
|