diff --git a/package.json b/package.json index 3bb23b9a..69e8bf07 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,7 @@ { "name": "explorer-dapp", "description": "Itheum Explorer is a DApp for the public to explore and visualize data within the Itheum protocol", - - "version": "1.15.7", - + "version": "1.16.0", "author": "Itheum", "license": "GPL-3.0-or-later", "dependencies": { @@ -12,7 +10,7 @@ "@fortawesome/react-fontawesome": "0.2.0", "@itheum/sdk-mx-data-nft": "3.3.0-alpha.3", "@multiversx/sdk-core": "13.0.1", - "@multiversx/sdk-dapp": "2.31.3", + "@multiversx/sdk-dapp": "2.29.2", "@multiversx/sdk-network-providers": "2.4.3", "@radix-ui/react-dialog": "1.0.5", "@radix-ui/react-dropdown-menu": "2.0.6", diff --git a/src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzBase.tsx b/src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzBase.tsx index fe7bebfd..ca5eb40e 100644 --- a/src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzBase.tsx +++ b/src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzBase.tsx @@ -14,6 +14,7 @@ import PowerUpBounty from "./PowerUpBounty"; import { getDataBounties, GiveBitzDataBounty } from "../config"; import { LeaderBoardItemType, viewDataJSONCore } from "../index"; import LeaderBoardTable from "../LeaderBoardTable"; +import { FlaskRound } from "lucide-react"; type GiveBitzBaseProps = { gameDataNFT: DataNft; @@ -25,6 +26,8 @@ const GiveBitzBase = (props: GiveBitzBaseProps) => { const { tokenLogin } = useGetLoginInfo(); const givenBitzSum = useAccountStore((state: any) => state.givenBitzSum); const collectedBitzSum = useAccountStore((state: any) => state.collectedBitzSum); + const bitzBalance = useAccountStore((state: any) => state.bitzBalance); + const { chainID } = useGetNetworkConfig(); const [giverLeaderBoardIsLoading, setGiverLeaderBoardIsLoading] = useState(false); const [giverLeaderBoard, setGiverLeaderBoard] = useState([]); @@ -269,6 +272,7 @@ const GiveBitzBase = (props: GiveBitzBaseProps) => { fetchMyGivenBitz(); fetchGiverLeaderBoard(); updateDataBountyTotalReceivedAmount(bitsToCampaignId, bitsVal, isNewGiver); + updateBitzBalance(bitzBalance - bitsVal); return true; } } else { @@ -352,7 +356,13 @@ const GiveBitzBase = (props: GiveBitzBaseProps) => {
- Power-up Data Bounties +
+ Power-up Data Bounties +
+ {bitzBalance === -2 ? `...` : <>{bitzBalance === -1 ? "0" : `${bitzBalance}`}} + +
+
Power-Up Data Bounties (Ideas for new Data NFTs) with your BiTz XP, Climb Bounty Leaderboards and get bonus rewards if your Bounty is realized. diff --git a/src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzLowerCard.tsx b/src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzLowerCard.tsx index 2dfb0a39..20bad6dc 100644 --- a/src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzLowerCard.tsx +++ b/src/pages/AppMarketplace/GetBitz/GiveBitz/GiveBitzLowerCard.tsx @@ -128,16 +128,28 @@ const GiveBitzLowerCard: React.FC = (props) => { transition={{ duration: 0.6, delay: 0.1 }}>
Give More BiTz
- setBitzVal(Number(e.target.value))} - className="accent-black dark:accent-white w-full cursor-pointer custom-range-slider" - /> +
+ setBitzVal(Number(e.target.value))} + className="accent-black dark:accent-white w-full cursor-pointer custom-range-slider" + /> + setBitzVal(Math.min(Number(e.target.value), bitzBalance))} + className="bg-[#35d9fa]/30 text- dark:text-[#35d9fa] focus:none focus:outline-none focus:border-transparent text-center border-[#35d9fa] rounded-md" + /> +
+
{ 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) { + return; + } + } // add all the balances into the loading phase updateBitzBalance(-2); updateGivenBitzSum(-2);