var f=(s,r,e)=>new Promise((i,c)=>{var n=t=>{try{a(e.next(t))}catch(o){c(o)}},u=t=>{try{a(e.throw(t))}catch(o){c(o)}},a=t=>t.done?i(t.value):Promise.resolve(t.value).then(n,u);a((e=e.apply(s,r)).next())});import{useEffect as P,useState as m}from"react";import{useWeb3React as G}from"@web3-react/core";var g=()=>{let[s,r]=m(0),{provider:e}=G();return P(()=>{e&&(()=>f(void 0,null,function*(){try{let c=yield e.getGasPrice();r(c.div(1e9).toNumber())}catch(c){console.log(c)}}))()},[e]),s},b=g;export{b as default};
