UNPKG

@r3l/app

Version:
2 lines 7.4 kB
(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[43],{"./public/img/icons/reddit.png":function(e,t,n){e.exports=n.p+"public/img/reddit.png"},"./public/img/icons/twitter_white.png":function(e,t,n){e.exports=n.p+"public/img/twitter_white.png"},"./public/img/uniswap.png":function(e,t,n){e.exports=n.p+"public/img/uniswap.png"},"./src/modules/getTokens/web/getTokensModal.container.js":function(e,t,n){"use strict";n.r(t);var r=n("../../node_modules/@babel/runtime/helpers/extends.js"),o=n.n(r),a=n("../../node_modules/@babel/runtime/helpers/classCallCheck.js"),c=n.n(a),i=n("../../node_modules/@babel/runtime/helpers/createClass.js"),u=n.n(i),s=n("../../node_modules/@babel/runtime/helpers/inherits.js"),l=n.n(s),d=n("../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),p=n.n(d),m=n("../../node_modules/@babel/runtime/helpers/getPrototypeOf.js"),b=n.n(m),f=n("../../node_modules/react/index.js"),h=n.n(f),E=n("../../node_modules/prop-types/index.js"),g=n.n(E),_=n("./src/modules/auth/auth.actions.js"),w=n("./src/modules/navigation/navigation.actions.js"),j=n("../../node_modules/redux/es/redux.js"),x=n("../../node_modules/react-redux/es/index.js"),O=n("./src/modules/styled/index.ts"),y=n("./src/modules/wallet/price.context.js");function v(){var e=Object(x.c)(),t=n("./public/img/uniswap.png"),r=Object(y.exchangeLink)();return h.a.createElement(O.A,{to:r,external:!0,sx:{mr:["auto",0]},target:"_blank"},h.a.createElement(O.t,{sx:{width:["auto",176],bg:"uniswap",m:0},onPress:function(){return e(Object(w.goToUrl)(r))}},h.a.createElement(O.B,{sx:{justifyContent:"center",alignItems:"center"}},h.a.createElement(O.v,{resizeMode:"contain",source:t,sx:{width:4,height:4,mr:1}}),h.a.createElement(O.y,{sx:{color:"white"}},"Uniswap Exchange"))))}var C=function(){return h.a.createElement(O.f,null,Object(y.tokenEnabled)()&&h.a.createElement(f.Fragment,null,h.a.createElement(O.e,{sx:{mt:2,mb:3}},"You can buy and sell tokens on Uniswap Exchange"),h.a.createElement(v,null),h.a.createElement(O.o,{sx:{mt:4}})),h.a.createElement(O.K,{sx:{mt:3,justifyContent:"space-between"}},h.a.createElement(O.e,null,"Notice: All airdrop token rewards have been discontinued."),h.a.createElement(O.e,{sx:{mt:1}},"Users no longer receive tokens for referrals or email/Twitter confirmations.")))};function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var P=n("./public/img/icons/twitter_white.png"),A=n("./public/img/icons/reddit.png"),T=function(){return h.a.createElement(O.A,{to:"/auth/twitter",external:!0,sx:{mr:["auto",0],mt:3}},h.a.createElement(O.t,{sx:{width:["auto",176],bg:"twitterBlue",m:0}},h.a.createElement(O.v,{resizeMode:"contain",source:P,sx:{width:4,height:4,mr:12.0015}}),h.a.createElement(O.y,{sx:{color:"white"}},"Connect Twitter")))},S=function(){return h.a.createElement(O.A,{to:"/auth/reddit",external:!0,mr:["auto",0],mt:3},h.a.createElement(O.t,{sx:{width:["auto",176],bg:"redditColor",m:0},fdirection:"row"},h.a.createElement(O.v,{resizeMode:"contain",source:A,sx:{width:4,height:4,mr:12.0015}}),h.a.createElement(O.y,{sx:{color:"white"}},"Connect Reddit")))},D=function(e){l()(n,e);var t=R(n);function n(){return c()(this,n),t.apply(this,arguments)}return u()(n,[{key:"render",value:function(){return h.a.createElement(C,o()({},this.props,{twitterButton:h.a.createElement(T,null),redditButton:h.a.createElement(S,null)}))}}]),n}(f.Component);D.propTypes={actions:g.a.object,close:g.a.func,auth:g.a.object};t.default=Object(x.b)((function(e){return{auth:(null==e?void 0:e.auth)||{}}}),(function(e){return{actions:Object(j.b)({sendConfirmation:_.sendConfirmation,showModal:w.showModal},e)}}))(D)},"./src/modules/wallet/price.context.js":function(e,t,n){"use strict";n.r(t),n.d(t,"PriceContext",(function(){return j})),n.d(t,"exchangeLink",(function(){return x})),n.d(t,"tokenEnabled",(function(){return O})),n.d(t,"usePrice",(function(){return y})),n.d(t,"default",(function(){return v}));var r=n("../../node_modules/@babel/runtime/helpers/defineProperty.js"),o=n.n(r),a=n("../../node_modules/@babel/runtime/helpers/asyncToGenerator.js"),c=n.n(a),i=n("../../node_modules/@babel/runtime/helpers/slicedToArray.js"),u=n.n(i),s=n("../../node_modules/@babel/runtime/regenerator/index.js"),l=n.n(s),d=n("../../node_modules/react/index.js"),p=n.n(d),m=n("../../node_modules/prop-types/index.js"),b=n.n(m),f=n("./src/utils/numbers.js");n("./src/utils/env.js");function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=Object({BROWSER:!0,NODE_ENV:"production",WEB:"true",NETWORK_NUMBER:"1",VAPID_PUBLIC_KEY:"BJp16DSJF-SdwZ3yxE2cK502FKKI7hxTON6YDoCaTctcq9sr3scJS1iTsa3YSlvOV-p2_P51cNWF5-os4Gc0rq4",INFURA_PROTOCOL:"ws",INFURA_API_KEY:"7d2819de98bb46108cae44811facb5e0",TOKEN_ADDRESS:"0xb6c4267C4877BB0D6b1685Cfd85b0FBe82F105ec",RECAPTCHA_KEY:"6LeyI8EZAAAAAN4S0f9BaSOf7Hks5xTR7CebrgsG"}),_=g.TOKEN_ADDRESS,w=g.DISABLE_PRICE,j=p.a.createContext(0);function x(){return"https://uniswap.exchange/swap?theme=dark&outputCurrency=".concat(_)}function O(){return!!_}function y(e,t){var n=Object(d.useContext)(j).price;return n?"number"===t?Object(f.abbreviateNumber)(n*e):" ($".concat(Object(f.abbreviateNumber)(n*e,2),")"):""}function v(e){var t=e.children,n=Object(d.useReducer)(C,{loading:!1,error:!1,data:null,refresh:0}),r=u()(n,2),o=r[0],a=r[1];Object(d.useEffect)((function(){return function(){var e=c()(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a({type:"FETCH_PRICE_INIT"}),_&&!w){e.next=3;break}return e.abrupt("return");case 3:case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()(),setTimeout((function(){a({type:"REFRESH_PRICE"})}),6e4),function(){!0}}),[o.refresh]);var i=function(e){if(!e)return null;var t=e.ethReserve,n=e.tokenReserve,r=e.ethPrice;if(!t||!n)return null;var o=t.amount.div(n.amount).times(r);return parseFloat(o.toString())}(o.data),s="($".concat(Object(f.abbreviateNumber)(i,2),")");return p.a.createElement(j.Provider,{value:{price:i,priceString:s}},t)}v.propTypes={children:b.a.node};var C=function(e,t){switch(t.type){case"REFRESH_PRICE":return E(E({},e),{},{refresh:e.refresh+1});case"FETCH_PRICE_INIT":return E(E({},e),{},{loading:!0,error:!1});case"FETCH_PRICE_SUCCESS":return E(E({},e),{},{loading:!1,error:!1,data:t.payload});case"FETCH_PRICE_ERROR":return E(E({},e),{},{loading:!1,error:t.payload});default:throw new Error}}}}]); //# sourceMappingURL=getTokens-web-getTokensModal-container.bundle.f8485c08e1ae48a91b95.js.map