update packages, try to fix build issue
This commit is contained in:
@@ -6,7 +6,7 @@ import { Container, useToast, Center, Spacer, Flex } from "@chakra-ui/react";
|
||||
import { SingleValue } from "chakra-react-select";
|
||||
// WC v2
|
||||
import { Core } from "@walletconnect/core";
|
||||
import { Web3Wallet, IWeb3Wallet } from "@walletconnect/web3wallet";
|
||||
import { WalletKit, IWalletKit } from "@reown/walletkit";
|
||||
import { ProposalTypes, SessionTypes } from "@walletconnect/types";
|
||||
import { getSdkError, parseUri } from "@walletconnect/utils";
|
||||
import { ethers } from "ethers";
|
||||
@@ -65,12 +65,18 @@ const allNetworksOptions = [
|
||||
];
|
||||
|
||||
function Body() {
|
||||
const addressFromURL = new URLSearchParams(window.location.search).get(
|
||||
"address"
|
||||
);
|
||||
const urlFromURL = new URLSearchParams(window.location.search).get("url");
|
||||
const urlFromCache = localStorage.getItem("appUrl");
|
||||
const chainFromURL = new URLSearchParams(window.location.search).get("chain");
|
||||
let addressFromURL: string | null = null;
|
||||
let urlFromURL: string | null = null;
|
||||
let urlFromCache: string | null = null;
|
||||
let chainFromURL: string | null = null;
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
addressFromURL = urlParams.get("address");
|
||||
urlFromURL = urlParams.get("url");
|
||||
urlFromCache = localStorage.getItem("appUrl");
|
||||
chainFromURL = urlParams.get("chain");
|
||||
}
|
||||
let networkIdViaURL = 1;
|
||||
if (chainFromURL) {
|
||||
for (let i = 0; i < allNetworksOptions.length; i++) {
|
||||
@@ -108,7 +114,7 @@ function Body() {
|
||||
value: networkIdViaURL,
|
||||
});
|
||||
// WC v2
|
||||
const [web3wallet, setWeb3Wallet] = useState<IWeb3Wallet>();
|
||||
const [web3wallet, setWeb3Wallet] = useState<IWalletKit>();
|
||||
const [web3WalletSession, setWeb3WalletSession] =
|
||||
useState<SessionTypes.Struct>();
|
||||
const [isConnected, setIsConnected] = useState(false);
|
||||
@@ -231,7 +237,7 @@ function Body() {
|
||||
onlyIfActiveSessions?: boolean,
|
||||
_showAddress?: string
|
||||
) => {
|
||||
const _web3wallet = await Web3Wallet.init({
|
||||
const _web3wallet = await WalletKit.init({
|
||||
core,
|
||||
metadata: WCMetadata,
|
||||
});
|
||||
|
||||
@@ -8,9 +8,9 @@ const nextConfig = {
|
||||
compiler: {
|
||||
styledComponents: true,
|
||||
},
|
||||
experimental: {
|
||||
windowHistorySupport: true,
|
||||
},
|
||||
// experimental: {
|
||||
// windowHistorySupport: true,
|
||||
// },
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
|
||||
26
package.json
26
package.json
@@ -10,25 +10,25 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@chakra-ui/icons": "^1.0.14",
|
||||
"@chakra-ui/icons": "^1.1.7",
|
||||
"@chakra-ui/next-js": "^2.2.0",
|
||||
"@chakra-ui/react": "^2.8.1",
|
||||
"@emotion/react": "^11",
|
||||
"@emotion/styled": "^11",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
||||
"@fortawesome/react-fontawesome": "^0.1.18",
|
||||
"@rainbow-me/rainbowkit": "^1.0.11",
|
||||
"@chakra-ui/react": "^2.8.2",
|
||||
"@emotion/react": "^11.13.3",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
||||
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
||||
"@fortawesome/react-fontawesome": "^0.2.2",
|
||||
"@rainbow-me/rainbowkit": "^1.3.7",
|
||||
"@reown/walletkit": "^1.0.0",
|
||||
"@types/node": "^17.0.10",
|
||||
"@types/react": "^17.0.38",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"@walletconnect/client": "^1.8.0",
|
||||
"@walletconnect/core": "^2.7.3",
|
||||
"@walletconnect/core": "^2.16.2",
|
||||
"@walletconnect/legacy-types": "^2.0.0",
|
||||
"@walletconnect/types": "^2.7.3",
|
||||
"@walletconnect/utils": "^2.7.3",
|
||||
"@walletconnect/web3wallet": "^1.7.1",
|
||||
"@walletconnect/types": "^2.16.2",
|
||||
"@walletconnect/utils": "^2.16.2",
|
||||
"axios": "^0.24.0",
|
||||
"blo": "^1.0.0",
|
||||
"chakra-react-select": "^4.4.3",
|
||||
|
||||
2322
pnpm-lock.yaml
generated
2322
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user