var n=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var h=(s,e)=>{for(var t in e)n(s,t,{get:e[t],enumerable:!0})},l=(s,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of p(e))!d.call(s,c)&&c!==t&&n(s,c,{get:()=>e[c],enumerable:!(a=g(e,c))||a.enumerable});return s};var b=s=>l(n({},"__esModule",{value:!0}),s);var u=(s,e,t)=>new Promise((a,c)=>{var m=r=>{try{i(t.next(r))}catch(f){c(f)}},G=r=>{try{i(t.throw(r))}catch(f){c(f)}},i=r=>r.done?a(r.value):Promise.resolve(r.value).then(m,G);i((t=t.apply(s,e)).next())});var R={};h(R,{default:()=>y});module.exports=b(R);var o=require("react"),P=require("@web3-react/core");var v=()=>{let[s,e]=(0,o.useState)(0),{provider:t}=(0,P.useWeb3React)();return(0,o.useEffect)(()=>{t&&(()=>u(void 0,null,function*(){try{let c=yield t.getGasPrice();e(c.div(1e9).toNumber())}catch(c){console.log(c)}}))()},[t]),s},y=v;
