diff --git a/package.json b/package.json index 2571696..055b4ee 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { "name": "explorer-dapp", "description": "Itheum Explorer is a DApp for the public to explore and visualize data within the Itheum protocol", - "version": "1.16.5", + "version": "1.16.6", "author": "Itheum", "license": "GPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-svg-core": "6.5.2", "@fortawesome/free-solid-svg-icons": "6.5.2", "@fortawesome/react-fontawesome": "0.2.2", - "@itheum/sdk-mx-data-nft": "3.5.0", + "@itheum/sdk-mx-data-nft": "3.5.1", "@multiversx/sdk-core": "13.2.1", - "@multiversx/sdk-dapp": "2.33.2", + "@multiversx/sdk-dapp": "2.33.5", "@multiversx/sdk-network-providers": "2.4.3", "@radix-ui/react-dialog": "1.0.5", "@radix-ui/react-dropdown-menu": "2.0.6", @@ -49,6 +49,7 @@ }, "scripts": { "start": "vite dev", + "dev": "vite dev", "build": "tsc & vite build", "serve": "tsc & vite preview", "test": "vitest", @@ -77,7 +78,6 @@ "@vitest/coverage-v8": "1.6.0", "autoprefixer": "10.4.19", "eslint-config-prettier": "9.1.0", - "eslint-config-react-app": "7.0.1", "eslint-config-standard": "17.1.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-plugin-import": "2.29.1", @@ -89,8 +89,8 @@ "postcss": "8.4.38", "prettier": "3.3.2", "tailwindcss": "3.4.4", - "typescript": "4.9.5", - "vite": "5.2.13", + "typescript": "5.5.2", + "vite": "5.3.2", "vite-plugin-node-polyfills": "0.22.0", "vite-plugin-svgr": "4.2.0", "vite-tsconfig-paths": "4.3.2", diff --git a/src/store/StoreProvider.tsx b/src/store/StoreProvider.tsx index 25b0795..84d26fd 100644 --- a/src/store/StoreProvider.tsx +++ b/src/store/StoreProvider.tsx @@ -41,24 +41,26 @@ export const StoreProvider = ({ children }: PropsWithChildren) => { }, [address, tokenLogin]); useEffect(() => { - if (!address || !(tokenLogin && tokenLogin.nativeAuthToken)) { - return; - } - const nativeAuthTokenData = decodeNativeAuthToken(tokenLogin.nativeAuthToken); - if (nativeAuthTokenData.extraInfo.timestamp) { - const currentTime = new Date().getTime(); - if (currentTime > (nativeAuthTokenData.extraInfo.timestamp + nativeAuthTokenData.ttl) * 1000) { + (async () => { + if (!address || !(tokenLogin && tokenLogin.nativeAuthToken)) { return; } - } - // add all the balances into the loading phase - updateBitzBalance(-2); - updateGivenBitzSum(-2); - updateCooldown(-2); - updateCollectedBitzSum(-2); - updateBonusBitzSum(-2); - (async () => { + const nativeAuthTokenData = decodeNativeAuthToken(tokenLogin.nativeAuthToken); + if (nativeAuthTokenData.extraInfo.timestamp) { + const currentTime = new Date().getTime(); + if (currentTime > (nativeAuthTokenData.extraInfo.timestamp + nativeAuthTokenData.ttl) * 1000) { + return; + } + } + + // add all the balances into the loading phase + updateBitzBalance(-2); + updateGivenBitzSum(-2); + updateCooldown(-2); + updateCollectedBitzSum(-2); + updateBonusBitzSum(-2); + // get the bitz game data nft details const bitzGameDataNFT = await DataNft.createFromApi(GET_BITZ_TOKEN);