Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lifayi2008 committed Nov 29, 2022
1 parent 547c6eb commit 00feeb2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/dialog/Purchase.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ export default function Purchase(props) {
const { isOpen, setOpen, info, coinType = {} } = props;
const { v1State = false } = info;

console.log('Purchase info', info);

const coinBalance = balanceArray[coinType.index];
const coinName = coinType.name;
let priceInfo = info.Price;
let priceInfo = info.order.price;
if (info.orderType === auctionOrderType && info.buyoutPrice) priceInfo = info.buyoutPrice;
const handleClose = () => {
setOpen(false);
Expand Down Expand Up @@ -233,7 +235,7 @@ export default function Purchase(props) {
} else if (sessionStorage.getItem('PASAR_LINK_ADDRESS') === '2') {
const buyerDidUri = await sendIpfsDidJson();
console.log('didUri:', buyerDidUri);
callBuyOrder(info.OrderId, buyerDidUri, buyPrice);
callBuyOrder(info.order.orderId, buyerDidUri, buyPrice);
}
};

Expand Down Expand Up @@ -273,7 +275,7 @@ export default function Purchase(props) {

const price = priceInfo / 1e18;
const platformFee = math.round((price * 2) / 100, 4);
const royalties = info.SaleType === 'Primary Sale' ? 0 : math.round((price * info.royalties) / 10 ** 6, 4);
const royalties = math.round((price * info.royaltyFee) / 10 ** 6, 4);
return (
<Dialog open={isOpen} onClose={handleClose}>
<DialogTitle>
Expand Down Expand Up @@ -302,7 +304,7 @@ export default function Purchase(props) {
<br />
from{' '}
<Typography variant="h5" sx={{ display: 'inline', color: 'text.primary' }}>
{reduceHexAddress(info.holder)}
{reduceHexAddress(info.tokenOwner)}
</Typography>
<br />
for{' '}
Expand Down

1 comment on commit 00feeb2

@vercel
Copy link

@vercel vercel bot commented on 00feeb2 Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.