Skip to content

Commit

Permalink
Merge pull request #470 from Itheum/test
Browse files Browse the repository at this point in the history
Feat: Misc
  • Loading branch information
damienen authored Jul 1, 2024
2 parents 9f4738a + 58f1273 commit 8cc3b83
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -49,6 +49,7 @@
},
"scripts": {
"start": "vite dev",
"dev": "vite dev",
"build": "tsc & vite build",
"serve": "tsc & vite preview",
"test": "vitest",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
32 changes: 17 additions & 15 deletions src/store/StoreProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8cc3b83

Please sign in to comment.