Replies: 1 comment 2 replies
-
In v5, BigNumber moved out of utils, so you just have to remove |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
So, I have the following:
console.log(nft.auctionDetails.bidCount);
console.log(ethers.utils.BigNumber.isBigNumber(nft.auctionDetails.bidCount));
The first console.log produced:
{ type: 'BigNumber', hex: '0x00' }
But the second one is giving me:
TypeError: Cannot read property 'isBigNumber' of undefined
Does anyone know what I might be doing wrong?
I tried ethers.utils.BigNumber.from, ethers.utils.BigNumber.toString(), all getting undefined.
Here is the console.log of the whole nft object:
{
price: '0.1',
tokenId: { type: 'BigNumber', hex: '0x02' },
itemId: 1,
saleCount: 0,
seller: '0x61A3d01D4F7Ab602E44F24E7D139395c67069a05',
owner: '0x0000000000000000000000000000000000000000',
isAuctionable: true,
image: 'https://ipfs.io/ipfs/QmNULKvXAx8E3YhaTb9xnUiU6C6CA3XHvLd9eK3c9hrjzM',
name: 'test',
collection: 'aswhiskey',
description: 'test',
auctionDetails: {
'0': { type: 'BigNumber', hex: '0x6284c1f3' },
'1': true,
'2': false,
'3': '0x0000000000000000000000000000000000000000',
'4': { type: 'BigNumber', hex: '0x016345785d8a0000' },
'5': { type: 'BigNumber', hex: '0x00' },
endAt: 1652867571,
started: true,
ended: false,
highestBidder: '0x0000000000000000000000000000000000000000',
highestBid: '0.1',
bidCount: { type: 'BigNumber', hex: '0x00' }
}
}
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions