@swype-org/react-sdk 0.1.214 → 0.1.216

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.js CHANGED
@@ -1,8 +1,8 @@
1
- import { createContext, useRef, useState, useCallback, useMemo, useContext, useEffect, useReducer, Component } from 'react';
1
+ import { createContext, useRef, useEffect, useState, useCallback, useMemo, useContext, useReducer, Component } from 'react';
2
2
  import { PrivyProvider, usePrivy, useLoginWithOAuth, useLoginWithEmail, useLoginWithSms } from '@privy-io/react-auth';
3
3
  import { createConfig, http, WagmiProvider, useConfig, useConnect, useSwitchChain } from 'wagmi';
4
4
  import { mainnet, arbitrum, base, polygon, bsc } from 'wagmi/chains';
5
- import { injected } from 'wagmi/connectors';
5
+ import { injected as injected$1 } from 'wagmi/connectors';
6
6
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { recoverTypedDataAddress, decodeAbiParameters, walletActions, createClient, custom } from 'viem';
@@ -14,6 +14,19 @@ var __export = (target, all) => {
14
14
  __defProp(target, name, { get: all[name], enumerable: true });
15
15
  };
16
16
 
17
+ // src/contentsquare.ts
18
+ var SCRIPT_SRC = "https://t.contentsquare.net/uxa/9537de3817f8f.js";
19
+ var injected = false;
20
+ function loadContentsquare() {
21
+ if (injected) return;
22
+ if (typeof document === "undefined") return;
23
+ injected = true;
24
+ const script = document.createElement("script");
25
+ script.src = SCRIPT_SRC;
26
+ script.async = true;
27
+ document.head.appendChild(script);
28
+ }
29
+
17
30
  // src/theme.ts
18
31
  var darkTheme = {
19
32
  bg: "#071216",
@@ -75,7 +88,7 @@ function getTheme(mode) {
75
88
  var BLINK_PRIVY_APP_ID = "cmlil87uv004n0ck0blwumwek";
76
89
  var wagmiConfig = createConfig({
77
90
  chains: [mainnet, arbitrum, base, polygon, bsc],
78
- connectors: [injected({ shimDisconnect: true, unstable_shimAsyncInject: 2e3 })],
91
+ connectors: [injected$1({ shimDisconnect: true, unstable_shimAsyncInject: 2e3 })],
79
92
  transports: {
80
93
  [mainnet.id]: http(),
81
94
  [arbitrum.id]: http(),
@@ -94,6 +107,9 @@ function BlinkProvider({
94
107
  if (!queryClientRef.current) {
95
108
  queryClientRef.current = new QueryClient();
96
109
  }
110
+ useEffect(() => {
111
+ loadContentsquare();
112
+ }, []);
97
113
  const [depositAmount, setDepositAmountRaw] = useState(null);
98
114
  const setDepositAmount = useCallback((amount) => {
99
115
  setDepositAmountRaw(amount);