@swype-org/react-sdk 0.1.96 → 0.1.98

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 CHANGED
@@ -77,12 +77,14 @@ function getTheme(mode) {
77
77
  }
78
78
  var SWYPE_PRIVY_APP_ID = "cmlil87uv004n0ck0blwumwek";
79
79
  var wagmiConfig = wagmi.createConfig({
80
- chains: [chains.mainnet, chains.arbitrum, chains.base],
81
- connectors: [connectors.injected()],
80
+ chains: [chains.mainnet, chains.arbitrum, chains.base, chains.polygon, chains.bsc],
81
+ connectors: [connectors.injected({ shimDisconnect: true, unstable_shimAsyncInject: 2e3 })],
82
82
  transports: {
83
83
  [chains.mainnet.id]: wagmi.http(),
84
84
  [chains.arbitrum.id]: wagmi.http(),
85
- [chains.base.id]: wagmi.http()
85
+ [chains.base.id]: wagmi.http(),
86
+ [chains.polygon.id]: wagmi.http(),
87
+ [chains.bsc.id]: wagmi.http()
86
88
  }
87
89
  });
88
90
  var SwypeContext = react.createContext(null);
@@ -3275,53 +3277,32 @@ function WalletPickerScreen({
3275
3277
  /* @__PURE__ */ jsxRuntime.jsx("h2", { style: headingStyle4(tokens.text), children: "Where are your stablecoins?" }),
3276
3278
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: subtitleStyle4(tokens.textSecondary), children: "Select the wallet you want to deposit from" })
3277
3279
  ] }),
3278
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: gridStyle, children: [
3279
- displayProviders.map((p) => {
3280
- const logoSrc = "logoURI" in p && p.logoURI || KNOWN_LOGOS[p.name.toLowerCase()];
3281
- const emoji = WALLET_EMOJIS[p.name.toLowerCase()] ?? p.name.charAt(0);
3282
- const isHovered = hoveredId === p.id;
3283
- return /* @__PURE__ */ jsxRuntime.jsxs(
3284
- "button",
3285
- {
3286
- onClick: () => onSelectProvider(p.id),
3287
- onMouseEnter: () => setHoveredId(p.id),
3288
- onMouseLeave: () => setHoveredId(null),
3289
- style: cardStyle(tokens, isHovered),
3290
- children: [
3291
- logoSrc ? /* @__PURE__ */ jsxRuntime.jsx(
3292
- "img",
3293
- {
3294
- src: logoSrc,
3295
- alt: p.name,
3296
- style: logoImgStyle2
3297
- }
3298
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: emojiStyle, children: emoji }),
3299
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: nameStyle2(tokens.text), children: p.name })
3300
- ]
3301
- },
3302
- p.id
3303
- );
3304
- }),
3305
- /* @__PURE__ */ jsxRuntime.jsxs(
3280
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: gridStyle, children: displayProviders.map((p) => {
3281
+ const logoSrc = "logoURI" in p && p.logoURI || KNOWN_LOGOS[p.name.toLowerCase()];
3282
+ const emoji = WALLET_EMOJIS[p.name.toLowerCase()] ?? p.name.charAt(0);
3283
+ const isHovered = hoveredId === p.id;
3284
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3306
3285
  "button",
3307
3286
  {
3308
- onClick: () => onSelectProvider("other"),
3309
- onMouseEnter: () => setHoveredId("other"),
3287
+ onClick: () => onSelectProvider(p.id),
3288
+ onMouseEnter: () => setHoveredId(p.id),
3310
3289
  onMouseLeave: () => setHoveredId(null),
3311
- style: cardStyle(tokens, hoveredId === "other"),
3290
+ style: cardStyle(tokens, isHovered),
3312
3291
  children: [
3313
- /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", style: { margin: "0 auto" }, children: /* @__PURE__ */ jsxRuntime.jsx(
3314
- "path",
3292
+ logoSrc ? /* @__PURE__ */ jsxRuntime.jsx(
3293
+ "img",
3315
3294
  {
3316
- d: "M19 19H5V5h7V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z",
3317
- fill: tokens.textMuted
3295
+ src: logoSrc,
3296
+ alt: p.name,
3297
+ style: logoImgStyle2
3318
3298
  }
3319
- ) }),
3320
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: nameStyle2(tokens.text), children: "Other" })
3299
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: emojiStyle, children: emoji }),
3300
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: nameStyle2(tokens.text), children: p.name })
3321
3301
  ]
3322
- }
3323
- )
3324
- ] })
3302
+ },
3303
+ p.id
3304
+ );
3305
+ }) })
3325
3306
  ]
3326
3307
  }
3327
3308
  );
@@ -4867,7 +4848,7 @@ function StepRenderer({
4867
4848
  }
4868
4849
  );
4869
4850
  }
4870
- if (step === "otp-verify" && !authenticated) {
4851
+ if (step === "otp-verify") {
4871
4852
  return /* @__PURE__ */ jsxRuntime.jsx(
4872
4853
  OtpVerifyScreen,
4873
4854
  {
@@ -4879,7 +4860,7 @@ function StepRenderer({
4879
4860
  onVerify: handlers.onVerifyLoginCode,
4880
4861
  onResend: handlers.onResendLoginCode,
4881
4862
  onBack: handlers.onBackFromOtp,
4882
- verifying: activeOtpStatus === "submitting-code",
4863
+ verifying: activeOtpStatus === "submitting-code" || authenticated,
4883
4864
  error: state.error
4884
4865
  }
4885
4866
  );