@swype-org/react-sdk 0.1.190 → 0.1.202
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/dist/index.cjs +218 -211
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +218 -211
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2119,51 +2119,59 @@ function isMobileUserAgent(userAgent) {
|
|
|
2119
2119
|
function shouldUseWalletConnector(options) {
|
|
2120
2120
|
return options.useWalletConnector ?? !isMobileUserAgent(options.userAgent);
|
|
2121
2121
|
}
|
|
2122
|
-
var
|
|
2123
|
-
var
|
|
2122
|
+
var MUTED = "#7fa4b0";
|
|
2123
|
+
var LOGO_SIZE = 48;
|
|
2124
2124
|
function SwypeLoadingScreen() {
|
|
2125
2125
|
return /* @__PURE__ */ jsxs("div", { style: containerStyle, children: [
|
|
2126
|
-
/* @__PURE__ */ jsxs(
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2126
|
+
/* @__PURE__ */ jsxs(
|
|
2127
|
+
"svg",
|
|
2128
|
+
{
|
|
2129
|
+
width: LOGO_SIZE,
|
|
2130
|
+
height: LOGO_SIZE,
|
|
2131
|
+
viewBox: "0 0 100 100",
|
|
2132
|
+
fill: "none",
|
|
2133
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2134
|
+
style: { borderRadius: 10 },
|
|
2135
|
+
children: [
|
|
2136
|
+
/* @__PURE__ */ jsxs("g", { clipPath: "url(#swype-loading-clip)", children: [
|
|
2137
|
+
/* @__PURE__ */ jsx("rect", { width: "100", height: "100", rx: "18.5874", fill: "white" }),
|
|
2138
|
+
/* @__PURE__ */ jsx("path", { d: "M64.0138 36.6191C68.3952 36.7025 70.2512 42.3038 65.1932 44.0399C61.4251 44.2617 60.8419 41.8557 61.3059 38.6113C62.3258 37.4916 62.6562 37.2326 64.0138 36.6191Z", fill: "white" }),
|
|
2139
|
+
/* @__PURE__ */ jsx("path", { d: "M34.7441 36.6714C36.6646 36.3309 38.4839 37.6898 38.813 39.71C39.1407 41.7302 37.8542 43.6499 35.9352 43.9994C34.7427 44.2169 33.5274 43.7774 32.7154 42.8325C31.8492 41.8262 31.5728 40.4029 31.9959 39.1191C32.419 37.8367 33.4719 36.8979 34.7441 36.6714Z", fill: "white" }),
|
|
2140
|
+
/* @__PURE__ */ jsx("g", { style: { transformOrigin: "50px 62px", animation: "swype-legs-walk 0.8s ease-in-out infinite" }, children: /* @__PURE__ */ jsx("path", { d: "M37.719 72.0299C39.0372 70.605 40.611 68.9843 41.7888 67.4312L50.1528 61.6651L57.6601 61.4468C57.4965 63.5289 61.7342 75.3729 61.6981 77.5158C62.154 77.0628 63.0658 76.3318 63.567 75.9876C65.9954 74.3365 68.8384 73.8223 71.4833 74.5554C72.8167 74.9328 73.9331 75.9251 74.58 77.3075C75.2967 78.8451 75.3771 80.3207 74.9127 82.0281C73.8912 85.7844 71.5792 88.6365 68.624 90.5357C66.125 92.1415 61.7077 93.9276 58.9822 93.0828C58.078 92.7956 56.4567 92.015 55.9204 91.1399C55.1385 89.8648 54.5613 88.8907 54.1469 87.3736C53.3686 84.4709 53.3459 86.0793 52.7439 77.9085C52.8102 75.0919 52.9961 69.1199 52.9088 66.782C52.1044 67.8121 48.6686 72.1053 47.7896 73.7937L43.7186 79.5555C45.2316 79.4947 47.0626 79.5314 48.354 80.4535C49.2813 81.1277 49.9192 82.2144 50.1273 83.4755C50.2332 83.8294 50.3132 84.6855 50.3258 85.0634C50.4307 88.2051 49.4337 91.7462 46.8974 93.4764C45.8189 94.2126 44.2654 94.598 43.01 94.7341C37.9909 95.3115 33.0817 93.5835 29.3502 89.9257C28.3222 88.8994 27.4875 87.705 27.4333 86.0333C27.4046 85.1165 27.6099 84.1963 28.0241 83.3859C28.6301 82.2147 30.2471 80.3005 31.0794 79.3156C33.2057 76.7997 35.4975 74.4306 37.719 72.0299Z", fill: "black" }) }),
|
|
2141
|
+
/* @__PURE__ */ jsx("path", { d: "M25.2815 30.5666C25.6441 30.6182 25.869 30.0928 25.5864 29.8598C23.1701 27.868 21.5484 25.4469 21.0444 22.6545C20.3641 19.1251 21.516 15.5212 24.2422 12.6488C26.8514 9.91783 30.7518 8.12575 35.0552 7.68041C40.5681 7.11357 44.9544 9.44386 49.0355 11.908C49.1016 11.9479 49.1793 11.964 49.2559 11.9535L49.6641 11.8975C49.7772 11.882 49.8729 11.8099 49.9313 11.7118C50.7042 10.4132 53.3609 9.13558 54.9428 8.55183C63.274 5.47733 72.1015 8.67608 75.6217 15.0543C77.4169 18.3043 77.4637 21.9922 75.7515 25.2845C74.8719 26.99 73.8277 28.1868 72.3742 29.4156C72.1074 29.6412 72.3057 30.099 72.652 30.0534C78.3434 29.3036 83.6958 29.6535 88.1602 33.0995C88.1743 33.1104 88.1896 33.1204 88.2051 33.1289C94.9326 36.8336 95.4063 45.4019 90.8735 50.5016C88.6438 53.0434 85.3883 54.9193 81.641 55.8268C81.4786 55.8662 81.3675 56.017 81.3778 56.1837C81.627 60.2197 80.6407 63.7049 77.0957 66.8558C74.3594 69.31 72.2572 70.905 68.1242 71.1594C66.1317 71.2671 64.5824 71.0823 61.0405 69.4728C57.7759 67.9894 53.6996 61.9918 52.509 57.7058C52.4204 57.3871 51.9326 57.3204 51.7644 57.6052C49.4075 61.5961 43.2088 67.6787 38.7227 69.4728C35.1404 70.8919 32.2895 71.8779 28.5005 70.8789C24.3706 69.7951 20.9698 67.4623 19.0499 64.3964C18.0021 62.7282 16.7577 59.3144 17.4723 57.5087C17.4921 57.4587 17.5023 57.4056 17.4951 57.3522C17.4647 57.1259 17.359 56.7067 17.1377 56.6504C8.17592 54.367 2.58735 48.0815 5.03045 40.4013C6.14562 36.9784 8.95444 34.0395 12.8321 32.2381C16.7957 30.3763 20.9323 29.9475 25.2815 30.5666Z", fill: "black" }),
|
|
2142
|
+
/* @__PURE__ */ jsx("rect", { x: "44.3433", y: "56.4863", width: "10.1195", height: "9.10751", fill: "black" }),
|
|
2143
|
+
/* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M45.6929 25.6221C49.2323 25.6223 52.1021 31.512 52.1021 38.7773C52.102 46.0426 49.2323 51.9323 45.6929 51.9326C42.2373 51.9326 39.4213 46.3188 39.2896 39.292C41.4308 38.8166 43.9097 38.7264 46.1079 39.1299C47.0121 39.2956 47.8949 38.5389 47.4956 37.7109C46.0273 34.6668 42.4111 34.0327 39.686 34.1816C40.5942 29.1824 42.9408 25.6221 45.6929 25.6221Z", fill: "white" }),
|
|
2144
|
+
/* @__PURE__ */ jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M63.2471 25.6216C66.7865 25.6219 69.6562 31.5116 69.6562 38.7769C69.6562 46.0422 66.7865 51.9319 63.2471 51.9321C59.7916 51.9321 56.9756 46.319 56.8438 39.2925C58.985 38.8171 61.4639 38.7259 63.6621 39.1294C64.5663 39.2952 65.4491 38.5394 65.0498 37.7114C63.5816 34.6669 59.9654 34.0322 57.2402 34.1812C58.1484 29.1821 60.4951 25.6216 63.2471 25.6216Z", fill: "white" })
|
|
2145
|
+
] }),
|
|
2146
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "swype-loading-clip", children: /* @__PURE__ */ jsx("rect", { width: "100", height: "100", rx: "18.5874", fill: "white" }) }) })
|
|
2147
|
+
]
|
|
2148
|
+
}
|
|
2149
|
+
),
|
|
2150
|
+
/* @__PURE__ */ jsx("span", { style: labelStyle, children: "Loading..." }),
|
|
2130
2151
|
/* @__PURE__ */ jsx("style", { children: `
|
|
2131
|
-
@keyframes swype-
|
|
2132
|
-
|
|
2152
|
+
@keyframes swype-legs-walk {
|
|
2153
|
+
0%, 100% { transform: rotate(0deg); }
|
|
2154
|
+
25% { transform: rotate(5deg); }
|
|
2155
|
+
75% { transform: rotate(-5deg); }
|
|
2133
2156
|
}
|
|
2134
2157
|
` })
|
|
2135
2158
|
] });
|
|
2136
2159
|
}
|
|
2137
2160
|
var containerStyle = {
|
|
2138
2161
|
display: "flex",
|
|
2162
|
+
flexDirection: "column",
|
|
2139
2163
|
alignItems: "center",
|
|
2140
2164
|
justifyContent: "center",
|
|
2165
|
+
gap: 12,
|
|
2141
2166
|
height: "100%",
|
|
2142
2167
|
flex: 1,
|
|
2143
2168
|
background: "transparent"
|
|
2144
2169
|
};
|
|
2145
|
-
var
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
};
|
|
2151
|
-
var wordmarkStyle = {
|
|
2152
|
-
fontSize: 28,
|
|
2153
|
-
fontWeight: 700,
|
|
2154
|
-
letterSpacing: "-0.04em",
|
|
2155
|
-
color: ACCENT,
|
|
2156
|
-
margin: 0,
|
|
2157
|
-
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
|
|
2158
|
-
};
|
|
2159
|
-
var spinnerStyle = {
|
|
2160
|
-
width: 44,
|
|
2161
|
-
height: 44,
|
|
2162
|
-
border: `4px solid ${BG_RING}`,
|
|
2163
|
-
borderTopColor: ACCENT,
|
|
2164
|
-
borderRightColor: `${ACCENT}66`,
|
|
2165
|
-
borderRadius: "50%",
|
|
2166
|
-
animation: "swype-loading-spin 0.9s linear infinite"
|
|
2170
|
+
var labelStyle = {
|
|
2171
|
+
color: MUTED,
|
|
2172
|
+
fontSize: 13,
|
|
2173
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
2174
|
+
letterSpacing: "0.02em"
|
|
2167
2175
|
};
|
|
2168
2176
|
|
|
2169
2177
|
// src/assets/logos.ts
|
|
@@ -2213,25 +2221,32 @@ var SWYPE_SVG = `<svg width="100" height="100" viewBox="0 0 100 100" fill="none"
|
|
|
2213
2221
|
</clipPath>
|
|
2214
2222
|
</defs>
|
|
2215
2223
|
</svg>`;
|
|
2216
|
-
var
|
|
2217
|
-
|
|
2218
|
-
<path d="
|
|
2219
|
-
<path d="
|
|
2220
|
-
<path d="M37.719 72.0299C39.0372 70.605 40.611 68.9843 41.7888 67.4312L50.1528 61.6651L57.6601 61.4468C57.4965 63.5289 61.7342 75.3729 61.6981 77.5158C62.154 77.0628 63.0658 76.3318 63.567 75.9876C65.9954 74.3365 68.8384 73.8223 71.4833 74.5554C72.8167 74.9328 73.9331 75.9251 74.58 77.3075C75.2967 78.8451 75.3771 80.3207 74.9127 82.0281C73.8912 85.7844 71.5792 88.6365 68.624 90.5357C66.125 92.1415 61.7077 93.9276 58.9822 93.0828C58.078 92.7956 56.4567 92.015 55.9204 91.1399C55.1385 89.8648 54.5613 88.8907 54.1469 87.3736C53.3686 84.4709 53.3459 86.0793 52.7439 77.9085C52.8102 75.0919 52.9961 69.1199 52.9088 66.782C52.1044 67.8121 48.6686 72.1053 47.7896 73.7937L43.7186 79.5555C45.2316 79.4947 47.0626 79.5314 48.354 80.4535C49.2813 81.1277 49.9192 82.2144 50.1273 83.4755C50.2332 83.8294 50.3132 84.6855 50.3258 85.0634C50.4307 88.2051 49.4337 91.7462 46.8974 93.4764C45.8189 94.2126 44.2654 94.598 43.01 94.7341C37.9909 95.3115 33.0817 93.5835 29.3502 89.9257C28.3222 88.8994 27.4875 87.705 27.4333 86.0333C27.4046 85.1165 27.6099 84.1963 28.0241 83.3859C28.6301 82.2147 30.2471 80.3005 31.0794 79.3156C33.2057 76.7997 35.4975 74.4306 37.719 72.0299Z" fill="#4ABA5A"/>
|
|
2221
|
-
<path d="M25.2815 30.5666C25.6441 30.6182 25.869 30.0928 25.5864 29.8598C23.1701 27.868 21.5484 25.4469 21.0444 22.6545C20.3641 19.1251 21.516 15.5212 24.2422 12.6488C26.8514 9.91783 30.7518 8.12575 35.0552 7.68041C40.5681 7.11357 44.9544 9.44386 49.0355 11.908C49.1016 11.9479 49.1793 11.964 49.2559 11.9535L49.6641 11.8975C49.7772 11.882 49.8729 11.8099 49.9313 11.7118C50.7042 10.4132 53.3609 9.13558 54.9428 8.55183C63.274 5.47733 72.1015 8.67608 75.6217 15.0543C77.4169 18.3043 77.4637 21.9922 75.7515 25.2845C74.8719 26.99 73.8277 28.1868 72.3742 29.4156C72.1074 29.6412 72.3057 30.099 72.652 30.0534C78.3434 29.3036 83.6958 29.6535 88.1602 33.0995C88.1743 33.1104 88.1896 33.1204 88.2051 33.1289C94.9326 36.8336 95.4063 45.4019 90.8735 50.5016C88.6438 53.0434 85.3883 54.9193 81.641 55.8268C81.4786 55.8662 81.3675 56.017 81.3778 56.1837C81.627 60.2197 80.6407 63.7049 77.0957 66.8558C74.3594 69.31 72.2572 70.905 68.1242 71.1594C66.1317 71.2671 64.5824 71.0823 61.0405 69.4728C57.7759 67.9894 53.6996 61.9918 52.509 57.7058C52.4204 57.3871 51.9326 57.3204 51.7644 57.6052C49.4075 61.5961 43.2088 67.6787 38.7227 69.4728C35.1404 70.8919 32.2895 71.8779 28.5005 70.8789C24.3706 69.7951 20.9698 67.4623 19.0499 64.3964C18.0021 62.7282 16.7577 59.3144 17.4723 57.5087C17.4921 57.4587 17.5023 57.4056 17.4951 57.3522C17.4647 57.1259 17.359 56.7067 17.1377 56.6504C8.17592 54.367 2.58735 48.0815 5.03045 40.4013C6.14562 36.9784 8.95444 34.0395 12.8321 32.2381C16.7957 30.3763 20.9323 29.9475 25.2815 30.5666Z" fill="#4ABA5A"/>
|
|
2222
|
-
<rect x="44.3433" y="56.4863" width="10.1195" height="9.10751" fill="#4ABA5A"/>
|
|
2223
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M45.6929 25.6221C49.2323 25.6223 52.1021 31.512 52.1021 38.7773C52.102 46.0426 49.2323 51.9323 45.6929 51.9326C42.2373 51.9326 39.4213 46.3188 39.2896 39.292C41.4308 38.8166 43.9097 38.7264 46.1079 39.1299C47.0121 39.2956 47.8949 38.5389 47.4956 37.7109C46.0273 34.6668 42.4111 34.0327 39.686 34.1816C40.5942 29.1824 42.9408 25.6221 45.6929 25.6221Z" fill="#1a5c2a"/>
|
|
2224
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M63.2471 25.6216C66.7865 25.6219 69.6562 31.5116 69.6562 38.7769C69.6562 46.0422 66.7865 51.9319 63.2471 51.9321C59.7916 51.9321 56.9756 46.319 56.8438 39.2925C58.985 38.8171 61.4639 38.7259 63.6621 39.1294C64.5663 39.2952 65.4491 38.5394 65.0498 37.7114C63.5816 34.6669 59.9654 34.0322 57.2402 34.1812C58.1484 29.1821 60.4951 25.6216 63.2471 25.6216Z" fill="#1a5c2a"/>
|
|
2224
|
+
var USDC_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000">
|
|
2225
|
+
<path d="M1000 2000c554.17 0 1000-445.83 1000-1000S1554.17 0 1000 0 0 445.83 0 1000s445.83 1000 1000 1000z" fill="#2775ca"/>
|
|
2226
|
+
<path d="M1275 1158.33c0-145.83-87.5-195.83-262.5-216.66-125-16.67-150-50-150-108.34s41.67-95.83 125-95.83c75 0 116.67 25 137.5 87.5 4.17 12.5 16.67 20.83 29.17 20.83h66.66c16.67 0 29.17-12.5 29.17-29.16v-4.17c-16.67-91.67-91.67-162.5-187.5-170.83v-100c0-16.67-12.5-29.17-33.33-33.34h-62.5c-16.67 0-29.17 12.5-33.34 33.34v95.83c-125 16.67-204.16 100-204.16 204.17 0 137.5 83.33 191.66 258.33 212.5 116.67 20.83 154.17 45.83 154.17 112.5s-58.34 112.5-137.5 112.5c-108.34 0-145.84-45.84-158.34-108.34-4.16-16.66-16.66-25-29.16-25h-70.84c-16.66 0-29.16 12.5-29.16 29.17v4.17c16.66 104.16 83.33 179.16 220.83 200v100c0 16.66 12.5 29.16 33.33 33.33h62.5c16.67 0 29.17-12.5 33.34-33.33v-100c125-20.84 208.33-108.34 208.33-220.84z" fill="#fff"/>
|
|
2227
|
+
<path d="M787.5 1595.83c-325-116.66-491.67-479.16-370.83-800 62.5-175 200-308.33 370.83-370.83 16.67-8.33 25-20.83 25-41.67V325c0-16.67-8.33-29.17-25-33.33-4.17 0-12.5 0-16.67 4.16-395.83 125-612.5 545.84-487.5 941.67 75 233.33 254.17 412.5 487.5 487.5 16.67 8.33 33.34 0 37.5-16.67 4.17-4.16 4.17-8.33 4.17-16.66v-58.34c0-12.5-12.5-29.16-25-37.5zM1229.17 295.83c-16.67-8.33-33.34 0-37.5 16.67-4.17 4.17-4.17 8.33-4.17 16.67v58.33c0 16.67 12.5 33.33 25 41.67 325 116.66 491.67 479.16 370.83 800-62.5 175-200 308.33-370.83 370.83-16.67 8.33-25 20.83-25 41.67V1700c0 16.67 8.33 29.17 25 33.33 4.17 0 12.5 0 16.67-4.16 395.83-125 612.5-545.84 487.5-941.67-75-237.5-258.34-416.67-487.5-491.67z" fill="#fff"/>
|
|
2225
2228
|
</svg>`;
|
|
2226
|
-
var
|
|
2229
|
+
var TETHER_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800">
|
|
2230
|
+
<circle fill="#009393" cx="400" cy="400" r="400"/>
|
|
2231
|
+
<path fill="#fff" fill-rule="evenodd" d="M400.49,428.59c68.79,0,126.28-11.63,140.33-27.17-11.93-13.18-55.08-23.56-109.88-26.4v32.83c-9.81.51-20.01.76-30.46.76s-20.65-.25-30.48-.76v-32.83c-54.78,2.84-97.95,13.22-109.88,26.4,14.07,15.54,71.57,27.17,140.36,27.17ZM522.71,274.06v45.21h-91.77v31.35c64.46,3.35,112.83,17.13,113.19,33.62v34.38c-.36,16.49-48.73,30.24-113.19,33.6v76.94h-60.93v-76.94c-64.46-3.35-112.81-17.11-113.17-33.6v-34.38c.36-16.49,48.71-30.27,113.17-33.62v-31.35h-91.77v-45.21h244.48ZM242.15,202.11h322.16c7.7,0,14.79,4.05,18.63,10.63l93.85,161.16c4.86,8.36,3.42,18.91-3.52,25.68l-258.34,252.18c-8.38,8.17-21.84,8.17-30.2,0L126.71,399.92c-7.09-6.94-8.43-17.79-3.2-26.19l100.33-161.49c3.91-6.28,10.85-10.12,18.32-10.12Z"/>
|
|
2232
|
+
</svg>`;
|
|
2233
|
+
var SWYPE_LOGO = svgToDataUri(SWYPE_SVG);
|
|
2234
|
+
var SWYPE_MASCOT = SWYPE_LOGO;
|
|
2227
2235
|
var BASE_LOGO = svgToDataUri(BASE_SVG);
|
|
2228
2236
|
var METAMASK_LOGO = svgToDataUri(METAMASK_SVG);
|
|
2229
2237
|
var TRUST_WALLET_LOGO = svgToDataUri(TRUST_WALLET_SVG);
|
|
2238
|
+
var USDC_LOGO = svgToDataUri(USDC_SVG);
|
|
2239
|
+
var TETHER_LOGO = svgToDataUri(TETHER_SVG);
|
|
2230
2240
|
var KNOWN_LOGOS = {
|
|
2231
2241
|
metamask: METAMASK_LOGO,
|
|
2232
2242
|
base: BASE_LOGO,
|
|
2233
2243
|
"trust wallet": TRUST_WALLET_LOGO
|
|
2234
2244
|
};
|
|
2245
|
+
var TOKEN_LOGOS = {
|
|
2246
|
+
USDC: USDC_LOGO,
|
|
2247
|
+
"USDC.e": USDC_LOGO,
|
|
2248
|
+
USDT: TETHER_LOGO
|
|
2249
|
+
};
|
|
2235
2250
|
var FOOTER_CSS = `
|
|
2236
2251
|
.swype-screen-footer {
|
|
2237
2252
|
padding-bottom: max(32px, env(safe-area-inset-bottom, 32px));
|
|
@@ -2282,21 +2297,33 @@ function useFlowPhase() {
|
|
|
2282
2297
|
function StepProgress({ phase }) {
|
|
2283
2298
|
const { tokens } = useSwypeConfig();
|
|
2284
2299
|
if (phase === "deposit") {
|
|
2285
|
-
return /* @__PURE__ */ jsx("img", { src:
|
|
2300
|
+
return /* @__PURE__ */ jsx("img", { src: SWYPE_LOGO, alt: "Swype", style: mascotStyle });
|
|
2286
2301
|
}
|
|
2287
2302
|
return /* @__PURE__ */ jsxs("div", { style: containerStyle3, children: [
|
|
2288
|
-
/* @__PURE__ */
|
|
2289
|
-
|
|
2303
|
+
/* @__PURE__ */ jsxs("div", { style: sectionStyle("flex-end"), children: [
|
|
2304
|
+
/* @__PURE__ */ jsx("span", { style: labelStyle2(tokens.text), children: "Link" }),
|
|
2305
|
+
/* @__PURE__ */ jsx("span", { style: dotStyle(tokens.accent) })
|
|
2306
|
+
] }),
|
|
2290
2307
|
/* @__PURE__ */ jsx("span", { style: lineStyle(tokens.textMuted) }),
|
|
2291
|
-
/* @__PURE__ */
|
|
2292
|
-
|
|
2308
|
+
/* @__PURE__ */ jsxs("div", { style: sectionStyle("flex-start"), children: [
|
|
2309
|
+
/* @__PURE__ */ jsx("span", { style: dotStyle(tokens.textMuted) }),
|
|
2310
|
+
/* @__PURE__ */ jsx("span", { style: labelStyle2(tokens.textMuted), children: "Deposit" })
|
|
2311
|
+
] })
|
|
2293
2312
|
] });
|
|
2294
2313
|
}
|
|
2295
2314
|
var containerStyle3 = {
|
|
2296
2315
|
display: "flex",
|
|
2297
2316
|
alignItems: "center",
|
|
2298
|
-
gap: 6
|
|
2317
|
+
gap: 6,
|
|
2318
|
+
width: "100%"
|
|
2299
2319
|
};
|
|
2320
|
+
var sectionStyle = (justify) => ({
|
|
2321
|
+
flex: 1,
|
|
2322
|
+
display: "flex",
|
|
2323
|
+
alignItems: "center",
|
|
2324
|
+
justifyContent: justify,
|
|
2325
|
+
gap: 6
|
|
2326
|
+
});
|
|
2300
2327
|
var dotStyle = (color) => ({
|
|
2301
2328
|
width: 8,
|
|
2302
2329
|
height: 8,
|
|
@@ -2311,7 +2338,7 @@ var lineStyle = (color) => ({
|
|
|
2311
2338
|
opacity: 0.4,
|
|
2312
2339
|
flexShrink: 0
|
|
2313
2340
|
});
|
|
2314
|
-
var
|
|
2341
|
+
var labelStyle2 = (color) => ({
|
|
2315
2342
|
fontSize: "0.82rem",
|
|
2316
2343
|
fontWeight: 600,
|
|
2317
2344
|
color,
|
|
@@ -2453,19 +2480,16 @@ var badgeStyle = (color) => ({
|
|
|
2453
2480
|
});
|
|
2454
2481
|
function PoweredByFooter() {
|
|
2455
2482
|
const { tokens } = useSwypeConfig();
|
|
2456
|
-
return /* @__PURE__ */
|
|
2457
|
-
/* @__PURE__ */
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
] }),
|
|
2467
|
-
/* @__PURE__ */ jsx("span", { style: pillStyle(tokens.textMuted, tokens.border), children: "Beta Version" })
|
|
2468
|
-
] });
|
|
2483
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle5(tokens.textMuted), children: /* @__PURE__ */ jsxs("div", { style: rowStyle, children: [
|
|
2484
|
+
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
2485
|
+
"path",
|
|
2486
|
+
{
|
|
2487
|
+
d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM12 17c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3-9H9V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2z",
|
|
2488
|
+
fill: "currentColor"
|
|
2489
|
+
}
|
|
2490
|
+
) }),
|
|
2491
|
+
/* @__PURE__ */ jsx("span", { children: "Powered by Blink" })
|
|
2492
|
+
] }) });
|
|
2469
2493
|
}
|
|
2470
2494
|
var containerStyle5 = (color) => ({
|
|
2471
2495
|
display: "flex",
|
|
@@ -2482,14 +2506,6 @@ var rowStyle = {
|
|
|
2482
2506
|
alignItems: "center",
|
|
2483
2507
|
gap: 6
|
|
2484
2508
|
};
|
|
2485
|
-
var pillStyle = (color, border) => ({
|
|
2486
|
-
fontSize: "0.65rem",
|
|
2487
|
-
fontWeight: 600,
|
|
2488
|
-
padding: "2px 8px",
|
|
2489
|
-
borderRadius: 999,
|
|
2490
|
-
border: `1px solid ${border}`,
|
|
2491
|
-
color
|
|
2492
|
-
});
|
|
2493
2509
|
function PrimaryButton({ children, onClick, disabled, loading, icon }) {
|
|
2494
2510
|
const { tokens } = useSwypeConfig();
|
|
2495
2511
|
const isDisabled = disabled || loading;
|
|
@@ -2509,7 +2525,7 @@ function PrimaryButton({ children, onClick, disabled, loading, icon }) {
|
|
|
2509
2525
|
}
|
|
2510
2526
|
var buttonStyle = (tokens, disabled) => ({
|
|
2511
2527
|
width: "100%",
|
|
2512
|
-
padding: "
|
|
2528
|
+
padding: "18px 24px",
|
|
2513
2529
|
background: `linear-gradient(180deg, ${tokens.accent}, ${tokens.accentHover})`,
|
|
2514
2530
|
color: tokens.accentText,
|
|
2515
2531
|
border: "none",
|
|
@@ -2520,7 +2536,7 @@ var buttonStyle = (tokens, disabled) => ({
|
|
|
2520
2536
|
opacity: disabled ? 0.5 : 1,
|
|
2521
2537
|
transition: "filter 0.15s ease, transform 0.15s ease",
|
|
2522
2538
|
fontFamily: "inherit",
|
|
2523
|
-
boxShadow: "0
|
|
2539
|
+
boxShadow: "0 6px 20px rgba(178, 255, 147, 0.25)",
|
|
2524
2540
|
display: "flex",
|
|
2525
2541
|
alignItems: "center",
|
|
2526
2542
|
justifyContent: "center",
|
|
@@ -2737,7 +2753,7 @@ function StepList({ steps }) {
|
|
|
2737
2753
|
}
|
|
2738
2754
|
),
|
|
2739
2755
|
/* @__PURE__ */ jsxs("div", { style: labelContainerStyle, children: [
|
|
2740
|
-
/* @__PURE__ */ jsx("span", { style:
|
|
2756
|
+
/* @__PURE__ */ jsx("span", { style: labelStyle3(isComplete || isActive ? tokens.text : tokens.textMuted), children: step.label }),
|
|
2741
2757
|
step.detail && /* @__PURE__ */ jsx("span", { style: detailStyle(tokens.textMuted), children: step.detail })
|
|
2742
2758
|
] })
|
|
2743
2759
|
] }, i);
|
|
@@ -2778,7 +2794,7 @@ var labelContainerStyle = {
|
|
|
2778
2794
|
display: "flex",
|
|
2779
2795
|
flexDirection: "column"
|
|
2780
2796
|
};
|
|
2781
|
-
var
|
|
2797
|
+
var labelStyle3 = (color) => ({
|
|
2782
2798
|
fontSize: "0.9rem",
|
|
2783
2799
|
fontWeight: 500,
|
|
2784
2800
|
color
|
|
@@ -2831,7 +2847,7 @@ function LoginScreen({
|
|
|
2831
2847
|
right: merchantInitials ? /* @__PURE__ */ jsx("div", { style: avatarStyle(tokens), children: merchantInitials }) : void 0
|
|
2832
2848
|
}
|
|
2833
2849
|
),
|
|
2834
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
2850
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle, children: [
|
|
2835
2851
|
/* @__PURE__ */ jsx("img", { src: SWYPE_LOGO, alt: "Swype", style: logoStyle }),
|
|
2836
2852
|
/* @__PURE__ */ jsx("h2", { style: headingStyle(tokens.text), children: "Your Money. Any App.\nOne Tap." }),
|
|
2837
2853
|
error && /* @__PURE__ */ jsx("div", { style: errorStyle(tokens), children: error }),
|
|
@@ -2866,7 +2882,7 @@ function socialLabel(provider) {
|
|
|
2866
2882
|
return "X";
|
|
2867
2883
|
}
|
|
2868
2884
|
}
|
|
2869
|
-
var
|
|
2885
|
+
var contentStyle = {
|
|
2870
2886
|
textAlign: "center",
|
|
2871
2887
|
flex: 1,
|
|
2872
2888
|
display: "flex",
|
|
@@ -3007,7 +3023,7 @@ function OtpVerifyScreen({
|
|
|
3007
3023
|
] }),
|
|
3008
3024
|
children: [
|
|
3009
3025
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
3010
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3026
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle2, children: [
|
|
3011
3027
|
/* @__PURE__ */ jsx("h2", { style: headingStyle2(tokens.text), children: "Confirm it is you" }),
|
|
3012
3028
|
/* @__PURE__ */ jsxs("p", { style: subtitleStyle(tokens.textSecondary), children: [
|
|
3013
3029
|
"We sent a 6-digit code to",
|
|
@@ -3031,7 +3047,7 @@ function OtpVerifyScreen({
|
|
|
3031
3047
|
}
|
|
3032
3048
|
);
|
|
3033
3049
|
}
|
|
3034
|
-
var
|
|
3050
|
+
var contentStyle2 = {
|
|
3035
3051
|
textAlign: "center",
|
|
3036
3052
|
display: "flex",
|
|
3037
3053
|
flexDirection: "column",
|
|
@@ -3096,15 +3112,16 @@ function PasskeyScreen({
|
|
|
3096
3112
|
] }),
|
|
3097
3113
|
children: [
|
|
3098
3114
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
3099
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3115
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle3, children: [
|
|
3100
3116
|
/* @__PURE__ */ jsx("h2", { style: headingStyle3(tokens.text), children: "Secure your account with a passkey" }),
|
|
3117
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "This enables secure one-tap deposits on this device" }),
|
|
3101
3118
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle2(tokens), children: error })
|
|
3102
3119
|
] })
|
|
3103
3120
|
]
|
|
3104
3121
|
}
|
|
3105
3122
|
);
|
|
3106
3123
|
}
|
|
3107
|
-
var
|
|
3124
|
+
var contentStyle3 = {
|
|
3108
3125
|
textAlign: "center",
|
|
3109
3126
|
flex: 1,
|
|
3110
3127
|
display: "flex",
|
|
@@ -3119,6 +3136,12 @@ var headingStyle3 = (color) => ({
|
|
|
3119
3136
|
color,
|
|
3120
3137
|
margin: "24px 0 8px"
|
|
3121
3138
|
});
|
|
3139
|
+
var subtitleStyle2 = (color) => ({
|
|
3140
|
+
fontSize: "0.86rem",
|
|
3141
|
+
color,
|
|
3142
|
+
margin: "0 0 20px",
|
|
3143
|
+
lineHeight: 1.5
|
|
3144
|
+
});
|
|
3122
3145
|
var errorBannerStyle2 = (tokens) => ({
|
|
3123
3146
|
background: tokens.errorBg,
|
|
3124
3147
|
border: `1px solid ${tokens.error}66`,
|
|
@@ -3256,7 +3279,7 @@ function WalletPickerScreen({
|
|
|
3256
3279
|
/* @__PURE__ */ jsx(ScreenHeader, { title: "Set up Swype", onBack, onLogout }),
|
|
3257
3280
|
hasPending && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3258
3281
|
/* @__PURE__ */ jsx("h2", { style: headingStyle4(tokens.text), children: "Continue where you left off" }),
|
|
3259
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
3282
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle3(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
|
|
3260
3283
|
/* @__PURE__ */ jsx("div", { style: pendingListStyle, children: pendingConnections.map((acct) => {
|
|
3261
3284
|
const wallet = acct.wallets[0];
|
|
3262
3285
|
const address = wallet ? truncateAddress(wallet.name) : void 0;
|
|
@@ -3360,7 +3383,7 @@ var headingStyle4 = (color) => ({
|
|
|
3360
3383
|
color,
|
|
3361
3384
|
margin: "8px 0 4px"
|
|
3362
3385
|
});
|
|
3363
|
-
var
|
|
3386
|
+
var subtitleStyle3 = (color) => ({
|
|
3364
3387
|
fontSize: "0.88rem",
|
|
3365
3388
|
color,
|
|
3366
3389
|
margin: "0 0 24px"
|
|
@@ -3524,7 +3547,8 @@ function SetupScreen({
|
|
|
3524
3547
|
onLogout,
|
|
3525
3548
|
onAdvanced,
|
|
3526
3549
|
loading,
|
|
3527
|
-
error
|
|
3550
|
+
error,
|
|
3551
|
+
selectedTokenSymbol
|
|
3528
3552
|
}) {
|
|
3529
3553
|
const { tokens } = useSwypeConfig();
|
|
3530
3554
|
const effectiveMax = DEFAULT_MAX;
|
|
@@ -3613,7 +3637,7 @@ function SetupScreen({
|
|
|
3613
3637
|
style: tokenIconButtonStyle(!!onAdvanced),
|
|
3614
3638
|
children: [
|
|
3615
3639
|
/* @__PURE__ */ jsxs("div", { style: tokenIconWrapStyle, children: [
|
|
3616
|
-
/* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
|
|
3640
|
+
selectedTokenSymbol && TOKEN_LOGOS[selectedTokenSymbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[selectedTokenSymbol], alt: selectedTokenSymbol, width: 36, height: 36, style: { borderRadius: "50%" } }) : /* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
|
|
3617
3641
|
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
|
|
3618
3642
|
/* @__PURE__ */ jsx("text", { x: "18", y: "23", textAnchor: "middle", fontSize: "18", fill: "#fff", fontWeight: "700", children: "$" })
|
|
3619
3643
|
] }),
|
|
@@ -3759,10 +3783,10 @@ function SetupStatusScreen({
|
|
|
3759
3783
|
if (complete) {
|
|
3760
3784
|
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
|
|
3761
3785
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack: onContinue }),
|
|
3762
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3763
|
-
/* @__PURE__ */ jsx("img", { src:
|
|
3786
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle4, children: [
|
|
3787
|
+
/* @__PURE__ */ jsx("img", { src: SWYPE_LOGO, alt: "Swype", style: mascotStyle2 }),
|
|
3764
3788
|
/* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Done!" }),
|
|
3765
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
3789
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle4(tokens.textSecondary), children: "Return to the app to try one-tap deposits." })
|
|
3766
3790
|
] })
|
|
3767
3791
|
] });
|
|
3768
3792
|
}
|
|
@@ -3772,7 +3796,7 @@ function SetupStatusScreen({
|
|
|
3772
3796
|
];
|
|
3773
3797
|
return /* @__PURE__ */ jsxs(ScreenLayout, { children: [
|
|
3774
3798
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
3775
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3799
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle4, children: [
|
|
3776
3800
|
/* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
3777
3801
|
/* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Setting up One-Tap..." }),
|
|
3778
3802
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle4(tokens), children: error }),
|
|
@@ -3781,7 +3805,7 @@ function SetupStatusScreen({
|
|
|
3781
3805
|
] })
|
|
3782
3806
|
] });
|
|
3783
3807
|
}
|
|
3784
|
-
var
|
|
3808
|
+
var contentStyle4 = {
|
|
3785
3809
|
flex: 1,
|
|
3786
3810
|
display: "flex",
|
|
3787
3811
|
flexDirection: "column",
|
|
@@ -3801,7 +3825,7 @@ var headingStyle6 = (color) => ({
|
|
|
3801
3825
|
color,
|
|
3802
3826
|
margin: "20px 0 8px"
|
|
3803
3827
|
});
|
|
3804
|
-
var
|
|
3828
|
+
var subtitleStyle4 = (color) => ({
|
|
3805
3829
|
fontSize: "0.9rem",
|
|
3806
3830
|
color,
|
|
3807
3831
|
margin: "0 0 28px",
|
|
@@ -3852,7 +3876,8 @@ function DepositScreen({
|
|
|
3852
3876
|
onAuthorizeAccount,
|
|
3853
3877
|
onAddProvider,
|
|
3854
3878
|
onSelectToken,
|
|
3855
|
-
selectedSourceLabel
|
|
3879
|
+
selectedSourceLabel,
|
|
3880
|
+
selectedTokenSymbol
|
|
3856
3881
|
}) {
|
|
3857
3882
|
const { tokens } = useSwypeConfig();
|
|
3858
3883
|
const amount = initialAmount;
|
|
@@ -3871,7 +3896,6 @@ function DepositScreen({
|
|
|
3871
3896
|
const selectedAccount = accounts?.find((a) => a.id === selectedAccountId);
|
|
3872
3897
|
const selectedProviderName = selectedAccount?.name ?? "Wallet";
|
|
3873
3898
|
const selectedProviderLogo = KNOWN_LOGOS[selectedProviderName.toLowerCase()];
|
|
3874
|
-
const hasMultipleAccounts = accounts != null && accounts.length > 1;
|
|
3875
3899
|
const isLowBalance = availableBalance < MIN_DEPOSIT;
|
|
3876
3900
|
const exceedsLimit = remainingLimit != null && amount > remainingLimit && !isLowBalance;
|
|
3877
3901
|
const canDeposit = amount >= MIN_DEPOSIT && !exceedsLimit && !isLowBalance && !processing;
|
|
@@ -3923,27 +3947,18 @@ function DepositScreen({
|
|
|
3923
3947
|
ScreenLayout,
|
|
3924
3948
|
{
|
|
3925
3949
|
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3926
|
-
exceedsLimit && onIncreaseLimit ? /* @__PURE__ */
|
|
3927
|
-
/* @__PURE__ */ jsx(PrimaryButton, { onClick: onIncreaseLimit, loading: increasingLimit, children: "Increase limit" }),
|
|
3928
|
-
/* @__PURE__ */ jsxs("p", { style: limitExceededHintStyle(tokens.warning), children: [
|
|
3929
|
-
"Your deposit of $",
|
|
3930
|
-
amount.toFixed(2),
|
|
3931
|
-
" exceeds your One-Tap limit of $",
|
|
3932
|
-
remainingLimit?.toFixed(2) ?? "0.00",
|
|
3933
|
-
". Increase your limit to continue."
|
|
3934
|
-
] })
|
|
3935
|
-
] }) : /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onDeposit(amount), disabled: !canDeposit, loading: processing, children: "Confirm" }),
|
|
3950
|
+
!accountPickerOpen && (exceedsLimit && onIncreaseLimit ? /* @__PURE__ */ jsx(PrimaryButton, { onClick: onIncreaseLimit, loading: increasingLimit, children: "Increase limit" }) : /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onDeposit(amount), disabled: !canDeposit, loading: processing, children: "Confirm" })),
|
|
3936
3951
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3937
3952
|
] }),
|
|
3938
3953
|
children: [
|
|
3939
|
-
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
3954
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
3940
3955
|
/* @__PURE__ */ jsxs("div", { ref: pickerRef, style: depositCardWrapStyle, children: [
|
|
3941
|
-
/* @__PURE__ */ jsxs("div", {
|
|
3956
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3942
3957
|
/* @__PURE__ */ jsx("div", { style: depositLabelStyle(tokens.textMuted), children: "Depositing" }),
|
|
3943
3958
|
/* @__PURE__ */ jsxs("div", { style: amountRowStyle2, children: [
|
|
3944
3959
|
/* @__PURE__ */ jsxs("div", { style: amountValueStyle(tokens.text), children: [
|
|
3945
3960
|
"$",
|
|
3946
|
-
amount.toLocaleString("en-US", { minimumFractionDigits:
|
|
3961
|
+
amount.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
3947
3962
|
] }),
|
|
3948
3963
|
/* @__PURE__ */ jsxs(
|
|
3949
3964
|
"button",
|
|
@@ -3952,34 +3967,28 @@ function DepositScreen({
|
|
|
3952
3967
|
onClick: onSelectToken,
|
|
3953
3968
|
style: tokenIconButtonStyle2(!!onSelectToken),
|
|
3954
3969
|
children: [
|
|
3955
|
-
/* @__PURE__ */
|
|
3956
|
-
/* @__PURE__ */
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
] }),
|
|
3960
|
-
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", style: checkBadgeStyle2, children: [
|
|
3961
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "8", fill: "#2775CA" }),
|
|
3962
|
-
/* @__PURE__ */ jsx("path", { d: "M5 8l2 2 4-4", stroke: "#fff", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
3963
|
-
] })
|
|
3964
|
-
] }),
|
|
3970
|
+
/* @__PURE__ */ jsx("div", { style: tokenIconWrapStyle2, children: selectedTokenSymbol && TOKEN_LOGOS[selectedTokenSymbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[selectedTokenSymbol], alt: selectedTokenSymbol, width: 36, height: 36, style: { borderRadius: "50%" } }) : /* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
|
|
3971
|
+
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
|
|
3972
|
+
/* @__PURE__ */ jsx("text", { x: "18", y: "23", textAnchor: "middle", fontSize: "18", fill: "#fff", fontWeight: "700", children: "$" })
|
|
3973
|
+
] }) }),
|
|
3965
3974
|
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.5 }, children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6", stroke: tokens.textMuted, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3966
3975
|
]
|
|
3967
3976
|
}
|
|
3968
3977
|
)
|
|
3969
3978
|
] }),
|
|
3970
|
-
/* @__PURE__ */ jsxs(
|
|
3979
|
+
!accountPickerOpen && /* @__PURE__ */ jsxs(
|
|
3971
3980
|
"button",
|
|
3972
3981
|
{
|
|
3973
3982
|
type: "button",
|
|
3974
|
-
onClick:
|
|
3975
|
-
style: walletBalanceRowStyle
|
|
3983
|
+
onClick: () => setAccountPickerOpen(!accountPickerOpen),
|
|
3984
|
+
style: walletBalanceRowStyle,
|
|
3976
3985
|
children: [
|
|
3977
3986
|
selectedProviderLogo ? /* @__PURE__ */ jsx("img", { src: selectedProviderLogo, alt: selectedProviderName, style: providerLogoStyle }) : /* @__PURE__ */ jsx("div", { style: providerFallbackStyle(tokens.textMuted), children: selectedProviderName.charAt(0) }),
|
|
3978
3987
|
/* @__PURE__ */ jsxs("span", { style: walletBalanceStyle(tokens.text), children: [
|
|
3979
3988
|
"$",
|
|
3980
3989
|
availableBalance.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
3981
3990
|
] }),
|
|
3982
|
-
|
|
3991
|
+
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.4 }, children: /* @__PURE__ */ jsx("path", { d: "M7 10l5-5 5 5M7 14l5 5 5-5", stroke: tokens.textMuted, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3983
3992
|
]
|
|
3984
3993
|
}
|
|
3985
3994
|
)
|
|
@@ -4049,12 +4058,19 @@ function DepositScreen({
|
|
|
4049
4058
|
] })
|
|
4050
4059
|
] })
|
|
4051
4060
|
] }),
|
|
4052
|
-
remainingLimit != null && /* @__PURE__ */ jsxs("div", { style: spendingLimitStyle(tokens.textMuted), children: [
|
|
4061
|
+
!accountPickerOpen && remainingLimit != null && /* @__PURE__ */ jsxs("div", { style: spendingLimitStyle(tokens.textMuted), children: [
|
|
4053
4062
|
"Spending Limit",
|
|
4054
4063
|
" ",
|
|
4055
4064
|
/* @__PURE__ */ jsxs("strong", { style: { color: tokens.text }, children: [
|
|
4056
4065
|
"$",
|
|
4057
|
-
remainingLimit.toLocaleString("en-US", { minimumFractionDigits:
|
|
4066
|
+
remainingLimit.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
4067
|
+
] }),
|
|
4068
|
+
exceedsLimit && /* @__PURE__ */ jsxs("p", { style: limitExceededHintStyle(tokens.warning), children: [
|
|
4069
|
+
"Your deposit of $",
|
|
4070
|
+
amount.toFixed(2),
|
|
4071
|
+
" exceeds your One-Tap limit of $",
|
|
4072
|
+
remainingLimit?.toFixed(2) ?? "0.00",
|
|
4073
|
+
". Increase your limit to continue."
|
|
4058
4074
|
] })
|
|
4059
4075
|
] }),
|
|
4060
4076
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle5(tokens), children: error })
|
|
@@ -4066,12 +4082,6 @@ var depositCardWrapStyle = {
|
|
|
4066
4082
|
position: "relative",
|
|
4067
4083
|
marginBottom: 20
|
|
4068
4084
|
};
|
|
4069
|
-
var depositCardStyle = (tokens) => ({
|
|
4070
|
-
background: tokens.bgInput,
|
|
4071
|
-
border: `1px solid ${tokens.border}`,
|
|
4072
|
-
borderRadius: tokens.radiusLg,
|
|
4073
|
-
padding: "16px 20px"
|
|
4074
|
-
});
|
|
4075
4085
|
var depositLabelStyle = (color) => ({
|
|
4076
4086
|
fontSize: "0.75rem",
|
|
4077
4087
|
fontWeight: 500,
|
|
@@ -4105,22 +4115,19 @@ var tokenIconWrapStyle2 = {
|
|
|
4105
4115
|
width: 36,
|
|
4106
4116
|
height: 36
|
|
4107
4117
|
};
|
|
4108
|
-
var
|
|
4109
|
-
position: "absolute",
|
|
4110
|
-
bottom: -1,
|
|
4111
|
-
right: -3
|
|
4112
|
-
};
|
|
4113
|
-
var walletBalanceRowStyle = (clickable) => ({
|
|
4118
|
+
var walletBalanceRowStyle = {
|
|
4114
4119
|
display: "flex",
|
|
4115
4120
|
alignItems: "center",
|
|
4121
|
+
justifyContent: "center",
|
|
4116
4122
|
gap: 8,
|
|
4117
4123
|
background: "transparent",
|
|
4118
4124
|
border: "none",
|
|
4119
4125
|
padding: 0,
|
|
4120
|
-
|
|
4126
|
+
width: "100%",
|
|
4127
|
+
cursor: "pointer",
|
|
4121
4128
|
fontFamily: "inherit",
|
|
4122
4129
|
outline: "none"
|
|
4123
|
-
}
|
|
4130
|
+
};
|
|
4124
4131
|
var providerLogoStyle = {
|
|
4125
4132
|
width: 18,
|
|
4126
4133
|
height: 18,
|
|
@@ -4145,16 +4152,11 @@ var walletBalanceStyle = (color) => ({
|
|
|
4145
4152
|
color
|
|
4146
4153
|
});
|
|
4147
4154
|
var accountDropdownOuterStyle = (tokens) => ({
|
|
4148
|
-
position: "absolute",
|
|
4149
|
-
top: "100%",
|
|
4150
|
-
left: 0,
|
|
4151
|
-
right: 0,
|
|
4152
4155
|
marginTop: 4,
|
|
4153
4156
|
background: tokens.bgCard,
|
|
4154
4157
|
border: `1px solid ${tokens.border}`,
|
|
4155
4158
|
borderRadius: tokens.radiusLg,
|
|
4156
4159
|
boxShadow: tokens.shadowLg,
|
|
4157
|
-
zIndex: 50,
|
|
4158
4160
|
padding: "12px 14px 14px"
|
|
4159
4161
|
});
|
|
4160
4162
|
var accountDropdownLabelStyle = (color) => ({
|
|
@@ -4243,7 +4245,7 @@ var addAccountBtnStyle = (tokens) => ({
|
|
|
4243
4245
|
padding: "12px 16px",
|
|
4244
4246
|
background: "transparent",
|
|
4245
4247
|
border: "none",
|
|
4246
|
-
color: tokens.
|
|
4248
|
+
color: tokens.textMuted,
|
|
4247
4249
|
fontWeight: 600,
|
|
4248
4250
|
fontSize: "0.85rem",
|
|
4249
4251
|
cursor: "pointer",
|
|
@@ -4370,7 +4372,7 @@ function SuccessScreen({
|
|
|
4370
4372
|
] }),
|
|
4371
4373
|
children: [
|
|
4372
4374
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
4373
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
4375
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle5, children: [
|
|
4374
4376
|
succeeded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4375
4377
|
/* @__PURE__ */ jsx(IconCircle, { variant: "success", size: 64, children: /* @__PURE__ */ jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: tokens.success }) }) }),
|
|
4376
4378
|
/* @__PURE__ */ jsxs("h2", { style: headingStyle7(tokens.text), children: [
|
|
@@ -4378,14 +4380,14 @@ function SuccessScreen({
|
|
|
4378
4380
|
amount.toFixed(2),
|
|
4379
4381
|
" deposited"
|
|
4380
4382
|
] }),
|
|
4381
|
-
merchantName && /* @__PURE__ */ jsxs("p", { style:
|
|
4383
|
+
merchantName && /* @__PURE__ */ jsxs("p", { style: subtitleStyle5(tokens.textSecondary), children: [
|
|
4382
4384
|
"to ",
|
|
4383
4385
|
merchantName
|
|
4384
4386
|
] })
|
|
4385
4387
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4386
4388
|
/* @__PURE__ */ jsx(IconCircle, { variant: "error", size: 64, children: /* @__PURE__ */ jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z", fill: tokens.error }) }) }),
|
|
4387
4389
|
/* @__PURE__ */ jsx("h2", { style: headingStyle7(tokens.text), children: "Transfer failed" }),
|
|
4388
|
-
error && /* @__PURE__ */ jsx("p", { style:
|
|
4390
|
+
error && /* @__PURE__ */ jsx("p", { style: subtitleStyle5(tokens.error), children: error })
|
|
4389
4391
|
] }),
|
|
4390
4392
|
/* @__PURE__ */ jsxs("div", { style: summaryCardStyle(tokens), children: [
|
|
4391
4393
|
sourceName && /* @__PURE__ */ jsxs("div", { style: summaryRowStyle, children: [
|
|
@@ -4417,7 +4419,7 @@ function SuccessScreen({
|
|
|
4417
4419
|
}
|
|
4418
4420
|
);
|
|
4419
4421
|
}
|
|
4420
|
-
var
|
|
4422
|
+
var contentStyle5 = {
|
|
4421
4423
|
flex: 1,
|
|
4422
4424
|
display: "flex",
|
|
4423
4425
|
flexDirection: "column",
|
|
@@ -4431,7 +4433,7 @@ var headingStyle7 = (color) => ({
|
|
|
4431
4433
|
color,
|
|
4432
4434
|
margin: "20px 0 4px"
|
|
4433
4435
|
});
|
|
4434
|
-
var
|
|
4436
|
+
var subtitleStyle5 = (color) => ({
|
|
4435
4437
|
fontSize: "0.9rem",
|
|
4436
4438
|
color,
|
|
4437
4439
|
margin: "0 0 20px"
|
|
@@ -4539,8 +4541,8 @@ function SelectSourceScreen({
|
|
|
4539
4541
|
onLogout
|
|
4540
4542
|
}
|
|
4541
4543
|
),
|
|
4542
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
4543
|
-
/* @__PURE__ */ jsx("label", { style:
|
|
4544
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle6(tokens.textMuted), children: "Choose which chain and token to pay from." }),
|
|
4545
|
+
/* @__PURE__ */ jsx("label", { style: labelStyle4(tokens.textSecondary), children: "Chain" }),
|
|
4544
4546
|
/* @__PURE__ */ jsx("div", { style: optionListStyle, children: choices.map((chain) => {
|
|
4545
4547
|
const isSelected = chain.chainName === selectedChainName;
|
|
4546
4548
|
const isRecommended = chain.chainName === recommended?.chainName;
|
|
@@ -4568,7 +4570,7 @@ function SelectSourceScreen({
|
|
|
4568
4570
|
);
|
|
4569
4571
|
}) }),
|
|
4570
4572
|
tokenChoices.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4571
|
-
/* @__PURE__ */ jsx("label", { style:
|
|
4573
|
+
/* @__PURE__ */ jsx("label", { style: labelStyle4(tokens.textSecondary), children: "Token" }),
|
|
4572
4574
|
/* @__PURE__ */ jsx("div", { style: optionListStyle, children: tokenChoices.map((token) => {
|
|
4573
4575
|
const isSelected = token.tokenSymbol === selectedTokenSymbol;
|
|
4574
4576
|
return /* @__PURE__ */ jsxs(
|
|
@@ -4596,13 +4598,13 @@ function SelectSourceScreen({
|
|
|
4596
4598
|
}
|
|
4597
4599
|
);
|
|
4598
4600
|
}
|
|
4599
|
-
var
|
|
4601
|
+
var subtitleStyle6 = (color) => ({
|
|
4600
4602
|
fontSize: "0.85rem",
|
|
4601
4603
|
color,
|
|
4602
4604
|
margin: "0 0 20px",
|
|
4603
4605
|
lineHeight: 1.5
|
|
4604
4606
|
});
|
|
4605
|
-
var
|
|
4607
|
+
var labelStyle4 = (color) => ({
|
|
4606
4608
|
display: "block",
|
|
4607
4609
|
fontSize: "0.75rem",
|
|
4608
4610
|
fontWeight: 600,
|
|
@@ -4712,8 +4714,8 @@ function AdvancedSourceScreen({
|
|
|
4712
4714
|
}
|
|
4713
4715
|
),
|
|
4714
4716
|
/* @__PURE__ */ jsx("h2", { style: headingStyle8(tokens.text), children: "Set up One-Tap deposits" }),
|
|
4715
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
4716
|
-
/* @__PURE__ */ jsx("label", { style:
|
|
4717
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
|
|
4718
|
+
/* @__PURE__ */ jsx("label", { style: labelStyle5(tokens.textSecondary), children: "Select tokens to approve" }),
|
|
4717
4719
|
/* @__PURE__ */ jsx("div", { style: chainListStyle, children: choices.map((chain) => {
|
|
4718
4720
|
const isExpanded = expandedChain === chain.chainName;
|
|
4719
4721
|
const chainHasSelection = localChain === chain.chainName;
|
|
@@ -4782,13 +4784,13 @@ var headingStyle8 = (color) => ({
|
|
|
4782
4784
|
color,
|
|
4783
4785
|
margin: "8px 0 4px"
|
|
4784
4786
|
});
|
|
4785
|
-
var
|
|
4787
|
+
var subtitleStyle7 = (color) => ({
|
|
4786
4788
|
fontSize: "0.86rem",
|
|
4787
4789
|
color,
|
|
4788
4790
|
margin: "0 0 20px",
|
|
4789
4791
|
lineHeight: 1.5
|
|
4790
4792
|
});
|
|
4791
|
-
var
|
|
4793
|
+
var labelStyle5 = (color) => ({
|
|
4792
4794
|
display: "block",
|
|
4793
4795
|
fontSize: "0.75rem",
|
|
4794
4796
|
fontWeight: 600,
|
|
@@ -4910,7 +4912,7 @@ function TransferStatusScreen({
|
|
|
4910
4912
|
const steps = buildSteps(phase);
|
|
4911
4913
|
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
|
|
4912
4914
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
4913
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
4915
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle6, children: [
|
|
4914
4916
|
/* @__PURE__ */ jsx(Spinner, { size: 64 }),
|
|
4915
4917
|
/* @__PURE__ */ jsx("h2", { style: headingStyle9(tokens.text), children: "Depositing your money..." }),
|
|
4916
4918
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle6(tokens), children: error }),
|
|
@@ -4918,7 +4920,7 @@ function TransferStatusScreen({
|
|
|
4918
4920
|
] })
|
|
4919
4921
|
] });
|
|
4920
4922
|
}
|
|
4921
|
-
var
|
|
4923
|
+
var contentStyle6 = {
|
|
4922
4924
|
flex: 1,
|
|
4923
4925
|
display: "flex",
|
|
4924
4926
|
flexDirection: "column",
|
|
@@ -5009,14 +5011,14 @@ function OpenWalletScreen({
|
|
|
5009
5011
|
] }),
|
|
5010
5012
|
children: [
|
|
5011
5013
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
5012
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
5014
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle7, children: [
|
|
5013
5015
|
/* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
|
|
5014
5016
|
/* @__PURE__ */ jsxs("h2", { style: headingStyle10(tokens.text), children: [
|
|
5015
5017
|
"Setting up ",
|
|
5016
5018
|
displayName,
|
|
5017
5019
|
"..."
|
|
5018
5020
|
] }),
|
|
5019
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
5021
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle8(tokens.textSecondary), children: "Approve the connection in your wallet extension." }),
|
|
5020
5022
|
/* @__PURE__ */ jsxs("div", { style: waitingBadgeStyle(tokens), children: [
|
|
5021
5023
|
/* @__PURE__ */ jsx(Spinner, { size: 14 }),
|
|
5022
5024
|
/* @__PURE__ */ jsx("span", { children: "Waiting for authorization..." })
|
|
@@ -5042,10 +5044,10 @@ function OpenWalletScreen({
|
|
|
5042
5044
|
] }),
|
|
5043
5045
|
children: [
|
|
5044
5046
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
5045
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
5047
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle7, children: [
|
|
5046
5048
|
/* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
|
|
5047
5049
|
/* @__PURE__ */ jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
|
|
5048
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
5050
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle8(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
|
|
5049
5051
|
!loading && /* @__PURE__ */ jsxs("div", { style: waitingBadgeStyle(tokens), children: [
|
|
5050
5052
|
/* @__PURE__ */ jsx(Spinner, { size: 14 }),
|
|
5051
5053
|
/* @__PURE__ */ jsx("span", { children: "Waiting for authorization..." })
|
|
@@ -5055,7 +5057,7 @@ function OpenWalletScreen({
|
|
|
5055
5057
|
}
|
|
5056
5058
|
);
|
|
5057
5059
|
}
|
|
5058
|
-
var
|
|
5060
|
+
var contentStyle7 = {
|
|
5059
5061
|
flex: 1,
|
|
5060
5062
|
display: "flex",
|
|
5061
5063
|
flexDirection: "column",
|
|
@@ -5092,7 +5094,7 @@ var headingStyle10 = (color) => ({
|
|
|
5092
5094
|
color,
|
|
5093
5095
|
margin: "20px 0 8px"
|
|
5094
5096
|
});
|
|
5095
|
-
var
|
|
5097
|
+
var subtitleStyle8 = (color) => ({
|
|
5096
5098
|
fontSize: "0.9rem",
|
|
5097
5099
|
color,
|
|
5098
5100
|
margin: "0 0 24px",
|
|
@@ -5141,10 +5143,10 @@ function ConfirmSignScreen({
|
|
|
5141
5143
|
] }),
|
|
5142
5144
|
children: [
|
|
5143
5145
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
5144
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
5146
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle8, children: [
|
|
5145
5147
|
logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle3 }) : /* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
5146
5148
|
/* @__PURE__ */ jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
|
|
5147
|
-
/* @__PURE__ */ jsxs("p", { style:
|
|
5149
|
+
/* @__PURE__ */ jsxs("p", { style: subtitleStyle9(tokens.textSecondary), children: [
|
|
5148
5150
|
displayName,
|
|
5149
5151
|
" approved the connection. Tap below to confirm your payment."
|
|
5150
5152
|
] }),
|
|
@@ -5157,7 +5159,7 @@ function ConfirmSignScreen({
|
|
|
5157
5159
|
}
|
|
5158
5160
|
);
|
|
5159
5161
|
}
|
|
5160
|
-
var
|
|
5162
|
+
var contentStyle8 = {
|
|
5161
5163
|
flex: 1,
|
|
5162
5164
|
display: "flex",
|
|
5163
5165
|
flexDirection: "column",
|
|
@@ -5179,7 +5181,7 @@ var headingStyle11 = (color) => ({
|
|
|
5179
5181
|
color,
|
|
5180
5182
|
margin: "20px 0 8px"
|
|
5181
5183
|
});
|
|
5182
|
-
var
|
|
5184
|
+
var subtitleStyle9 = (color) => ({
|
|
5183
5185
|
fontSize: "0.9rem",
|
|
5184
5186
|
color,
|
|
5185
5187
|
margin: "0 0 24px",
|
|
@@ -5220,7 +5222,8 @@ function TokenPickerScreen({
|
|
|
5220
5222
|
onAuthorizeToken,
|
|
5221
5223
|
onBack,
|
|
5222
5224
|
onLogout,
|
|
5223
|
-
depositAmount
|
|
5225
|
+
depositAmount,
|
|
5226
|
+
selectedTokenSymbol
|
|
5224
5227
|
}) {
|
|
5225
5228
|
const { tokens: t } = useSwypeConfig();
|
|
5226
5229
|
const entries = [];
|
|
@@ -5249,24 +5252,28 @@ function TokenPickerScreen({
|
|
|
5249
5252
|
};
|
|
5250
5253
|
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
|
|
5251
5254
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
5252
|
-
|
|
5253
|
-
depositAmount != null && /* @__PURE__ */ jsxs("div", { style: depositCardStyle2(t), children: [
|
|
5255
|
+
depositAmount != null && /* @__PURE__ */ jsxs("div", { children: [
|
|
5254
5256
|
/* @__PURE__ */ jsx("div", { style: depositLabelStyle2(t.textMuted), children: "Depositing" }),
|
|
5255
5257
|
/* @__PURE__ */ jsxs("div", { style: depositAmountRowStyle, children: [
|
|
5256
5258
|
/* @__PURE__ */ jsxs("div", { style: depositAmountStyle(t.text), children: [
|
|
5257
5259
|
"$",
|
|
5258
|
-
depositAmount.toLocaleString("en-US", { minimumFractionDigits:
|
|
5260
|
+
depositAmount.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
5259
5261
|
] }),
|
|
5260
|
-
/* @__PURE__ */ jsxs(
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5262
|
+
/* @__PURE__ */ jsxs(
|
|
5263
|
+
"button",
|
|
5264
|
+
{
|
|
5265
|
+
type: "button",
|
|
5266
|
+
onClick: onBack,
|
|
5267
|
+
style: tokenIconButtonStyle3,
|
|
5268
|
+
children: [
|
|
5269
|
+
/* @__PURE__ */ jsx("div", { style: tokenIconWrapStyle3, children: selectedTokenSymbol && TOKEN_LOGOS[selectedTokenSymbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[selectedTokenSymbol], alt: selectedTokenSymbol, width: 36, height: 36, style: { borderRadius: "50%" } }) : /* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 36 36", fill: "none", children: [
|
|
5270
|
+
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
|
|
5271
|
+
/* @__PURE__ */ jsx("text", { x: "18", y: "23", textAnchor: "middle", fontSize: "18", fill: "#fff", fontWeight: "700", children: "$" })
|
|
5272
|
+
] }) }),
|
|
5273
|
+
/* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.5 }, children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6", stroke: t.textMuted, strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
5274
|
+
]
|
|
5275
|
+
}
|
|
5276
|
+
)
|
|
5270
5277
|
] })
|
|
5271
5278
|
] }),
|
|
5272
5279
|
/* @__PURE__ */ jsx("div", { style: sectionLabelStyle(t.textMuted), children: "Choose token" }),
|
|
@@ -5279,7 +5286,7 @@ function TokenPickerScreen({
|
|
|
5279
5286
|
onClick: () => handleSelect(entry),
|
|
5280
5287
|
style: tokenRowStyle2(t),
|
|
5281
5288
|
children: [
|
|
5282
|
-
/* @__PURE__ */ jsx("div", { style: tokenIconCircleStyle(t), children: /* @__PURE__ */ jsx("span", { style: tokenIconTextStyle(t.textMuted), children: "$" }) }),
|
|
5289
|
+
/* @__PURE__ */ jsx("div", { style: tokenIconCircleStyle(t, !!TOKEN_LOGOS[entry.tokenSymbol]), children: TOKEN_LOGOS[entry.tokenSymbol] ? /* @__PURE__ */ jsx("img", { src: TOKEN_LOGOS[entry.tokenSymbol], alt: entry.tokenSymbol, style: tokenLogoImgStyle }) : /* @__PURE__ */ jsx("span", { style: tokenIconTextStyle(t.textMuted), children: "$" }) }),
|
|
5283
5290
|
/* @__PURE__ */ jsxs("div", { style: tokenInfoStyle2, children: [
|
|
5284
5291
|
/* @__PURE__ */ jsxs("div", { style: tokenNameRowStyle, children: [
|
|
5285
5292
|
/* @__PURE__ */ jsx("span", { style: tokenSymbolTextStyle(t.text), children: entry.tokenSymbol }),
|
|
@@ -5302,22 +5309,6 @@ function TokenPickerScreen({
|
|
|
5302
5309
|
}) })
|
|
5303
5310
|
] });
|
|
5304
5311
|
}
|
|
5305
|
-
var mascotWrapStyle = {
|
|
5306
|
-
display: "flex",
|
|
5307
|
-
justifyContent: "center",
|
|
5308
|
-
marginBottom: 16
|
|
5309
|
-
};
|
|
5310
|
-
var mascotImgStyle = {
|
|
5311
|
-
width: 36,
|
|
5312
|
-
height: 36
|
|
5313
|
-
};
|
|
5314
|
-
var depositCardStyle2 = (tokens) => ({
|
|
5315
|
-
background: tokens.bgInput,
|
|
5316
|
-
border: `1px solid ${tokens.border}`,
|
|
5317
|
-
borderRadius: tokens.radiusLg,
|
|
5318
|
-
padding: "16px 20px",
|
|
5319
|
-
marginBottom: 24
|
|
5320
|
-
});
|
|
5321
5312
|
var depositLabelStyle2 = (color) => ({
|
|
5322
5313
|
fontSize: "0.75rem",
|
|
5323
5314
|
fontWeight: 500,
|
|
@@ -5330,22 +5321,27 @@ var depositAmountRowStyle = {
|
|
|
5330
5321
|
justifyContent: "space-between"
|
|
5331
5322
|
};
|
|
5332
5323
|
var depositAmountStyle = (color) => ({
|
|
5333
|
-
fontSize: "2.
|
|
5324
|
+
fontSize: "2.4rem",
|
|
5334
5325
|
fontWeight: 700,
|
|
5335
5326
|
letterSpacing: "-0.02em",
|
|
5336
5327
|
color
|
|
5337
5328
|
});
|
|
5329
|
+
var tokenIconButtonStyle3 = {
|
|
5330
|
+
display: "flex",
|
|
5331
|
+
alignItems: "center",
|
|
5332
|
+
gap: 4,
|
|
5333
|
+
background: "transparent",
|
|
5334
|
+
border: "none",
|
|
5335
|
+
cursor: "pointer",
|
|
5336
|
+
padding: 0,
|
|
5337
|
+
flexShrink: 0
|
|
5338
|
+
};
|
|
5338
5339
|
var tokenIconWrapStyle3 = {
|
|
5339
5340
|
position: "relative",
|
|
5340
|
-
width:
|
|
5341
|
-
height:
|
|
5341
|
+
width: 36,
|
|
5342
|
+
height: 36,
|
|
5342
5343
|
flexShrink: 0
|
|
5343
5344
|
};
|
|
5344
|
-
var checkBadgeStyle3 = {
|
|
5345
|
-
position: "absolute",
|
|
5346
|
-
bottom: -1,
|
|
5347
|
-
right: -3
|
|
5348
|
-
};
|
|
5349
5345
|
var sectionLabelStyle = (color) => ({
|
|
5350
5346
|
fontSize: "0.84rem",
|
|
5351
5347
|
fontWeight: 500,
|
|
@@ -5370,16 +5366,23 @@ var tokenRowStyle2 = (tokens) => ({
|
|
|
5370
5366
|
textAlign: "left",
|
|
5371
5367
|
width: "100%"
|
|
5372
5368
|
});
|
|
5373
|
-
var tokenIconCircleStyle = (tokens) => ({
|
|
5369
|
+
var tokenIconCircleStyle = (tokens, hasLogo) => ({
|
|
5374
5370
|
width: 36,
|
|
5375
5371
|
height: 36,
|
|
5376
5372
|
borderRadius: "50%",
|
|
5377
|
-
border: `1.5px solid ${tokens.border}`,
|
|
5373
|
+
border: hasLogo ? "none" : `1.5px solid ${tokens.border}`,
|
|
5378
5374
|
display: "flex",
|
|
5379
5375
|
alignItems: "center",
|
|
5380
5376
|
justifyContent: "center",
|
|
5381
|
-
flexShrink: 0
|
|
5377
|
+
flexShrink: 0,
|
|
5378
|
+
overflow: "hidden"
|
|
5382
5379
|
});
|
|
5380
|
+
var tokenLogoImgStyle = {
|
|
5381
|
+
width: 36,
|
|
5382
|
+
height: 36,
|
|
5383
|
+
borderRadius: "50%",
|
|
5384
|
+
objectFit: "cover"
|
|
5385
|
+
};
|
|
5383
5386
|
var tokenIconTextStyle = (color) => ({
|
|
5384
5387
|
fontSize: "1rem",
|
|
5385
5388
|
fontWeight: 700,
|
|
@@ -5643,7 +5646,8 @@ function StepRendererContent({
|
|
|
5643
5646
|
onAdvanced: handlers.onSelectToken,
|
|
5644
5647
|
selectedSourceLabel: effectiveSourceLabel,
|
|
5645
5648
|
loading: savingOneTapLimit,
|
|
5646
|
-
error: state.error
|
|
5649
|
+
error: state.error,
|
|
5650
|
+
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5647
5651
|
}
|
|
5648
5652
|
);
|
|
5649
5653
|
}
|
|
@@ -5687,7 +5691,8 @@ function StepRendererContent({
|
|
|
5687
5691
|
onAuthorizeAccount: handlers.onContinueConnection,
|
|
5688
5692
|
onAddProvider: () => handlers.onNavigate("wallet-picker"),
|
|
5689
5693
|
onSelectToken: handlers.onSelectToken,
|
|
5690
|
-
selectedSourceLabel
|
|
5694
|
+
selectedSourceLabel,
|
|
5695
|
+
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5691
5696
|
}
|
|
5692
5697
|
);
|
|
5693
5698
|
}
|
|
@@ -5704,7 +5709,8 @@ function StepRendererContent({
|
|
|
5704
5709
|
onAuthorizeToken: handlers.onAuthorizeToken,
|
|
5705
5710
|
onBack: () => handlers.onNavigate(state.previousStep === "setup" ? "setup" : "deposit"),
|
|
5706
5711
|
onLogout: handlers.onLogout,
|
|
5707
|
-
depositAmount: depositAmount ?? void 0
|
|
5712
|
+
depositAmount: depositAmount ?? void 0,
|
|
5713
|
+
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5708
5714
|
}
|
|
5709
5715
|
);
|
|
5710
5716
|
}
|
|
@@ -5781,7 +5787,8 @@ function StepRendererContent({
|
|
|
5781
5787
|
onSelectAccount: handlers.onSelectAccount,
|
|
5782
5788
|
onAuthorizeAccount: handlers.onContinueConnection,
|
|
5783
5789
|
onAddProvider: () => handlers.onNavigate("wallet-picker"),
|
|
5784
|
-
selectedSourceLabel
|
|
5790
|
+
selectedSourceLabel,
|
|
5791
|
+
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5785
5792
|
}
|
|
5786
5793
|
);
|
|
5787
5794
|
}
|