Skip to content
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.

Commit

Permalink
fix(convert tokenId to bigint from tokenID)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jipperism committed Nov 21, 2023
1 parent 66664ee commit a51d3bb
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 69 deletions.
7 changes: 3 additions & 4 deletions frontend/components/split-fraction-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function SplitFractionButton({
className,
disabled,
}: Props) {
const [open, setOpen] = useState(true);
const [open, setOpen] = useState(false);
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);

Expand Down Expand Up @@ -96,7 +96,7 @@ export function SplitFractionButton({
return;
}
await write(
tokenId,
BigInt(tokenId),
values.units.map((x) => BigInt(x)),
);
}}
Expand Down Expand Up @@ -162,8 +162,7 @@ export function SplitFractionButton({
type="button"
onClick={() => arrayHelpers.push("")}
>
{/* show this when user has removed all friends from the list */}
Add a friend
Add a fraction
</Button>
)}
{errors.units && (
Expand Down
4 changes: 2 additions & 2 deletions frontend/hooks/splitClaimUnits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export const useSplitFractionUnits = ({

const publicClient = client.config.publicClient;

const initializeWrite = async (id: bigint, fractions: bigint[]) => {
const initializeWrite = async (fractionId: bigint, fractions: bigint[]) => {
setStep("splitting");
try {
setTxPending(true);

const hash = await client.splitFractionUnits(id, fractions);
const hash = await client.splitFractionUnits(fractionId, fractions);

const receipt = await publicClient?.waitForTransactionReceipt({
confirmations: 3,
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@graphprotocol/client-cli": "^2.2.16",
"@hypercerts-org/contracts": "0.9.0",
"@hypercerts-org/observabletreemap": "workspace: *",
"@hypercerts-org/sdk": "1.0.0-alpha.8",
"@hypercerts-org/sdk": "1.0.0-alpha.9",
"@mui/icons-material": "^5.11.9",
"@mui/material": "^5.11.2",
"@mui/x-date-pickers": "^5.0.12",
Expand Down
Loading

0 comments on commit a51d3bb

Please sign in to comment.