Number underflow when try to use fractional ETH in order
const listing = await openseaSDK.createSellOrder({
asset: {
tokenId,
tokenAddress,
},
accountAddress,
startAmount: 0.1,
expirationTime
})
Causes error
underflow [ See: https://links.ethers.org/v5-errors-NUMERIC_FAULT-underflow ] (fault="underflow", operation="BigNumber.from", value=0.1, code=NUMERIC_FAULT, version=bignumber/5.7.0)
I am having a hard time reproducing the error on my end. Can you let me know what tokenAddress you are using? Also if you could send over the entire error logs it could be helpful.
@JoshuaSchmidt-OpenSea Hey Please find the real payload example below
{
"asset": {
"tokenId": "2254",
"tokenAddress": "0x7172b87400b850069c425ecd18f2c2553b7fb479"
},
"accountAddress": "0xe05eb8fcd5203aa6cceebc4bd5e926f1e76dc405",
"startAmount": 0.1,
"expirationTime": 1686431934
}
same for this one
{
"asset": {
"tokenId": "2105",
"tokenAddress": "0x75c51f0ee60963454f27e196a8d9095eb47cb886"
},
"accountAddress": "0xe05eb8fcd5203aa6cceebc4bd5e926f1e76dc405",
"startAmount": 0.1,
"expirationTime": 1686557552
}
@MaximusDecimus
Thanks, I was able to recreate the error. I will work on a fix for it. But for now, if you pass in the startAmount as a string, you will avoid this error.
Got it, thanks