Replies: 1 comment
-
Hmm yeah, I would rather not be opinionated about this, because maybe some chain might (arguably) use a gasPrice of zero. Best to resolve the bug upstream. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there an existing issue for this?
Package Version
2.9.8
Current Behavior
We had an interesting bug in our code where we pass
0n
togasPrice
inprepareTransactionRequest
:Then MetaMask would fail to populate a gas price while wallets like rabby has no such issue:
I just checked the source code here
viem/src/actions/public/estimateFeesPerGas.ts
Line 171 in 0309572
Seems it would take the
0n
as gasPrice.Expected Behavior
I'm not sure if viem should handle the
0n
case, probably not, then a warning might be helpful?Steps To Reproduce
No response
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
No response
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions