File: /var/www/doco/testConnect/js/app.fd32d894.js
(function(n){function e(e){for(var r,u,i=e[0],a=e[1],s=e[2],f=0,d=[];f<i.length;f++)u=i[f],Object.prototype.hasOwnProperty.call(c,u)&&c[u]&&d.push(c[u][0]),c[u]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(n[r]=a[r]);l&&l(e);while(d.length)d.shift()();return o.push.apply(o,s||[]),t()}function t(){for(var n,e=0;e<o.length;e++){for(var t=o[e],r=!0,i=1;i<t.length;i++){var a=t[i];0!==c[a]&&(r=!1)}r&&(o.splice(e--,1),n=u(u.s=t[0]))}return n}var r={},c={app:0},o=[];function u(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,u),t.l=!0,t.exports}u.m=n,u.c=r,u.d=function(n,e,t){u.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},u.r=function(n){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},u.t=function(n,e){if(1&e&&(n=u(n)),8&e)return n;if(4&e&&"object"===typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(u.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)u.d(t,r,function(e){return n[e]}.bind(null,r));return t},u.n=function(n){var e=n&&n.__esModule?function(){return n["default"]}:function(){return n};return u.d(e,"a",e),e},u.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},u.p="http://35.241.108.211/testConnect/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],a=i.push.bind(i);i.push=e,i=i.slice();for(var s=0;s<i.length;s++)e(i[s]);var l=a;o.push([0,"chunk-vendors"]),t()})({0:function(n,e,t){n.exports=t("56d7")},1:function(n,e){},10:function(n,e){},11:function(n,e){},12:function(n,e){},13:function(n,e){},14:function(n,e){},15:function(n,e){},16:function(n,e){},17:function(n,e){},18:function(n,e){},19:function(n,e){},2:function(n,e){},20:function(n,e){},21:function(n,e){},22:function(n,e){},23:function(n,e){},24:function(n,e){},25:function(n,e){},26:function(n,e){},3:function(n,e){},4:function(n,e){},5:function(n,e){},"56d7":function(n,e,t){"use strict";t.r(e);t("e260"),t("e6cf"),t("cca6"),t("a79d");var r=t("7a23"),c=Object(r["f"])("img",{alt:"Vue logo",src:"https://static.vecteezy.com/system/resources/previews/000/548/225/original/cryptocurrency-and-blockchain-icons-or-logo-vector.jpg",height:"250"},null,-1);function o(n,e,t,o,u,i){var a=Object(r["n"])("HelloWorld");return Object(r["l"])(),Object(r["e"])(r["a"],null,[c,Object(r["h"])(a,{msg:"Demo"})],64)}var u={class:"hello"},i=Object(r["f"])("br",null,null,-1),a={key:0},s=Object(r["g"])(" 0x1A739A381622f634DF785CBA7BB869b41Af2F45a "),l={style:{color:"red"}},f=Object(r["f"])("br",null,null,-1),d=Object(r["f"])("button",null,"EMPTY",-1),p=Object(r["f"])("br",null,null,-1),b=Object(r["f"])("button",null,"EMPTY",-1),h=Object(r["f"])("br",null,null,-1),g=Object(r["f"])("button",null,"EMPTY",-1);function w(n,e,t,c,o,w){var m=Object(r["n"])("Skeletor");return Object(r["l"])(),Object(r["e"])("div",u,[Object(r["f"])("h1",null,Object(r["o"])(t.msg),1),Object(r["f"])("button",{onClick:e[0]||(e[0]=function(){return w.sendTransaction&&w.sendTransaction.apply(w,arguments)})},"send transaction MASK"),Object(r["f"])("button",{onClick:e[1]||(e[1]=function(){return w.sendTransactionTrustWallet&&w.sendTransactionTrustWallet.apply(w,arguments)})},"send transaction TRUST"),i,Object(r["f"])("button",{onClick:e[2]||(e[2]=function(){return w.getChainMask&&w.getChainMask.apply(w,arguments)})},"getChainMask()"),Object(r["f"])("button",{onClick:e[3]||(e[3]=function(){return w.getChainTrust&&w.getChainTrust.apply(w,arguments)})},"chainIdTRUST()"),o.testAddr1?(Object(r["l"])(),Object(r["e"])("h3",a,[s,Object(r["f"])("span",l,[f,Object(r["g"])(" "+Object(r["o"])(this.testAddr1),1)])])):(Object(r["l"])(),Object(r["d"])(m,{key:1,width:"200",height:"50",style:{"margin-left":"40%","margin-top":"2%"},pill:""})),d,Object(r["f"])("button",{onClick:e[4]||(e[4]=function(n){return w.connectToTrust()})},"conect TrustWallet"),p,b,Object(r["f"])("button",{onClick:e[5]||(e[5]=function(n){return w.diconnectTrust()})},"disconnect TRUST"),h,g,Object(r["f"])("button",{onClick:e[6]||(e[6]=function(n){return w.signTrust()})},"sign TrustWallet")])}var m=t("1da1"),O=(t("96cf"),t("99e5")),j=t.n(O),v=t("df33"),y=t("2eaf"),T=new y["a"]({infuraId:"62f3555371db4581aba56bbe1a7b063d"}),x=new j.a(T);T.on("connect",Object(m["a"])(regeneratorRuntime.mark((function n(){var e;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,x.eth.getAccounts();case 2:e=n.sent,alert(e);case 4:case"end":return n.stop()}}),n)})))),T.on("disconnect",Object(m["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:alert("wallet diconnected");case 1:case"end":return n.stop()}}),n)}))));var B={name:"HelloWorld",components:{Skeletor:v["a"]},props:{msg:String},created:function(){"undefined"!==typeof window.ethereum?(console.log("Mask installed"),this.web3=new j.a(window.ethereum),this.setBalances()):console.log("Mask not installed")},data:function(){return{web3:null,testAddr1:null,testAddr2:null}},methods:{setBalances:function(){var n=Object(m["a"])(regeneratorRuntime.mark((function n(){var e=this;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,this.web3.eth.getBalance("0x1A739A381622f634DF785CBA7BB869b41Af2F45a").then((function(n){e.testAddr1=e.web3.utils.fromWei(n,"ether")})).catch((function(n){console.log(n)}));case 2:return n.next=4,this.web3.eth.getBalance("0xAafBB749F9F26a764B3d969Ff73Bb2Aa5c0762fE").then((function(n){e.testAddr2=e.web3.utils.fromWei(n,"ether")}));case 4:case"end":return n.stop()}}),n,this)})));function e(){return n.apply(this,arguments)}return e}(),sendTransaction:function(){var n=this;return Object(m["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,n.web3.eth.sendTransaction({from:"0x1A739A381622f634DF785CBA7BB869b41Af2F45a",to:"0x0b8F6613225FDE96396249554E451F73C9cB756D",value:n.web3.utils.toWei("0.1","ether")}).then((function(n){console.log(n)}));case 2:case"end":return e.stop()}}),e)})))()},sendTransactionTrustWallet:function(){var n=Object(m["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return console.log("fdfdf"),n.next=3,x.eth.sendTransaction({from:"0x84Be48d6BAB2478cc4132d893eB3155328415d0a",to:"0x1A739A381622f634DF785CBA7BB869b41Af2F45a",value:this.web3.utils.toWei("0.1","ether")}).then((function(n){console.log(n)}));case 3:case"end":return n.stop()}}),n,this)})));function e(){return n.apply(this,arguments)}return e}(),getChainMask:function(){this.web3.eth.getChainId().then((function(n){console.log(n)}))},getChainTrust:function(){var n=Object(m["a"])(regeneratorRuntime.mark((function n(){var e;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,x.eth.getChainId();case 2:e=n.sent,console.log(e);case 4:case"end":return n.stop()}}),n)})));function e(){return n.apply(this,arguments)}return e}(),connectToTrust:function(){var n=Object(m["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,T.enable();case 2:case"end":return n.stop()}}),n)})));function e(){return n.apply(this,arguments)}return e}(),diconnectTrust:function(){var n=Object(m["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,T.disconnect();case 2:case"end":return n.stop()}}),n)})));function e(){return n.apply(this,arguments)}return e}(),signTrust:function(){var n=Object(m["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,x.eth.sign("0x84Be48d6BAB2478cc4132d893eB3155328415d0a","0x84Be48d6BAB2478cc4132d893eB3155328415d0a").then((function(n){console.log(n)})).catch((function(n){console.log(n)}));case 2:case"end":return n.stop()}}),n)})));function e(){return n.apply(this,arguments)}return e}()}},k=(t("8e8d"),t("6b0d")),A=t.n(k);const C=A()(B,[["render",w]]);var R=C,F={name:"App",components:{HelloWorld:R}};t("6303");const M=A()(F,[["render",o]]);var S=M;Object(r["c"])(S).mount("#app")},6:function(n,e){},6303:function(n,e,t){"use strict";t("8afa")},7:function(n,e){},8:function(n,e){},"8afa":function(n,e,t){},"8e8d":function(n,e,t){"use strict";t("9b86")},9:function(n,e){},"9b86":function(n,e,t){}});
//# sourceMappingURL=app.fd32d894.js.map