Replies: 1 comment 1 reply
-
This should help fix, I will merge and do a release now, please let me know if that fixes for you #1639 |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
This is the code in your sdk only allowing bignumberish "wrapEth({ amountInEth, accountAddress, }: {
amountInEth: BigNumberish;
accountAddress: string;
}): Promise;
/**
* Unwrap WETH into ETH.
* Emits the
UnwrapWeth
event when the transaction is prompted.* @param options
* @param options.amountInEth How much WETH to unwrap
* @param options.accountAddress Address of the user's wallet containing the WETH
*/"
and following is my the error i get when i try to wrap below 1 eth
"Wraping failed error (attempt 2): TypeError: underflow (argument="value", value=0.2, code=INVALID_ARGUMENT, version=6.12.0)"
i am getting this error when i try to wrap eth less then "1" but it works perfectly when i try to wrap more then 1
"it maybe because Wrapeth in sdk only accept bignumberish"
and following is my code
""async function Wrapeth(amountInEth, accountAddress) {
const maxRetries = 3; // Define the maximum number of retries
async function WrappingWithRetry() {
for (let retry = 0; retry < maxRetries; retry++) {
try {
const order = await openseaSDK.wrapEth({
amountInEth: amountInEth,
accountAddress: accountAddress,
});
return order;
} catch (error) {
console.error(Wraping failed error (attempt ${retry + 1}):, error);
await sleep(5000); // Wait for 5 seconds before retrying
}
}
return null; // If max retries reached, return null or handle as needed
}
return WrappingWithRetry();
}"
I am using the following code and it works perfectly when i wrap more then "1" but gives error when its less then "1""
and yes i am using the latest version
Beta Was this translation helpful? Give feedback.
All reactions