Skip to content

Commit

Permalink
feat: modify call data
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushtom committed Jan 10, 2024
1 parent dfa2d90 commit 3638504
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion app/quest-boost/claim/[boostId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ export default function Page({ params }: BoostQuestPageProps) {
)}
</div>
<div className={styles.claim_button_text}>
<p className={styles.claim_amount}>{boost?.amount}</p>
<p className={styles.claim_amount}>
{boost
? parseInt(
String(boost?.amount / boost?.num_of_winners)
)
: 0}
</p>
</div>
<div className={styles.token_symbol_container}>
<div className="bg-[#1F1F25] flex-1 rounded-[12px] flex justify-center items-center">
Expand Down
4 changes: 3 additions & 1 deletion utils/callData.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { CallData, uint256 } from "starknet";

export function boostClaimCall(boost: Boost, sign: Signature) {
const amount = uint256.bnToUint256(boost.amount / boost.num_of_winners);
const amount = uint256.bnToUint256(
parseInt(String(boost.amount / boost.num_of_winners))
);
const claimCallData = CallData.compile({
amount: amount,
token: boost.token,
Expand Down

0 comments on commit 3638504

Please sign in to comment.