Commit 806623c6 authored by Moody Salem's avatar Moody Salem

save some calls on the redundant chain id requests

parent 3272f8e9
...@@ -53,6 +53,9 @@ class MiniRpcProvider implements AsyncSendable { ...@@ -53,6 +53,9 @@ class MiniRpcProvider implements AsyncSendable {
if (typeof method !== 'string') { if (typeof method !== 'string') {
return this.request(method.method, method.params) return this.request(method.method, method.params)
} }
if (method === 'eth_chainId') {
return `0x${this.chainId.toString(16)}`
}
const response = await fetch(this.url, { const response = await fetch(this.url, {
method: 'POST', method: 'POST',
body: JSON.stringify({ body: JSON.stringify({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment