Skip to content

Commit

Permalink
fix: calldata string instead of bigint
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveVodrazka committed Jun 27, 2024
1 parent 7458176 commit 3b18601
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/Airdrop/AirdropModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ export const claimAndStake = async (
const approveCall = {
contractAddress: VE_CRM_ADDRESS,
entrypoint: "approve",
calldata: [GOVERNANCE_ADDRESS, airdropAmount, 0],
calldata: [GOVERNANCE_ADDRESS, airdropAmount.toString(10), 0],
};
const stakeCall = {
contractAddress: GOVERNANCE_ADDRESS,
entrypoint: "stake",
calldata: [length, airdropAmount],
calldata: [length, airdropAmount.toString(10)],
};

const res = await account
Expand Down
4 changes: 2 additions & 2 deletions src/components/CarmineStaking/StakeCRM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ const stake = async (
const approveCall = {
contractAddress: VE_CRM_ADDRESS,
entrypoint: "approve",
calldata: [GOVERNANCE_ADDRESS, amount, 0],
calldata: [GOVERNANCE_ADDRESS, amount.toString(10), 0],
};

const stakeCall = {
contractAddress: GOVERNANCE_ADDRESS,
entrypoint: "stake",
calldata: [length, amount],
calldata: [length.toString(10), amount.toString(10)],
};

const res = await account
Expand Down
4 changes: 2 additions & 2 deletions src/components/CarmineStaking/Staking.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { AccountInterface } from "starknet";
import { Skeleton } from "@mui/material";
import { useQuery } from "react-query";

import { useAccount } from "../../hooks/useAccount";
Expand All @@ -9,6 +8,7 @@ import { Stakes } from "./Stakes";
import { QueryKeys } from "../../queries/keys";
import { fetchStakingData } from "./calls";
import { StakeCrm } from "./StakeCRM";
import { LoadingAnimation } from "../Loading/Loading";

export const StakeWithAccount = ({
account,
Expand All @@ -20,7 +20,7 @@ export const StakeWithAccount = ({
fetchStakingData
);
if (isLoading || !data) {
return <Skeleton width={400} height={150} />;
return <LoadingAnimation size={70} />;
}

if (isError) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/CarmineStaking/StakingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export const unstakeAndStake = async (
const approveCall = {
contractAddress: VE_CRM_ADDRESS,
entrypoint: "approve",
calldata: [GOVERNANCE_ADDRESS, amount, 0],
calldata: [GOVERNANCE_ADDRESS, amount.toString(10), 0],
};
const stakeCall = {
contractAddress: GOVERNANCE_ADDRESS,
entrypoint: "stake",
calldata: [length, amount],
calldata: [length.toString(10), amount.toString(10)],
};

const res = await account
Expand Down

0 comments on commit 3b18601

Please sign in to comment.