Skip to content

Commit

Permalink
fix approvals
Browse files Browse the repository at this point in the history
  • Loading branch information
starknetdev committed Sep 10, 2024
1 parent 6c2d3c1 commit 08a4030
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ui/src/app/lib/utils/syscalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ export function createSyscalls({
freeVRF: boolean,
costToPlay?: number
) => [
...spawnCalls,
...(freeVRF
? []
: [
Expand All @@ -429,8 +428,13 @@ export function createSyscalls({
{
contractAddress: lordsContract?.address ?? "",
entrypoint: "approve",
calldata: [gameContract?.address ?? "", costToPlay!.toString(), "0"],
calldata: [
gameContract?.address ?? "",
(costToPlay! * 1.1)!.toString(),
"0",
],
},
...spawnCalls,
];

const handleInsufficientFunds = (currency: "eth" | "lords") => {
Expand Down Expand Up @@ -484,6 +488,8 @@ export function createSyscalls({
}
}

console.log(spawnCalls);

await executeSpawn(formData, spawnCalls);
};

Expand Down

0 comments on commit 08a4030

Please sign in to comment.