Error when supplying 1.15 value as multiplier in overrides of sendUserOperation or buildUserOperation #1109
Answered
by
moldy530
HatimPatwa
asked this question in
Issues
-
I am getting this error when supplying 1.15 value as multiplier in overrides of sendUserOperation or buildUserOperation
codeSnippet: //entry point contract is the second argument
//@ts-ignore
uoEstimate = await smartAccountClient.buildUserOperation({
//@ts-ignore
uo: uoData,
overrides: {
// paymasterAndData: "0x"
maxFeePerGas: {
multiplier: maxFeePerGasMultiplier, //this value as 1.15
},
maxPriorityFeePerGas: {
multiplier: maxPriorityFeePerGasMultiplier, //haven't tried 1.15 here but can be error here too
}
}
//@ts-ignore
}, "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"); I think its a bug how JS handles floating points numbers. I had to handle it this way maxFeeMultiplier = parseFloat((maxFeePerGasMultiplier + 0.05).toFixed(2)); //to avoid 64 bit precision error in js hope this helps!! |
Beta Was this translation helpful? Give feedback.
Answered by
moldy530
Nov 7, 2024
Replies: 2 comments 1 reply
-
It will help. If we get a reply on this. Kind of stuck due to this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey sorry for the delay, I'm taking a look now |
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
fix is in this PR: #1135