Skip to content

Commit

Permalink
fix sale
Browse files Browse the repository at this point in the history
  • Loading branch information
sstraatemans committed Oct 24, 2024
1 parent a63032a commit 869b987
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface IProps {
}

export const NormalBid: FC<IProps> = ({ data, tokenImageUrl }) => {
console.log({ data });
return (
<CardContentBlock
title="Buy token"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ const Bid = ({
);
}

if (data?.saleType === '') {
return <NormalBid data={data} tokenImageUrl={tokenImageUrl} />;
}

if (saleId) {
return (
<CardContentBlock
Expand Down Expand Up @@ -73,10 +77,6 @@ const Bid = ({
);
}

if (data?.saleType === '') {
return <NormalBid data={data} tokenImageUrl={tokenImageUrl} />;
}

return (
<>
<Stack flex={1} flexDirection="column"></Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export const RegularSale = ({ sale }: RegularSaleProps) => {

const onTransactionSigned = (transaction: IUnsignedCommand | ICommand) => {
setTransaction(transaction);
router.push(`/transaction?returnUrl=/tokens`);
deleteSale();
router.push(
`/transaction?returnUrl=/tokens/${sale.tokenId}?chainId=${sale.chainId}`,
);
};
const config = {
host: env.URL,
Expand Down Expand Up @@ -102,7 +105,6 @@ export const RegularSale = ({ sale }: RegularSaleProps) => {
},
},
).execute();
deleteSale();
} catch (error) {
console.error(error);
}
Expand Down

0 comments on commit 869b987

Please sign in to comment.