@swype-org/react-sdk 0.1.192 → 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 +168 -169
- 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 +168 -169
- 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,17 +2297,17 @@ 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
2303
|
/* @__PURE__ */ jsxs("div", { style: sectionStyle("flex-end"), children: [
|
|
2289
|
-
/* @__PURE__ */ jsx("span", { style:
|
|
2304
|
+
/* @__PURE__ */ jsx("span", { style: labelStyle2(tokens.text), children: "Link" }),
|
|
2290
2305
|
/* @__PURE__ */ jsx("span", { style: dotStyle(tokens.accent) })
|
|
2291
2306
|
] }),
|
|
2292
2307
|
/* @__PURE__ */ jsx("span", { style: lineStyle(tokens.textMuted) }),
|
|
2293
2308
|
/* @__PURE__ */ jsxs("div", { style: sectionStyle("flex-start"), children: [
|
|
2294
2309
|
/* @__PURE__ */ jsx("span", { style: dotStyle(tokens.textMuted) }),
|
|
2295
|
-
/* @__PURE__ */ jsx("span", { style:
|
|
2310
|
+
/* @__PURE__ */ jsx("span", { style: labelStyle2(tokens.textMuted), children: "Deposit" })
|
|
2296
2311
|
] })
|
|
2297
2312
|
] });
|
|
2298
2313
|
}
|
|
@@ -2323,7 +2338,7 @@ var lineStyle = (color) => ({
|
|
|
2323
2338
|
opacity: 0.4,
|
|
2324
2339
|
flexShrink: 0
|
|
2325
2340
|
});
|
|
2326
|
-
var
|
|
2341
|
+
var labelStyle2 = (color) => ({
|
|
2327
2342
|
fontSize: "0.82rem",
|
|
2328
2343
|
fontWeight: 600,
|
|
2329
2344
|
color,
|
|
@@ -2738,7 +2753,7 @@ function StepList({ steps }) {
|
|
|
2738
2753
|
}
|
|
2739
2754
|
),
|
|
2740
2755
|
/* @__PURE__ */ jsxs("div", { style: labelContainerStyle, children: [
|
|
2741
|
-
/* @__PURE__ */ jsx("span", { style:
|
|
2756
|
+
/* @__PURE__ */ jsx("span", { style: labelStyle3(isComplete || isActive ? tokens.text : tokens.textMuted), children: step.label }),
|
|
2742
2757
|
step.detail && /* @__PURE__ */ jsx("span", { style: detailStyle(tokens.textMuted), children: step.detail })
|
|
2743
2758
|
] })
|
|
2744
2759
|
] }, i);
|
|
@@ -2779,7 +2794,7 @@ var labelContainerStyle = {
|
|
|
2779
2794
|
display: "flex",
|
|
2780
2795
|
flexDirection: "column"
|
|
2781
2796
|
};
|
|
2782
|
-
var
|
|
2797
|
+
var labelStyle3 = (color) => ({
|
|
2783
2798
|
fontSize: "0.9rem",
|
|
2784
2799
|
fontWeight: 500,
|
|
2785
2800
|
color
|
|
@@ -2832,7 +2847,7 @@ function LoginScreen({
|
|
|
2832
2847
|
right: merchantInitials ? /* @__PURE__ */ jsx("div", { style: avatarStyle(tokens), children: merchantInitials }) : void 0
|
|
2833
2848
|
}
|
|
2834
2849
|
),
|
|
2835
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
2850
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle, children: [
|
|
2836
2851
|
/* @__PURE__ */ jsx("img", { src: SWYPE_LOGO, alt: "Swype", style: logoStyle }),
|
|
2837
2852
|
/* @__PURE__ */ jsx("h2", { style: headingStyle(tokens.text), children: "Your Money. Any App.\nOne Tap." }),
|
|
2838
2853
|
error && /* @__PURE__ */ jsx("div", { style: errorStyle(tokens), children: error }),
|
|
@@ -2867,7 +2882,7 @@ function socialLabel(provider) {
|
|
|
2867
2882
|
return "X";
|
|
2868
2883
|
}
|
|
2869
2884
|
}
|
|
2870
|
-
var
|
|
2885
|
+
var contentStyle = {
|
|
2871
2886
|
textAlign: "center",
|
|
2872
2887
|
flex: 1,
|
|
2873
2888
|
display: "flex",
|
|
@@ -3008,7 +3023,7 @@ function OtpVerifyScreen({
|
|
|
3008
3023
|
] }),
|
|
3009
3024
|
children: [
|
|
3010
3025
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
3011
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3026
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle2, children: [
|
|
3012
3027
|
/* @__PURE__ */ jsx("h2", { style: headingStyle2(tokens.text), children: "Confirm it is you" }),
|
|
3013
3028
|
/* @__PURE__ */ jsxs("p", { style: subtitleStyle(tokens.textSecondary), children: [
|
|
3014
3029
|
"We sent a 6-digit code to",
|
|
@@ -3032,7 +3047,7 @@ function OtpVerifyScreen({
|
|
|
3032
3047
|
}
|
|
3033
3048
|
);
|
|
3034
3049
|
}
|
|
3035
|
-
var
|
|
3050
|
+
var contentStyle2 = {
|
|
3036
3051
|
textAlign: "center",
|
|
3037
3052
|
display: "flex",
|
|
3038
3053
|
flexDirection: "column",
|
|
@@ -3097,7 +3112,7 @@ function PasskeyScreen({
|
|
|
3097
3112
|
] }),
|
|
3098
3113
|
children: [
|
|
3099
3114
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
3100
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3115
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle3, children: [
|
|
3101
3116
|
/* @__PURE__ */ jsx("h2", { style: headingStyle3(tokens.text), children: "Secure your account with a passkey" }),
|
|
3102
3117
|
/* @__PURE__ */ jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "This enables secure one-tap deposits on this device" }),
|
|
3103
3118
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle2(tokens), children: error })
|
|
@@ -3106,7 +3121,7 @@ function PasskeyScreen({
|
|
|
3106
3121
|
}
|
|
3107
3122
|
);
|
|
3108
3123
|
}
|
|
3109
|
-
var
|
|
3124
|
+
var contentStyle3 = {
|
|
3110
3125
|
textAlign: "center",
|
|
3111
3126
|
flex: 1,
|
|
3112
3127
|
display: "flex",
|
|
@@ -3532,7 +3547,8 @@ function SetupScreen({
|
|
|
3532
3547
|
onLogout,
|
|
3533
3548
|
onAdvanced,
|
|
3534
3549
|
loading,
|
|
3535
|
-
error
|
|
3550
|
+
error,
|
|
3551
|
+
selectedTokenSymbol
|
|
3536
3552
|
}) {
|
|
3537
3553
|
const { tokens } = useSwypeConfig();
|
|
3538
3554
|
const effectiveMax = DEFAULT_MAX;
|
|
@@ -3621,7 +3637,7 @@ function SetupScreen({
|
|
|
3621
3637
|
style: tokenIconButtonStyle(!!onAdvanced),
|
|
3622
3638
|
children: [
|
|
3623
3639
|
/* @__PURE__ */ jsxs("div", { style: tokenIconWrapStyle, children: [
|
|
3624
|
-
/* @__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: [
|
|
3625
3641
|
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "18", r: "18", fill: "#2DB84B" }),
|
|
3626
3642
|
/* @__PURE__ */ jsx("text", { x: "18", y: "23", textAnchor: "middle", fontSize: "18", fill: "#fff", fontWeight: "700", children: "$" })
|
|
3627
3643
|
] }),
|
|
@@ -3767,8 +3783,8 @@ function SetupStatusScreen({
|
|
|
3767
3783
|
if (complete) {
|
|
3768
3784
|
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
|
|
3769
3785
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack: onContinue }),
|
|
3770
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3771
|
-
/* @__PURE__ */ jsx("img", { src:
|
|
3786
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle4, children: [
|
|
3787
|
+
/* @__PURE__ */ jsx("img", { src: SWYPE_LOGO, alt: "Swype", style: mascotStyle2 }),
|
|
3772
3788
|
/* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Done!" }),
|
|
3773
3789
|
/* @__PURE__ */ jsx("p", { style: subtitleStyle4(tokens.textSecondary), children: "Return to the app to try one-tap deposits." })
|
|
3774
3790
|
] })
|
|
@@ -3780,7 +3796,7 @@ function SetupStatusScreen({
|
|
|
3780
3796
|
];
|
|
3781
3797
|
return /* @__PURE__ */ jsxs(ScreenLayout, { children: [
|
|
3782
3798
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
3783
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
3799
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle4, children: [
|
|
3784
3800
|
/* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
3785
3801
|
/* @__PURE__ */ jsx("h2", { style: headingStyle6(tokens.text), children: "Setting up One-Tap..." }),
|
|
3786
3802
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle4(tokens), children: error }),
|
|
@@ -3789,7 +3805,7 @@ function SetupStatusScreen({
|
|
|
3789
3805
|
] })
|
|
3790
3806
|
] });
|
|
3791
3807
|
}
|
|
3792
|
-
var
|
|
3808
|
+
var contentStyle4 = {
|
|
3793
3809
|
flex: 1,
|
|
3794
3810
|
display: "flex",
|
|
3795
3811
|
flexDirection: "column",
|
|
@@ -3860,7 +3876,8 @@ function DepositScreen({
|
|
|
3860
3876
|
onAuthorizeAccount,
|
|
3861
3877
|
onAddProvider,
|
|
3862
3878
|
onSelectToken,
|
|
3863
|
-
selectedSourceLabel
|
|
3879
|
+
selectedSourceLabel,
|
|
3880
|
+
selectedTokenSymbol
|
|
3864
3881
|
}) {
|
|
3865
3882
|
const { tokens } = useSwypeConfig();
|
|
3866
3883
|
const amount = initialAmount;
|
|
@@ -3879,7 +3896,6 @@ function DepositScreen({
|
|
|
3879
3896
|
const selectedAccount = accounts?.find((a) => a.id === selectedAccountId);
|
|
3880
3897
|
const selectedProviderName = selectedAccount?.name ?? "Wallet";
|
|
3881
3898
|
const selectedProviderLogo = KNOWN_LOGOS[selectedProviderName.toLowerCase()];
|
|
3882
|
-
const hasMultipleAccounts = accounts != null && accounts.length > 1;
|
|
3883
3899
|
const isLowBalance = availableBalance < MIN_DEPOSIT;
|
|
3884
3900
|
const exceedsLimit = remainingLimit != null && amount > remainingLimit && !isLowBalance;
|
|
3885
3901
|
const canDeposit = amount >= MIN_DEPOSIT && !exceedsLimit && !isLowBalance && !processing;
|
|
@@ -3931,27 +3947,18 @@ function DepositScreen({
|
|
|
3931
3947
|
ScreenLayout,
|
|
3932
3948
|
{
|
|
3933
3949
|
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3934
|
-
exceedsLimit && onIncreaseLimit ? /* @__PURE__ */
|
|
3935
|
-
/* @__PURE__ */ jsx(PrimaryButton, { onClick: onIncreaseLimit, loading: increasingLimit, children: "Increase limit" }),
|
|
3936
|
-
/* @__PURE__ */ jsxs("p", { style: limitExceededHintStyle(tokens.warning), children: [
|
|
3937
|
-
"Your deposit of $",
|
|
3938
|
-
amount.toFixed(2),
|
|
3939
|
-
" exceeds your One-Tap limit of $",
|
|
3940
|
-
remainingLimit?.toFixed(2) ?? "0.00",
|
|
3941
|
-
". Increase your limit to continue."
|
|
3942
|
-
] })
|
|
3943
|
-
] }) : /* @__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" })),
|
|
3944
3951
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3945
3952
|
] }),
|
|
3946
3953
|
children: [
|
|
3947
|
-
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
3954
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
3948
3955
|
/* @__PURE__ */ jsxs("div", { ref: pickerRef, style: depositCardWrapStyle, children: [
|
|
3949
|
-
/* @__PURE__ */ jsxs("div", {
|
|
3956
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3950
3957
|
/* @__PURE__ */ jsx("div", { style: depositLabelStyle(tokens.textMuted), children: "Depositing" }),
|
|
3951
3958
|
/* @__PURE__ */ jsxs("div", { style: amountRowStyle2, children: [
|
|
3952
3959
|
/* @__PURE__ */ jsxs("div", { style: amountValueStyle(tokens.text), children: [
|
|
3953
3960
|
"$",
|
|
3954
|
-
amount.toLocaleString("en-US", { minimumFractionDigits:
|
|
3961
|
+
amount.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
3955
3962
|
] }),
|
|
3956
3963
|
/* @__PURE__ */ jsxs(
|
|
3957
3964
|
"button",
|
|
@@ -3960,34 +3967,28 @@ function DepositScreen({
|
|
|
3960
3967
|
onClick: onSelectToken,
|
|
3961
3968
|
style: tokenIconButtonStyle2(!!onSelectToken),
|
|
3962
3969
|
children: [
|
|
3963
|
-
/* @__PURE__ */
|
|
3964
|
-
/* @__PURE__ */
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
] }),
|
|
3968
|
-
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", style: checkBadgeStyle2, children: [
|
|
3969
|
-
/* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "8", fill: "#2775CA" }),
|
|
3970
|
-
/* @__PURE__ */ jsx("path", { d: "M5 8l2 2 4-4", stroke: "#fff", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
3971
|
-
] })
|
|
3972
|
-
] }),
|
|
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
|
+
] }) }),
|
|
3973
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" }) })
|
|
3974
3975
|
]
|
|
3975
3976
|
}
|
|
3976
3977
|
)
|
|
3977
3978
|
] }),
|
|
3978
|
-
/* @__PURE__ */ jsxs(
|
|
3979
|
+
!accountPickerOpen && /* @__PURE__ */ jsxs(
|
|
3979
3980
|
"button",
|
|
3980
3981
|
{
|
|
3981
3982
|
type: "button",
|
|
3982
|
-
onClick:
|
|
3983
|
-
style: walletBalanceRowStyle
|
|
3983
|
+
onClick: () => setAccountPickerOpen(!accountPickerOpen),
|
|
3984
|
+
style: walletBalanceRowStyle,
|
|
3984
3985
|
children: [
|
|
3985
3986
|
selectedProviderLogo ? /* @__PURE__ */ jsx("img", { src: selectedProviderLogo, alt: selectedProviderName, style: providerLogoStyle }) : /* @__PURE__ */ jsx("div", { style: providerFallbackStyle(tokens.textMuted), children: selectedProviderName.charAt(0) }),
|
|
3986
3987
|
/* @__PURE__ */ jsxs("span", { style: walletBalanceStyle(tokens.text), children: [
|
|
3987
3988
|
"$",
|
|
3988
3989
|
availableBalance.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
3989
3990
|
] }),
|
|
3990
|
-
|
|
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" }) })
|
|
3991
3992
|
]
|
|
3992
3993
|
}
|
|
3993
3994
|
)
|
|
@@ -4057,12 +4058,19 @@ function DepositScreen({
|
|
|
4057
4058
|
] })
|
|
4058
4059
|
] })
|
|
4059
4060
|
] }),
|
|
4060
|
-
remainingLimit != null && /* @__PURE__ */ jsxs("div", { style: spendingLimitStyle(tokens.textMuted), children: [
|
|
4061
|
+
!accountPickerOpen && remainingLimit != null && /* @__PURE__ */ jsxs("div", { style: spendingLimitStyle(tokens.textMuted), children: [
|
|
4061
4062
|
"Spending Limit",
|
|
4062
4063
|
" ",
|
|
4063
4064
|
/* @__PURE__ */ jsxs("strong", { style: { color: tokens.text }, children: [
|
|
4064
4065
|
"$",
|
|
4065
|
-
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."
|
|
4066
4074
|
] })
|
|
4067
4075
|
] }),
|
|
4068
4076
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle5(tokens), children: error })
|
|
@@ -4074,12 +4082,6 @@ var depositCardWrapStyle = {
|
|
|
4074
4082
|
position: "relative",
|
|
4075
4083
|
marginBottom: 20
|
|
4076
4084
|
};
|
|
4077
|
-
var depositCardStyle = (tokens) => ({
|
|
4078
|
-
background: tokens.bgInput,
|
|
4079
|
-
border: `1px solid ${tokens.border}`,
|
|
4080
|
-
borderRadius: tokens.radiusLg,
|
|
4081
|
-
padding: "16px 20px"
|
|
4082
|
-
});
|
|
4083
4085
|
var depositLabelStyle = (color) => ({
|
|
4084
4086
|
fontSize: "0.75rem",
|
|
4085
4087
|
fontWeight: 500,
|
|
@@ -4113,22 +4115,19 @@ var tokenIconWrapStyle2 = {
|
|
|
4113
4115
|
width: 36,
|
|
4114
4116
|
height: 36
|
|
4115
4117
|
};
|
|
4116
|
-
var
|
|
4117
|
-
position: "absolute",
|
|
4118
|
-
bottom: -1,
|
|
4119
|
-
right: -3
|
|
4120
|
-
};
|
|
4121
|
-
var walletBalanceRowStyle = (clickable) => ({
|
|
4118
|
+
var walletBalanceRowStyle = {
|
|
4122
4119
|
display: "flex",
|
|
4123
4120
|
alignItems: "center",
|
|
4121
|
+
justifyContent: "center",
|
|
4124
4122
|
gap: 8,
|
|
4125
4123
|
background: "transparent",
|
|
4126
4124
|
border: "none",
|
|
4127
4125
|
padding: 0,
|
|
4128
|
-
|
|
4126
|
+
width: "100%",
|
|
4127
|
+
cursor: "pointer",
|
|
4129
4128
|
fontFamily: "inherit",
|
|
4130
4129
|
outline: "none"
|
|
4131
|
-
}
|
|
4130
|
+
};
|
|
4132
4131
|
var providerLogoStyle = {
|
|
4133
4132
|
width: 18,
|
|
4134
4133
|
height: 18,
|
|
@@ -4153,16 +4152,11 @@ var walletBalanceStyle = (color) => ({
|
|
|
4153
4152
|
color
|
|
4154
4153
|
});
|
|
4155
4154
|
var accountDropdownOuterStyle = (tokens) => ({
|
|
4156
|
-
position: "absolute",
|
|
4157
|
-
top: "100%",
|
|
4158
|
-
left: 0,
|
|
4159
|
-
right: 0,
|
|
4160
4155
|
marginTop: 4,
|
|
4161
4156
|
background: tokens.bgCard,
|
|
4162
4157
|
border: `1px solid ${tokens.border}`,
|
|
4163
4158
|
borderRadius: tokens.radiusLg,
|
|
4164
4159
|
boxShadow: tokens.shadowLg,
|
|
4165
|
-
zIndex: 50,
|
|
4166
4160
|
padding: "12px 14px 14px"
|
|
4167
4161
|
});
|
|
4168
4162
|
var accountDropdownLabelStyle = (color) => ({
|
|
@@ -4251,7 +4245,7 @@ var addAccountBtnStyle = (tokens) => ({
|
|
|
4251
4245
|
padding: "12px 16px",
|
|
4252
4246
|
background: "transparent",
|
|
4253
4247
|
border: "none",
|
|
4254
|
-
color: tokens.
|
|
4248
|
+
color: tokens.textMuted,
|
|
4255
4249
|
fontWeight: 600,
|
|
4256
4250
|
fontSize: "0.85rem",
|
|
4257
4251
|
cursor: "pointer",
|
|
@@ -4378,7 +4372,7 @@ function SuccessScreen({
|
|
|
4378
4372
|
] }),
|
|
4379
4373
|
children: [
|
|
4380
4374
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
4381
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
4375
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle5, children: [
|
|
4382
4376
|
succeeded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4383
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 }) }) }),
|
|
4384
4378
|
/* @__PURE__ */ jsxs("h2", { style: headingStyle7(tokens.text), children: [
|
|
@@ -4425,7 +4419,7 @@ function SuccessScreen({
|
|
|
4425
4419
|
}
|
|
4426
4420
|
);
|
|
4427
4421
|
}
|
|
4428
|
-
var
|
|
4422
|
+
var contentStyle5 = {
|
|
4429
4423
|
flex: 1,
|
|
4430
4424
|
display: "flex",
|
|
4431
4425
|
flexDirection: "column",
|
|
@@ -4548,7 +4542,7 @@ function SelectSourceScreen({
|
|
|
4548
4542
|
}
|
|
4549
4543
|
),
|
|
4550
4544
|
/* @__PURE__ */ jsx("p", { style: subtitleStyle6(tokens.textMuted), children: "Choose which chain and token to pay from." }),
|
|
4551
|
-
/* @__PURE__ */ jsx("label", { style:
|
|
4545
|
+
/* @__PURE__ */ jsx("label", { style: labelStyle4(tokens.textSecondary), children: "Chain" }),
|
|
4552
4546
|
/* @__PURE__ */ jsx("div", { style: optionListStyle, children: choices.map((chain) => {
|
|
4553
4547
|
const isSelected = chain.chainName === selectedChainName;
|
|
4554
4548
|
const isRecommended = chain.chainName === recommended?.chainName;
|
|
@@ -4576,7 +4570,7 @@ function SelectSourceScreen({
|
|
|
4576
4570
|
);
|
|
4577
4571
|
}) }),
|
|
4578
4572
|
tokenChoices.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4579
|
-
/* @__PURE__ */ jsx("label", { style:
|
|
4573
|
+
/* @__PURE__ */ jsx("label", { style: labelStyle4(tokens.textSecondary), children: "Token" }),
|
|
4580
4574
|
/* @__PURE__ */ jsx("div", { style: optionListStyle, children: tokenChoices.map((token) => {
|
|
4581
4575
|
const isSelected = token.tokenSymbol === selectedTokenSymbol;
|
|
4582
4576
|
return /* @__PURE__ */ jsxs(
|
|
@@ -4610,7 +4604,7 @@ var subtitleStyle6 = (color) => ({
|
|
|
4610
4604
|
margin: "0 0 20px",
|
|
4611
4605
|
lineHeight: 1.5
|
|
4612
4606
|
});
|
|
4613
|
-
var
|
|
4607
|
+
var labelStyle4 = (color) => ({
|
|
4614
4608
|
display: "block",
|
|
4615
4609
|
fontSize: "0.75rem",
|
|
4616
4610
|
fontWeight: 600,
|
|
@@ -4721,7 +4715,7 @@ function AdvancedSourceScreen({
|
|
|
4721
4715
|
),
|
|
4722
4716
|
/* @__PURE__ */ jsx("h2", { style: headingStyle8(tokens.text), children: "Set up One-Tap deposits" }),
|
|
4723
4717
|
/* @__PURE__ */ jsx("p", { style: subtitleStyle7(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
|
|
4724
|
-
/* @__PURE__ */ jsx("label", { style:
|
|
4718
|
+
/* @__PURE__ */ jsx("label", { style: labelStyle5(tokens.textSecondary), children: "Select tokens to approve" }),
|
|
4725
4719
|
/* @__PURE__ */ jsx("div", { style: chainListStyle, children: choices.map((chain) => {
|
|
4726
4720
|
const isExpanded = expandedChain === chain.chainName;
|
|
4727
4721
|
const chainHasSelection = localChain === chain.chainName;
|
|
@@ -4796,7 +4790,7 @@ var subtitleStyle7 = (color) => ({
|
|
|
4796
4790
|
margin: "0 0 20px",
|
|
4797
4791
|
lineHeight: 1.5
|
|
4798
4792
|
});
|
|
4799
|
-
var
|
|
4793
|
+
var labelStyle5 = (color) => ({
|
|
4800
4794
|
display: "block",
|
|
4801
4795
|
fontSize: "0.75rem",
|
|
4802
4796
|
fontWeight: 600,
|
|
@@ -4918,7 +4912,7 @@ function TransferStatusScreen({
|
|
|
4918
4912
|
const steps = buildSteps(phase);
|
|
4919
4913
|
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
|
|
4920
4914
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
4921
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
4915
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle6, children: [
|
|
4922
4916
|
/* @__PURE__ */ jsx(Spinner, { size: 64 }),
|
|
4923
4917
|
/* @__PURE__ */ jsx("h2", { style: headingStyle9(tokens.text), children: "Depositing your money..." }),
|
|
4924
4918
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle6(tokens), children: error }),
|
|
@@ -4926,7 +4920,7 @@ function TransferStatusScreen({
|
|
|
4926
4920
|
] })
|
|
4927
4921
|
] });
|
|
4928
4922
|
}
|
|
4929
|
-
var
|
|
4923
|
+
var contentStyle6 = {
|
|
4930
4924
|
flex: 1,
|
|
4931
4925
|
display: "flex",
|
|
4932
4926
|
flexDirection: "column",
|
|
@@ -5017,7 +5011,7 @@ function OpenWalletScreen({
|
|
|
5017
5011
|
] }),
|
|
5018
5012
|
children: [
|
|
5019
5013
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
5020
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
5014
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle7, children: [
|
|
5021
5015
|
/* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
|
|
5022
5016
|
/* @__PURE__ */ jsxs("h2", { style: headingStyle10(tokens.text), children: [
|
|
5023
5017
|
"Setting up ",
|
|
@@ -5050,7 +5044,7 @@ function OpenWalletScreen({
|
|
|
5050
5044
|
] }),
|
|
5051
5045
|
children: [
|
|
5052
5046
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
5053
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
5047
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle7, children: [
|
|
5054
5048
|
/* @__PURE__ */ jsx("div", { style: logoCircleStyle(tokens.bgInput), children: logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 32 }) }),
|
|
5055
5049
|
/* @__PURE__ */ jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
|
|
5056
5050
|
/* @__PURE__ */ jsx("p", { style: subtitleStyle8(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
|
|
@@ -5063,7 +5057,7 @@ function OpenWalletScreen({
|
|
|
5063
5057
|
}
|
|
5064
5058
|
);
|
|
5065
5059
|
}
|
|
5066
|
-
var
|
|
5060
|
+
var contentStyle7 = {
|
|
5067
5061
|
flex: 1,
|
|
5068
5062
|
display: "flex",
|
|
5069
5063
|
flexDirection: "column",
|
|
@@ -5149,7 +5143,7 @@ function ConfirmSignScreen({
|
|
|
5149
5143
|
] }),
|
|
5150
5144
|
children: [
|
|
5151
5145
|
/* @__PURE__ */ jsx(ScreenHeader, { onLogout }),
|
|
5152
|
-
/* @__PURE__ */ jsxs("div", { style:
|
|
5146
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle8, children: [
|
|
5153
5147
|
logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle3 }) : /* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
5154
5148
|
/* @__PURE__ */ jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
|
|
5155
5149
|
/* @__PURE__ */ jsxs("p", { style: subtitleStyle9(tokens.textSecondary), children: [
|
|
@@ -5165,7 +5159,7 @@ function ConfirmSignScreen({
|
|
|
5165
5159
|
}
|
|
5166
5160
|
);
|
|
5167
5161
|
}
|
|
5168
|
-
var
|
|
5162
|
+
var contentStyle8 = {
|
|
5169
5163
|
flex: 1,
|
|
5170
5164
|
display: "flex",
|
|
5171
5165
|
flexDirection: "column",
|
|
@@ -5228,7 +5222,8 @@ function TokenPickerScreen({
|
|
|
5228
5222
|
onAuthorizeToken,
|
|
5229
5223
|
onBack,
|
|
5230
5224
|
onLogout,
|
|
5231
|
-
depositAmount
|
|
5225
|
+
depositAmount,
|
|
5226
|
+
selectedTokenSymbol
|
|
5232
5227
|
}) {
|
|
5233
5228
|
const { tokens: t } = useSwypeConfig();
|
|
5234
5229
|
const entries = [];
|
|
@@ -5257,24 +5252,28 @@ function TokenPickerScreen({
|
|
|
5257
5252
|
};
|
|
5258
5253
|
return /* @__PURE__ */ jsxs(ScreenLayout, { footer: /* @__PURE__ */ jsx(PoweredByFooter, {}), children: [
|
|
5259
5254
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack, onLogout }),
|
|
5260
|
-
|
|
5261
|
-
depositAmount != null && /* @__PURE__ */ jsxs("div", { style: depositCardStyle2(t), children: [
|
|
5255
|
+
depositAmount != null && /* @__PURE__ */ jsxs("div", { children: [
|
|
5262
5256
|
/* @__PURE__ */ jsx("div", { style: depositLabelStyle2(t.textMuted), children: "Depositing" }),
|
|
5263
5257
|
/* @__PURE__ */ jsxs("div", { style: depositAmountRowStyle, children: [
|
|
5264
5258
|
/* @__PURE__ */ jsxs("div", { style: depositAmountStyle(t.text), children: [
|
|
5265
5259
|
"$",
|
|
5266
|
-
depositAmount.toLocaleString("en-US", { minimumFractionDigits:
|
|
5260
|
+
depositAmount.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
5267
5261
|
] }),
|
|
5268
|
-
/* @__PURE__ */ jsxs(
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
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
|
+
)
|
|
5278
5277
|
] })
|
|
5279
5278
|
] }),
|
|
5280
5279
|
/* @__PURE__ */ jsx("div", { style: sectionLabelStyle(t.textMuted), children: "Choose token" }),
|
|
@@ -5287,7 +5286,7 @@ function TokenPickerScreen({
|
|
|
5287
5286
|
onClick: () => handleSelect(entry),
|
|
5288
5287
|
style: tokenRowStyle2(t),
|
|
5289
5288
|
children: [
|
|
5290
|
-
/* @__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: "$" }) }),
|
|
5291
5290
|
/* @__PURE__ */ jsxs("div", { style: tokenInfoStyle2, children: [
|
|
5292
5291
|
/* @__PURE__ */ jsxs("div", { style: tokenNameRowStyle, children: [
|
|
5293
5292
|
/* @__PURE__ */ jsx("span", { style: tokenSymbolTextStyle(t.text), children: entry.tokenSymbol }),
|
|
@@ -5310,22 +5309,6 @@ function TokenPickerScreen({
|
|
|
5310
5309
|
}) })
|
|
5311
5310
|
] });
|
|
5312
5311
|
}
|
|
5313
|
-
var mascotWrapStyle = {
|
|
5314
|
-
display: "flex",
|
|
5315
|
-
justifyContent: "center",
|
|
5316
|
-
marginBottom: 16
|
|
5317
|
-
};
|
|
5318
|
-
var mascotImgStyle = {
|
|
5319
|
-
width: 36,
|
|
5320
|
-
height: 36
|
|
5321
|
-
};
|
|
5322
|
-
var depositCardStyle2 = (tokens) => ({
|
|
5323
|
-
background: tokens.bgInput,
|
|
5324
|
-
border: `1px solid ${tokens.border}`,
|
|
5325
|
-
borderRadius: tokens.radiusLg,
|
|
5326
|
-
padding: "16px 20px",
|
|
5327
|
-
marginBottom: 24
|
|
5328
|
-
});
|
|
5329
5312
|
var depositLabelStyle2 = (color) => ({
|
|
5330
5313
|
fontSize: "0.75rem",
|
|
5331
5314
|
fontWeight: 500,
|
|
@@ -5338,22 +5321,27 @@ var depositAmountRowStyle = {
|
|
|
5338
5321
|
justifyContent: "space-between"
|
|
5339
5322
|
};
|
|
5340
5323
|
var depositAmountStyle = (color) => ({
|
|
5341
|
-
fontSize: "2.
|
|
5324
|
+
fontSize: "2.4rem",
|
|
5342
5325
|
fontWeight: 700,
|
|
5343
5326
|
letterSpacing: "-0.02em",
|
|
5344
5327
|
color
|
|
5345
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
|
+
};
|
|
5346
5339
|
var tokenIconWrapStyle3 = {
|
|
5347
5340
|
position: "relative",
|
|
5348
|
-
width:
|
|
5349
|
-
height:
|
|
5341
|
+
width: 36,
|
|
5342
|
+
height: 36,
|
|
5350
5343
|
flexShrink: 0
|
|
5351
5344
|
};
|
|
5352
|
-
var checkBadgeStyle3 = {
|
|
5353
|
-
position: "absolute",
|
|
5354
|
-
bottom: -1,
|
|
5355
|
-
right: -3
|
|
5356
|
-
};
|
|
5357
5345
|
var sectionLabelStyle = (color) => ({
|
|
5358
5346
|
fontSize: "0.84rem",
|
|
5359
5347
|
fontWeight: 500,
|
|
@@ -5378,16 +5366,23 @@ var tokenRowStyle2 = (tokens) => ({
|
|
|
5378
5366
|
textAlign: "left",
|
|
5379
5367
|
width: "100%"
|
|
5380
5368
|
});
|
|
5381
|
-
var tokenIconCircleStyle = (tokens) => ({
|
|
5369
|
+
var tokenIconCircleStyle = (tokens, hasLogo) => ({
|
|
5382
5370
|
width: 36,
|
|
5383
5371
|
height: 36,
|
|
5384
5372
|
borderRadius: "50%",
|
|
5385
|
-
border: `1.5px solid ${tokens.border}`,
|
|
5373
|
+
border: hasLogo ? "none" : `1.5px solid ${tokens.border}`,
|
|
5386
5374
|
display: "flex",
|
|
5387
5375
|
alignItems: "center",
|
|
5388
5376
|
justifyContent: "center",
|
|
5389
|
-
flexShrink: 0
|
|
5377
|
+
flexShrink: 0,
|
|
5378
|
+
overflow: "hidden"
|
|
5390
5379
|
});
|
|
5380
|
+
var tokenLogoImgStyle = {
|
|
5381
|
+
width: 36,
|
|
5382
|
+
height: 36,
|
|
5383
|
+
borderRadius: "50%",
|
|
5384
|
+
objectFit: "cover"
|
|
5385
|
+
};
|
|
5391
5386
|
var tokenIconTextStyle = (color) => ({
|
|
5392
5387
|
fontSize: "1rem",
|
|
5393
5388
|
fontWeight: 700,
|
|
@@ -5651,7 +5646,8 @@ function StepRendererContent({
|
|
|
5651
5646
|
onAdvanced: handlers.onSelectToken,
|
|
5652
5647
|
selectedSourceLabel: effectiveSourceLabel,
|
|
5653
5648
|
loading: savingOneTapLimit,
|
|
5654
|
-
error: state.error
|
|
5649
|
+
error: state.error,
|
|
5650
|
+
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5655
5651
|
}
|
|
5656
5652
|
);
|
|
5657
5653
|
}
|
|
@@ -5695,7 +5691,8 @@ function StepRendererContent({
|
|
|
5695
5691
|
onAuthorizeAccount: handlers.onContinueConnection,
|
|
5696
5692
|
onAddProvider: () => handlers.onNavigate("wallet-picker"),
|
|
5697
5693
|
onSelectToken: handlers.onSelectToken,
|
|
5698
|
-
selectedSourceLabel
|
|
5694
|
+
selectedSourceLabel,
|
|
5695
|
+
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5699
5696
|
}
|
|
5700
5697
|
);
|
|
5701
5698
|
}
|
|
@@ -5712,7 +5709,8 @@ function StepRendererContent({
|
|
|
5712
5709
|
onAuthorizeToken: handlers.onAuthorizeToken,
|
|
5713
5710
|
onBack: () => handlers.onNavigate(state.previousStep === "setup" ? "setup" : "deposit"),
|
|
5714
5711
|
onLogout: handlers.onLogout,
|
|
5715
|
-
depositAmount: depositAmount ?? void 0
|
|
5712
|
+
depositAmount: depositAmount ?? void 0,
|
|
5713
|
+
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5716
5714
|
}
|
|
5717
5715
|
);
|
|
5718
5716
|
}
|
|
@@ -5789,7 +5787,8 @@ function StepRendererContent({
|
|
|
5789
5787
|
onSelectAccount: handlers.onSelectAccount,
|
|
5790
5788
|
onAuthorizeAccount: handlers.onContinueConnection,
|
|
5791
5789
|
onAddProvider: () => handlers.onNavigate("wallet-picker"),
|
|
5792
|
-
selectedSourceLabel
|
|
5790
|
+
selectedSourceLabel,
|
|
5791
|
+
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5793
5792
|
}
|
|
5794
5793
|
);
|
|
5795
5794
|
}
|