diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..2cf1da45 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +dist +build \ No newline at end of file diff --git a/packages/safe-apps-developer-ui/build/static/js/main.c31c54ea.chunk.js b/packages/safe-apps-developer-ui/build/static/js/main.c31c54ea.chunk.js new file mode 100644 index 00000000..b012546d --- /dev/null +++ b/packages/safe-apps-developer-ui/build/static/js/main.c31c54ea.chunk.js @@ -0,0 +1,2 @@ +(this["webpackJsonp@gnosis.pm/safe-apps-developer-ui"]=this["webpackJsonp@gnosis.pm/safe-apps-developer-ui"]||[]).push([[0],{154:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.METHODS=void 0,t.METHODS={getEnvInfo:"getEnvInfo",sendTransactions:"sendTransactions",rpcCall:"rpcCall",getSafeInfo:"getSafeInfo"}},162:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;var i=c(n(388));t.default=i.default,a(n(388),t),a(n(783),t),a(n(154),t),a(n(392),t);var o=n(393);Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return o.getSDKVersion}})},388:function(e,t,n){"use strict";var r=n(4),a=n(56),c=n(24),i=n(39),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(389),d=o(n(389)),l=n(780),u=n(781),p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(c(this,e),"undefined"===typeof window)throw new Error("Error initializing the sdk: window is undefined");var n=t.whitelistedDomains,r=void 0===n?null:n,a=t.debug,i=void 0!==a&&a;this.communicator=new d.default(r,i),this.eth=new u.Eth(this.communicator),this.txs=new l.TXs(this.communicator),this.bootstrap()}return i(e,[{key:"bootstrap",value:function(){var e=a(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getEnvInfo();case 2:t=e.sent,n=t.txServiceUrl,this.txs.setTxServiceUrl(n);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getEnvInfo",value:function(){var e=a(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.communicator.send(s.METHODS.getEnvInfo,void 0);case 2:if((t=e.sent).success){e.next=5;break}throw new Error(t.error);case 5:return e.abrupt("return",t.data);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getSafeInfo",value:function(){var e=a(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.communicator.send(s.METHODS.getSafeInfo,void 0);case 2:if((t=e.sent).success){e.next=5;break}throw new Error(t.error);case 5:return e.abrupt("return",t.data);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}();t.default=p},389:function(e,t,n){"use strict";var r=n(24),a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),c=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||a(t,e,n)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n(751)),s=n(392);t.default=function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r(this,e),this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isValidMessage=function(e){var n=e.origin,r=e.data,a=!r,c=e.source===window.parent,i="undefined"!==typeof r.version&&o.default.gte(r.version,"1.0.0"),s=!0;return Array.isArray(t.allowedOrigins)&&(s=void 0!==t.allowedOrigins.find((function(e){return e.test(n)}))),!a&&c&&i&&s},this.logIncomingMessage=function(e){console.info("Safe Apps SDK v1: A message was received from origin ".concat(e.origin,". "),e.data)},this.onParentMessage=function(e){t.isValidMessage(e)&&(t.debugMode&&t.logIncomingMessage(e),t.handleIncomingMessage(e.data))},this.handleIncomingMessage=function(e){var n=e.id,r=t.callbacks.get(n);r&&(r(e),t.callbacks.delete(n))},this.send=function(e,n){var r=s.MessageFormatter.makeRequest(e,n);if("undefined"===typeof window)throw new Error("Window doesn't exist");return window.parent.postMessage(r,"*"),new Promise((function(e){t.callbacks.set(r.id,(function(t){e(t)}))}))},this.allowedOrigins=n,this.debugMode=a,window.addEventListener("message",this.onParentMessage)},c(n(154),t)},392:function(e,t,n){"use strict";var r=n(24);Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFormatter=void 0;var a=n(778),c=n(393),i=function e(){r(this,e)};t.MessageFormatter=i,i.makeRequest=function(e,t){return{id:a.generateRequestId(),method:e,params:t,env:{sdkVersion:c.getSDKVersion()}}},i.makeResponse=function(e,t,n){return{id:e,success:!0,version:n,data:t}},i.makeErrorResponse=function(e,t,n){return{id:e,success:!1,error:t,version:n}}},393:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;var a=r(n(779));t.getSDKVersion=function(){return a.default.version.slice(0,5)}},450:function(e,t){},503:function(e,t){},505:function(e,t){},515:function(e,t){},517:function(e,t){},543:function(e,t){},544:function(e,t){},549:function(e,t){},551:function(e,t){},558:function(e,t){},571:function(e,t){},778:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRequestId=void 0;var r=function(e){return e.toString(16).padStart(2,"0")};t.generateRequestId=function(){return"undefined"!==typeof window?function(e){var t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,r).join("")}(10):(new Date).getTime().toString(36)}},779:function(e){e.exports=JSON.parse('{"name":"@gnosis.pm/safe-apps-sdk","version":"2.3.0","description":"SDK developed to integrate third-party apps with Safe-Multisig app.","main":"dist/src/index.js","typings":"dist/src/index.d.ts","_files":["dist/**/*","README.md"],"keywords":["Gnosis","sdk","apps"],"scripts":{"test":"jest","format-dist":"sed -i \'\' \'s/\\"files\\":/\\"_files\\":/\' dist/package.json","build":"yarn rimraf dist && tsc && yarn format-dist","format":"prettier --write \\"src/**/*.ts\\"","lint":"tslint -p tsconfig.json","prepublishOnly":"yarn build"},"author":"Gnosis (https://gnosis.io)","license":"MIT","dependencies":{"semver":"^7.3.2"},"devDependencies":{"@types/jest":"^26.0.23","@types/node":"^15.0.1","@types/semver":"^7.3.5","husky":"^6.0.0","lint-staged":"^11.0.0","prettier":"^2.2.1","rimraf":"^3.0.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"src/**/!(*test).ts":["yarn lint","prettier --write"]},"repository":{"type":"git","url":"git+https://github.com/gnosis/safe-apps-sdk.git"},"bugs":{"url":"https://github.com/gnosis/safe-apps-sdk/issues"},"homepage":"https://github.com/gnosis/safe-apps-sdk#readme"}')},780:function(e,t,n){"use strict";var r=n(4),a=n(56),c=n(24),i=n(39);Object.defineProperty(t,"__esModule",{value:!0}),t.TXs=void 0;var o=n(154),s=function(){function e(t){c(this,e),this.txServiceUrl=null,this.communicator=t}return i(e,[{key:"getBySafeTxHash",value:function(){var e=a(r.mark((function e(t){var n,a,c,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.txServiceUrl){e.next=2;break}throw new Error("ENV information hasn't been synced yet or there was an error during the process");case 2:return n=new AbortController,a={method:"GET",signal:n.signal},setTimeout((function(){return n.abort()}),1e4),e.prev=5,e.next=8,fetch("".concat(this.txServiceUrl,"/transactions/").concat(t),a);case 8:if(200===(c=e.sent).status){e.next=11;break}throw new Error("Failed to get the transaction. Either safeTxHash is incorrect or transaction hasn't been indexed by the service yet");case 11:return e.next=13,c.json();case 13:return i=e.sent,e.abrupt("return",i);case 17:throw e.prev=17,e.t0=e.catch(5),e.t0;case 20:case"end":return e.stop()}}),e,this,[[5,17]])})));return function(t){return e.apply(this,arguments)}}()},{key:"send",value:function(){var e=a(r.mark((function e(t){var n,a,c,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.txs,a=t.params,n&&n.length){e.next=3;break}throw new Error("No transactions were passed");case 3:return c={txs:n,params:a},e.next=6,this.communicator.send(o.METHODS.sendTransactions,c);case 6:if((i=e.sent).success){e.next=9;break}throw new Error(i.error);case 9:return e.abrupt("return",i.data);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setTxServiceUrl",value:function(e){this.txServiceUrl=e}}]),e}();t.TXs=s},781:function(e,t,n){"use strict";var r=n(4),a=n(56),c=n(24),i=n(39);Object.defineProperty(t,"__esModule",{value:!0}),t.Eth=void 0;var o=n(782),s=n(154),d={defaultBlockParam:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"latest";return e},returnFullTxObjectParam:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e},blockNumberToHex:function(e){return Number.isInteger(e)?"0x".concat(e.toString(16)):e}},l=function(){function e(t){c(this,e),this.communicator=t,this.call=this.buildRequest({call:o.RPC_CALLS.eth_call,formatters:[null,d.defaultBlockParam]}),this.getBalance=this.buildRequest({call:o.RPC_CALLS.eth_getBalance,formatters:[null,d.defaultBlockParam]}),this.getCode=this.buildRequest({call:o.RPC_CALLS.eth_getCode,formatters:[null,d.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:o.RPC_CALLS.eth_getStorageAt,formatters:[null,d.blockNumberToHex,d.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:o.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:o.RPC_CALLS.eth_getBlockByHash,formatters:[null,d.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:o.RPC_CALLS.eth_getBlockByNumber,formatters:[d.blockNumberToHex,d.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:o.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:o.RPC_CALLS.eth_getTransactionReceipt})}return i(e,[{key:"buildRequest",value:function(e){var t=this,n=e.call,c=e.formatters;return function(){var e=a(r.mark((function e(a){var i,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c&&Array.isArray(a)&&c.forEach((function(e,t){e&&(a[t]=e(a[t]))})),i={call:n,params:a},e.next=4,t.communicator.send(s.METHODS.rpcCall,i);case 4:if((o=e.sent).success){e.next=7;break}throw new Error(o.error);case 7:return e.abrupt("return",o.data);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}]),e}();t.Eth=l},782:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_CALLS=void 0,t.RPC_CALLS={eth_call:"eth_call",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt"}},783:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsChangeMethods=t.TransferMethods=t.Operation=void 0;n(154);!function(e){e[e.CALL=0]="CALL",e[e.DELEGATE_CALL=1]="DELEGATE_CALL",e[e.CREATE=2]="CREATE"}(t.Operation||(t.Operation={})),function(e){e.TRANSFER="transfer",e.TRANSFER_FROM="transferFrom",e.SAFE_TRANSFER_FROM="safeTransferFrom"}(t.TransferMethods||(t.TransferMethods={})),function(e){e.SETUP="setup",e.SET_FALLBACK_HANDLER="setFallbackHandler",e.ADD_OWNER_WITH_THRESHOLD="addOwnerWithThreshold",e.REMOVE_OWNER="removeOwner",e.REMOVE_OWNER_WITH_THRESHOLD="removeOwnerWithThreshold",e.SWAP_OWNER="swapOwner",e.CHANGE_THRESHOLD="changeThreshold",e.CHANGE_MASTER_COPY="changeMasterCopy",e.ENABLE_MODULE="enableModule",e.DISABLE_MODULE="disableModule",e.EXEC_TRANSACTION_FROM_MODULE="execTransactionFromModule",e.APPROVE_HASH="approveHash",e.EXEC_TRANSACTION="execTransaction"}(t.SettingsChangeMethods||(t.SettingsChangeMethods={}))},785:function(e,t,n){"use strict";n.r(t);var r,a,c=n(0),i=n.n(c),o=n(35),s=n.n(o),d=n(22),l=n(841),u=n(414),p="#e8e7e6",f="#008C73",h="#5D6D74",b="#f02525",j="#001428",x="53px",g="24px",m="16px",v="#001428",O="#f0efee",w="8px",y="#ffc05f",k="4px",C=768,S="14px",N=Object(u.a)({typography:{fontFamily:"Averta, sans-serif",h3:{fontSize:"2.3rem",fontWeight:800},h5:{fontWeight:800},h6:{fontSize:"1.15rem",fontWeight:800},subtitle1:{fontSize:"1.15rem"}},overrides:{MuiListItemIcon:{root:{minWidth:32}},MuiListItemText:{primary:{textTransform:"uppercase",fontWeight:"bold",fontSize:"0.76rem"}},MuiButtonBase:{root:{letterSpacing:"0.9px","&$disabled":{color:h},color:h,textTransform:"none",borderRadius:w,minWidth:"none",minHeight:"35px"}},MuiButton:{label:{lineHeight:"1",fontSize:"16px",fontWeight:400},root:{letterSpacing:"0.9px","&$disabled":{color:h},color:h,textTransform:"none",borderRadius:w,minWidth:"none",minHeight:"35px"},contained:{boxShadow:"1px 2px 10px 0 rgba(212, 212, 211, 0.59)"},containedPrimary:{backgroundColor:"#008C73","&:hover":{backgroundColor:v}},containedSecondary:{backgroundColor:v,"&:hover":{backgroundColor:"#5d7274"}},outlinedPrimary:{border:"2px solid ".concat(v),"&:hover":{border:"2px solid ".concat(v)}},sizeLarge:{padding:"".concat(m," ").concat(g),minHeight:"52px",fontSize:"16px"},sizeSmall:{minWidth:"130px",fontSize:"12px"},textSecondary:{"&:hover":{borderRadius:"3px"}}},MuiInput:{root:{backgroundColor:O,borderRadius:"5px",color:v,fontSize:S,lineHeight:"56px",order:1,padding:"0 ".concat(m),"&:$disabled":{color:"#0000ff"},"&:active":{borderBottomLeftRadius:"0",borderBottomRightRadius:"0"}},input:{color:v,display:"flex",height:"auto",letterSpacing:"0.5px",padding:"0",textOverflow:"ellipsis"}},MuiBackdrop:{root:{backgroundColor:"rgba(232,231,230, 0.75)"}}}}),E=n(26),R=n.p+"static/media/Averta-ExtraBold.8fdcd8d4.woff2",T=n.p+"static/media/Averta-normal.39d04879.woff2",_=Object(d.b)(r||(r=Object(E.a)(['\n @font-face {\n font-family: "Averta";\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: local("Averta-Regular"),\n url(',') format("woff2");\n }\n\n @font-face {\n font-family: "Averta";\n font-style: normal;\n font-weight: 800;\n font-display: swap;\n src: local("Averta-Extrabold"),\n url(',') format("woff2");\n }\n\n\n body {\n background-color: #f7f5f5;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n bottom: 0;\n color: ',';\n font-family: "Averta", monospace;\n left: 0;\n margin: 0;\n overflow-x: hidden;\n position: absolute;\n right: 0;\n text-rendering: geometricPrecision;\n top: 0;\n }\n\n html {\n font-size: ',";\n }\n\n * {\n box-sizing: border-box;\n }\n\n p {\n margin: 0;\n }\n"])),T,R,j,S),A=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,846)).then((function(t){var n=t.getCLS,r=t.getFID,a=t.getFCP,c=t.getLCP,i=t.getTTFB;n(e),r(e),a(e),c(e),i(e)}))},I=n(95),M=n(44),D=n(4),L=n.n(D),B=n(29),P=n(189),H=n(262),F=n(400),W=n.n(F),z=n(401),G=n.n(z),U="UNKNOWN";!function(e){e[e.MAINNET=1]="MAINNET",e[e.MORDEN=2]="MORDEN",e[e.ROPSTEN=3]="ROPSTEN",e[e.RINKEBY=4]="RINKEBY",e[e.GOERLI=5]="GOERLI",e[e.KOVAN=42]="KOVAN",e[e.XDAI=100]="XDAI",e[e.ENERGY_WEB_CHAIN=246]="ENERGY_WEB_CHAIN",e[e.VOLTA=73799]="VOLTA",e[e.UNKNOWN=0]="UNKNOWN",e[e.LOCAL=4447]="LOCAL"}(a||(a={}));var K,V,q,X,J,Y,$,Z,Q,ee,te,ne,re,ae,ce,ie,oe,se,de,le,ue,pe={walletconnect:{package:G.a,options:{infuraId:"82b8340f4bd146a2bfc606609ffbec41"}}},fe=new W.a({network:"rinkeby",providerOptions:pe,cacheProvider:!0}),he=function(){var e=Object(B.a)(L.a.mark((function e(){var t;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fe.connect();case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=Object(P.a)((function(e,t){return{loaded:!1,account:"",name:U,networkId:a.UNKNOWN,provider:null,signer:null,fetchAndSetProvider:function(){var t=Object(B.a)(L.a.mark((function t(n){var r,a,c;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.listAccounts();case 2:return r=t.sent[0],t.next=5,n.getNetwork();case 5:return a=t.sent,c=a.chainId,t.abrupt("return",e({account:r,loaded:!0,networkId:c,provider:n,signer:n.getSigner()}));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),connectProvider:function(){var e=Object(B.a)(L.a.mark((function e(){var n,r,a,c,i,o;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t(),r=n.updateProvider,a=n.disconnect,c=n.fetchAndSetProvider,e.next=3,he();case 3:i=e.sent,o=new H.a(i,"any"),i.on("chainChanged",r),i.on("accountsChanged",r),i.on("disconnect",a),c(o);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),updateProvider:function(){var n=Object(B.a)(L.a.mark((function n(){var r,c,i,o,s;return L.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=t(),c=r.provider){n.next=3;break}return n.abrupt("return");case 3:return n.next=5,c.listAccounts();case 5:return i=n.sent[0],n.next=8,c.getNetwork();case 8:if(o=n.sent,s=o.chainId,i){n.next=12;break}return n.abrupt("return",e({loaded:!1,account:"",networkId:a.UNKNOWN,provider:null,signer:null}));case 12:return n.abrupt("return",e({account:i,loaded:!0,networkId:s}));case 13:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),disconnect:function(){return e({loaded:!1,account:"",networkId:a.UNKNOWN,provider:null,signer:null})}}})),je=n(15),xe=n(829),ge=n(791),me=n(828),ve=n(789),Oe=n(824),we=n(59),ye=n(406),ke=n.n(ye),Ce=n(407),Se=n.n(Ce),Ne=n(826),Ee=n(2),Re={borderRight:"solid 2px ".concat(p),height:"100%"},Te=function(e){var t=e.className;return Object(Ee.jsx)("div",{className:t,style:Re})},_e=Object(Oe.a)({root:Object(we.a)({alignItems:"center",display:"flex",height:"100%",marginLeft:"auto"},"@media (min-width: ".concat(C,"px)"),{maxWidth:"284px",marginRight:"20px"}),provider:Object(we.a)({alignItems:"center",cursor:"pointer",display:"flex",flex:"1 1 auto",padding:w},"@media (min-width: ".concat(C,"px)"),{paddingLeft:w,paddingRight:w}),expand:{height:"30px",width:"30px"}}),Ae=function(e){var t=e.render,n=e.info,r=e.open,a=e.toggle,c=_e(),o=i.a.useRef(null);return Object(Ee.jsxs)(Ee.Fragment,{children:[Object(Ee.jsxs)("div",{className:c.root,ref:o,children:[Object(Ee.jsx)(Te,{}),Object(Ee.jsxs)("div",{className:c.provider,onClick:a,children:[n,Object(Ee.jsx)(Ne.a,{className:c.expand,disableRipple:!0,children:r?Object(Ee.jsx)(ke.a,{}):Object(Ee.jsx)(Se.a,{})})]}),Object(Ee.jsx)(Te,{})]}),t(o)]})},Ie=d.c.img(K||(K=Object(E.a)(["\n max-width: 100%;\n box-sizing: border-box;\n\n ","\n\n ","\n"])),(function(e){return e.bordered&&"border: 1px solid #ddd;"}),(function(e){return e.fullWidth&&"\n padding: 0;\n width: 40% !important;\n margin: 0 60% 25px !important;\n "})),Me=n(23),De=n.p+"static/media/gnosis-safe-multisig-logo.ebc553e5.svg",Le=d.c.div(V||(V=Object(E.a)(["\n flex-grow: 1;\n"]))),Be=Object(Oe.a)({dropdownContainer:{backgroundColor:"white",borderRadius:w,boxShadow:"0 0 10px 0 rgba(33, 48, 77, 0.1)",marginTop:"11px",minWidth:"280px",minHeight:"244px",padding:0},container:{backgroundColor:"white",borderBottom:"solid 2px ".concat(p),boxShadow:"0 2px 4px 0 rgba(212, 212, 211, 0.59)",flexWrap:"nowrap",height:x,width:"100%",zIndex:1301},link:{display:"flex",height:"100%",alignItems:"center",paddingLeft:m},popper:{zIndex:2e3}}),Pe=function(e){var t=e.dropdownContent,n=e.providerInfo,r=Be(),a=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(c.useState)(e),n=Object(Me.a)(t,2),r=n[0],a=n[1];return{open:r,toggle:function(){return a((function(e){return!e}))},close:function(){return a(!1)}}}(),i=a.close,o=a.open,s=a.toggle;return Object(Ee.jsxs)(me.a,{component:"header",container:!0,className:r.container,children:[Object(Ee.jsx)(me.a,{item:!0,xs:2,children:Object(Ee.jsx)(I.b,{className:r.link,to:"/",children:Object(Ee.jsx)(Ie,{alt:"Gnosis Safe Multisig Logo",height:36,src:De})})}),Object(Ee.jsx)(Le,{}),Object(Ee.jsx)(me.a,{item:!0,xs:3,children:Object(Ee.jsx)(Ae,{info:n,open:o,toggle:s,render:function(e){return Object(Ee.jsx)(ve.a,{anchorEl:e.current,className:r.popper,open:o,placement:"bottom",popperOptions:{positionFixed:!0},children:function(e){var n=e.TransitionProps;return Object(Ee.jsx)(ge.a,Object(je.a)(Object(je.a)({},n),{},{children:Object(Ee.jsx)(Ee.Fragment,{children:Object(Ee.jsx)(xe.a,{mouseEvent:"onClick",onClickAway:i,touchEvent:!1,children:Object(Ee.jsx)(me.a,{container:!0,direction:"column",alignItems:"center",justify:"space-between",className:r.dropdownContainer,children:t})})})}))}})}})})]})},He=n(203),Fe=n(830),We=Object(d.c)(Fe.a)(q||(q=Object(E.a)(["\n min-width: 140px;\n"]))),ze=function(e){var t=e.className,n=i.a.useState(!1),r=Object(Me.a)(n,2),a=r[0],c=r[1],o=be((function(e){return e.connectProvider})),s=i.a.useCallback(Object(B.a)(L.a.mark((function e(){return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.prev=1,e.next=4,o();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.error(e.t0);case 9:return e.prev=9,c(!1),e.finish(9);case 12:case"end":return e.stop()}}),e,null,[[1,6,9,12]])}))),[o]);return Object(Ee.jsx)(We,{color:"primary",type:"button",onClick:s,variant:"contained",disabled:a,className:t,children:"Connect"})},Ge=n(844),Ue=n(195),Ke=n.n(Ue),Ve=n.p+"static/media/key.566b7e77.svg",qe=n.p+"static/media/triangle.c539e7f8.svg",Xe=Object(Ge.a)({root:Object(we.a)({display:"none"},"@media (min-width: ".concat(C,"px)"),{display:"flex"}),dot:{position:"relative",backgroundColor:"#ffffff",color:b},key:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:p},warning:{position:"relative",top:"-2px"}}),Je=Object(Oe.a)(Xe),Ye=function(e){var t=e.center,n=void 0!==t&&t,r=e.circleSize,a=e.dotRight,c=e.dotSize,i=e.dotTop,o=e.hideDot,s=void 0!==o&&o,d=e.keySize,l=e.mode,u=void 0===l?"":l,p=Je(Xe),f=function(e,t,n){return{width:"".concat(e,"px"),height:"".concat(e,"px"),marginLeft:t?"".concat(n,"px"):"none",borderRadius:"".concat(e,"px")}}(r||5,n,c||5),h=function(e,t,n,r){return{width:"".concat(e,"px"),height:"".concat(e,"px"),borderRadius:"".concat(e,"px"),top:"".concat(t,"px"),right:"".concat(n,"px"),color:"error"===r?b:y}}(c||5,i||5,a||5,u),j="warning"===u,x=j?qe:Ve;return Object(Ee.jsx)(Ee.Fragment,{children:Object(Ee.jsxs)("div",{className:p.root,children:[Object(Ee.jsx)("div",{className:p.key,style:f,children:Object(Ee.jsx)(Ie,{alt:"Connection status",className:j?p.warning:void 0,height:d,src:x,width:j?d+2:d})}),!s&&Object(Ee.jsx)(Ke.a,{className:p.dot,style:h})]})})},$e=Object(Oe.a)({headingContainer:{padding:"".concat(m," 12px")},logo:{justifyContent:"center"},text:{letterSpacing:"-0.6px",flexGrow:1,textAlign:"center"},connect:{padding:"".concat(m," 0"),textAlign:"center"},connectText:{letterSpacing:"1px"},img:{margin:"0px 2px"}}),Ze=function(){var e=$e();return Object(Ee.jsxs)(Ee.Fragment,{children:[Object(Ee.jsx)("div",{className:e.headingContainer,children:Object(Ee.jsx)(He.a,{className:e.text,variant:"h6",children:"Connect a Wallet"})}),Object(Ee.jsx)("div",{className:e.logo,children:Object(Ee.jsx)(Ye,{center:!0,circleSize:75,dotRight:25,dotSize:25,dotTop:50,keySize:32,mode:"error"})}),Object(Ee.jsx)("div",{className:e.connect,children:Object(Ee.jsx)(ze,{})})]})},Qe=n(13),et=n(52),tt=n(409),nt=n.n(tt),rt=d.c.img(X||(X=Object(E.a)(["\n height: ",";\n width: ",";\n border-radius: 50%;\n"])),(function(e){var t=e.size;return"".concat(t,"px")}),(function(e){var t=e.size;return"".concat(t,"px")})),at=function(e){var t=e.size,n=void 0===t?40:t,r=e.address,a=Object(et.a)(e,["size","address"]),i=c.useMemo((function(){return nt()(r)}),[r]);return Object(Ee.jsx)(rt,Object(je.a)({src:i,size:n},a))},ct=function(e){switch(e){case"xs":return k;case"sm":return w;case"md":return m;case"lg":return g;case"xl":return"32px";default:return"0"}},it=function(e){var t=e.className,n=e.color,r=e.margin,a=e.style,c=function(e,t){return{width:"100%",minHeight:"2px",height:"2px",backgroundColor:e||p,margin:"".concat(ct(t)," 0px")}}(n,r),i=Object(je.a)(Object(je.a)({},c),a||{});return Object(Ee.jsx)("div",{className:t,style:i})},ot="0x0000000000000000000000000000000000000000",st="0x",dt=function(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)},lt=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"...",a=n+t;if(a>=e.length||!a)return e;var c=new RegExp("^(.{".concat(t,"}).+(.{").concat(n,"})$")),i=c.exec(e);if(!i)return e;var o=Object(Me.a)(i,3),s=o[1],d=o[2];return"".concat(s).concat(r).concat(d)},ut=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["https:","http:"];try{var n=new URL(e);return t.includes(n.protocol)}catch(r){return!1}},pt=function(e){return Object(Ee.jsx)("div",{className:e.className,children:Object(Ee.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 10 10",children:Object(Ee.jsx)("circle",{cx:"208",cy:"203",r:"3",fill:"none",fillRule:"evenodd",stroke:"#FF685E",strokeWidth:"3",transform:"translate(-203 -198)"})})})},ft=n.p+"static/media/wallet.196ce26b.svg",ht=Object(Ge.a)({container:{padding:"".concat(m," 12px")},identicon:{margin:"".concat(m," 0")},user:{borderRadius:"3px",backgroundColor:"#f7f5f5",margin:"0 auto",padding:"9px",lineHeight:1},details:{padding:"0 ".concat(m),height:"20px",alignItems:"center"},address:{flexGGrid:1,textAlign:"center",letterSpacing:"-0.5px",marginRight:w},labels:{fontSize:"12px",letterSpacing:"0.5px"},open:{paddingLeft:w,width:"auto","&:hover":{cursor:"pointer"}},disconnect:{padding:"".concat(m," ").concat(g),"& button":{background:"#f02525"}},disconnectText:{letterSpacing:"1px"},logo:{margin:"0px ".concat(k)},dot:{marginRight:k,height:"15px",width:"15px"},warning:{color:y},connected:{color:f}}),bt=Object(Oe.a)(ht),jt=function(e){var t=e.connected,n=e.networkId,r=e.onDisconnect,c=e.providerName,i=void 0===c?"UNKNOWN":c,o=e.userAddress,s=t?"Connected":"Connection error",d=bt();return Object(Ee.jsxs)(Ee.Fragment,{children:[Object(Ee.jsxs)(me.a,{container:!0,justify:"center",alignItems:"center",direction:"column",className:d.container,children:[t?Object(Ee.jsx)(at,{className:d.identicon,address:o||"random"}):Object(Ee.jsx)(Ye,{circleSize:75,dotRight:25,dotSize:25,dotTop:50,hideDot:!0,keySize:30,mode:"warning"}),Object(Ee.jsx)("div",{className:d.user,children:o?lt(o,6,4):"Address not available"})]}),Object(Ee.jsx)(it,{margin:"xs"}),Object(Ee.jsxs)(me.a,{container:!0,className:d.details,children:[Object(Ee.jsx)(He.a,{className:d.labels,children:"Status"}),Object(Ee.jsx)(Le,{}),Object(Ee.jsx)(Ke.a,{className:Object(Qe.a)(d.dot,t?d.connected:d.warning)}),Object(Ee.jsx)(He.a,{className:d.labels,children:s})]}),Object(Ee.jsx)(it,{margin:"xs"}),Object(Ee.jsxs)(me.a,{container:!0,className:d.details,children:[Object(Ee.jsx)(He.a,{className:d.labels,children:"Wallet"}),Object(Ee.jsx)(Le,{}),Object(Ee.jsx)(Ie,{alt:"Wallet icon",className:d.logo,height:14,src:ft}),Object(Ee.jsx)(He.a,{className:d.labels,children:dt(i)})]}),Object(Ee.jsx)(it,{margin:"xs"}),Object(Ee.jsxs)(me.a,{container:!0,className:d.details,children:[Object(Ee.jsx)(He.a,{className:d.labels,children:"Network"}),Object(Ee.jsx)(Le,{}),Object(Ee.jsx)(pt,{className:d.logo}),Object(Ee.jsx)(He.a,{className:d.labels,children:dt(a[n])})]}),Object(Ee.jsx)(it,{margin:"xs"}),Object(Ee.jsx)(me.a,{container:!0,className:d.disconnect,children:Object(Ee.jsx)(Fe.a,{color:"primary",fullWidth:!0,onClick:r,variant:"contained","data-testid":"disconnect-btn",children:Object(Ee.jsx)(He.a,{className:d.disconnectText,children:"Disconnect"})})})]})},xt=Object(Oe.a)({container:Object(we.a)({flexGrow:0,padding:"0 ".concat(w)},"@media (min-width: ".concat(C,"px)"),{paddingLeft:m,paddingRight:m}),text:Object(we.a)({backgroundColor:p,color:j,borderRadius:"3px",lineHeight:"normal",margin:"0",padding:"".concat(k," ").concat(w)},"@media (min-width: ".concat(C,"px)"),{marginLeft:"8px"})}),gt=function(e){var t=e.networkId,n=xt();return Object(Ee.jsx)("div",{className:n.container,children:Object(Ee.jsx)(He.a,{className:n.text,variant:"body2",children:dt(a[t])})})},mt=Object(Oe.a)({identicon:Object(we.a)({display:"none"},"@media (min-width: ".concat(C,"px)"),{display:"block"}),dot:Object(we.a)({backgroundColor:"#fff",borderRadius:"15px",color:f,display:"none",height:"15px",position:"relative",right:"10px",top:"12px",width:"15px"},"@media (min-width: ".concat(C,"px)"),{display:"block"}),address:{marginLeft:"5px",letterSpacing:"-0.5px"},icon:{marginRight:"8px"}}),vt=function(e){var t=e.connected,n=e.userAddress,r=e.networkId,a=mt();return Object(Ee.jsxs)(Ee.Fragment,{children:[!t&&Object(Ee.jsx)(Ye,{circleSize:35,dotRight:11,dotSize:16,dotTop:24,keySize:14,mode:"warning"}),Object(Ee.jsxs)(me.a,{container:!0,alignItems:"center",children:[Object(Ee.jsx)(at,{className:a.icon,size:35,address:n||""}),t?Object(Ee.jsx)(He.a,{variant:"body2",children:lt(n||"",6,4)}):Object(Ee.jsx)(He.a,{variant:"body2",children:"Connection Error"})]}),Object(Ee.jsx)(gt,{networkId:r})]})},Ot=Object(Oe.a)({network:{fontWeight:800},account:{alignItems:"start",display:"flex",flexDirection:"column",flexGrow:1,justifyContent:"center",paddingRight:w},connect:{letterSpacing:"-0.5px",whiteSpace:"nowrap"}}),wt=function(){var e=Ot();return Object(Ee.jsxs)(Ee.Fragment,{children:[Object(Ee.jsx)(Ye,{circleSize:35,dotRight:11,dotSize:16,dotTop:24,keySize:17,mode:"error"}),Object(Ee.jsxs)("div",{className:e.account,children:[Object(Ee.jsx)(He.a,{className:e.network,variant:"body2",children:"Not Connected"}),Object(Ee.jsx)(He.a,{className:e.connect,variant:"body2",children:"Connect Wallet"})]})]})},yt=function(){var e=be((function(e){return e.account})),t=be((function(e){return e.loaded})),n=be((function(e){return e.networkId})),r=be((function(e){return e.disconnect}));return t?Object(Ee.jsx)(Pe,{providerInfo:Object(Ee.jsx)(vt,{networkId:n,connected:t,userAddress:e}),dropdownContent:Object(Ee.jsx)(jt,{connected:t,networkId:n,onDisconnect:r,userAddress:e})}):Object(Ee.jsx)(Pe,{providerInfo:Object(Ee.jsx)(wt,{}),dropdownContent:Object(Ee.jsx)(Ze,{})})},kt=n(410),Ct=d.c.div(J||(J=Object(E.a)(["\n box-shadow: 1px 2px 10px 0 ",";\n border-radius: 8px;\n padding: 24px;\n background-color: ",";\n position: relative;\n"])),(function(e){var t=e.theme;return Object(kt.fade)(t.colors.shadow.color,.18)}),(function(e){return e.theme.colors.white})),St=d.c.div(Y||(Y=Object(E.a)(["\n opacity: 0.5;\n position: absolute;\n height: 100%;\n width: 100%;\n background-color: ",";\n z-index: 1;\n top: 0;\n left: 0;\n border-radius: 8px;\n transition: opacity 0.2s;\n"])),(function(e){return e.theme.colors.white})),Nt=function(e){var t=e.className,n=e.children,r=e.disabled,a=Object(et.a)(e,["className","children","disabled"]);return Object(Ee.jsxs)(Ct,Object(je.a)(Object(je.a)({className:t},a),{},{children:[r&&Object(Ee.jsx)(St,{}),n]}))},Et=d.c.div($||($=Object(E.a)(["\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n height: 36px;\n width: 36px;\n background-color: ",";\n"])),(function(e){var t=e.theme,n=e.color;return t.colors[n]})),Rt=function(e){var t=e.children,n=Object(et.a)(e,["children"]);return Object(Ee.jsx)(Et,Object(je.a)(Object(je.a)({},n),{},{children:t}))},Tt=function(e){var t=window.localStorage.getItem(e);return null!=t?JSON.parse(t):null},_t="contracts_state_v1",At=Object(P.a)((function(e,t){return{contracts:Tt(_t)||{},saveContracts:function(n,r){var a=t().contracts,c=Object(je.a)(Object(je.a)({},a),{},Object(we.a)({},n,r));return function(e,t){window.localStorage.setItem(e,JSON.stringify(t))}(_t,c),e({contracts:c})}}})),It=n(197),Mt=n(198),Dt=n(199),Lt=n(269),Bt=n(182),Pt=function(e,t){return new Bt.b(e,Dt.abi,t)},Ht=function(e,t){return new Bt.b(e,It.abi,t)},Ft=function(){var e=Object(B.a)(L.a.mark((function e(t){var n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Bt.c(It.abi,It.bytecode,t),e.next=3,n.deploy();case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Wt=function(){var e=Object(B.a)(L.a.mark((function e(t){var n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Bt.c(Dt.abi,Dt.bytecode,t),e.next=3,n.deploy();case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),zt=function(){var e=Object(B.a)(L.a.mark((function e(t){var n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Bt.c(Lt.abi,Lt.bytecode,t),e.next=3,n.deploy();case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Gt=function(){var e=Object(B.a)(L.a.mark((function e(t){var n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Bt.c(Mt.abi,Mt.bytecode,t),e.next=3,n.deploy();case 3:return r=e.sent,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ut=Object(Oe.a)({pageContainer:{padding:"0 ".concat(m)},heading:{margin:"".concat(g," 0")},stepsContainer:{marginTop:m},interfaceDescription:{fontWeight:400},stepCard:{height:276,display:"flex",flexDirection:"column"},btn:{marginTop:"auto"},dot:{marginRight:m,"& > h5":{color:"#fff",fontWeight:400}},cardTitle:{marginBottom:m}}),Kt=function(){var e=Ut(),t=i.a.useState(!1),n=Object(Me.a)(t,2),r=n[0],a=n[1],c=be((function(e){return[e.loaded,e.networkId,e.signer,e.account]})),o=Object(Me.a)(c,4),s=o[0],d=o[1],l=o[2],u=o[3],p=At(i.a.useCallback((function(e){return[e.contracts[d],e.saveContracts]}),[d])),f=Object(Me.a)(p,2),h=f[0],b=f[1],j=Object(M.g)(),x=i.a.useCallback(Object(B.a)(L.a.mark((function e(){var t,n,r,a,c,i;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l){e.next=11;break}return e.next=3,Promise.all([Wt(l),zt(l),Ft(l),Gt(l)]);case 3:t=e.sent,n=Object(Me.a)(t,4),r=n[0],a=n[1],c=n[2],i=n[3],console.info("Deployed contracts: ",{proxyFactory:r,fallbackHandler:a,masterCopy:c,multiSend:i}),b(d,{fallbackHandler:a.address,proxyFactory:r.address,masterCopy:c.address,multiSend:i.address});case 11:case"end":return e.stop()}}),e)}))),[d,b,l]),g=i.a.useCallback(Object(B.a)(L.a.mark((function e(){var t,n,r,c,i,o,s,d,p;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l){e.next=20;break}return a(!0),e.prev=2,c=Ht(h.masterCopy,l),i=Pt(h.proxyFactory,l),o=[u],s=c.interface.encodeFunctionData("setup",[o,1,ot,st,h.fallbackHandler,ot,0,ot]),e.next=9,i.createProxyWithNonce(h.masterCopy,s,Date.now()).then((function(e){return e.wait(1)}));case 9:d=e.sent,(p=null===(t=d.events)||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.args)||void 0===r?void 0:r[0])&&j.push("/safes/".concat(p)),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),console.error(e.t0);case 17:return e.prev=17,a(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[2,14,17,20]])}))),[u,h,l,j]);return Object(Ee.jsxs)(me.a,{container:!0,direction:"column",className:e.pageContainer,children:[Object(Ee.jsxs)(me.a,{item:!0,xs:5,children:[Object(Ee.jsx)(He.a,{className:e.heading,variant:"h3",children:"Welcome to Gnosis Safe Multisig Developer Interface."}),Object(Ee.jsx)(He.a,{className:e.interfaceDescription,variant:"h5",component:"p",children:"Developer Interface is an interface without dependencies on Gnosis infrastructure, where you can deploy Safe Contracts on any network. Here is how to get started:"})]}),Object(Ee.jsxs)(me.a,{container:!0,spacing:3,className:e.stepsContainer,children:[Object(Ee.jsx)(me.a,{item:!0,xs:3,lg:2,children:Object(Ee.jsxs)(Nt,{className:e.stepCard,disabled:s,children:[Object(Ee.jsxs)(me.a,{container:!0,alignItems:"center",className:e.cardTitle,children:[Object(Ee.jsx)(Rt,{className:e.dot,color:"primary",children:Object(Ee.jsx)(He.a,{variant:"h5",children:s?"\u2714":1})}),Object(Ee.jsx)(He.a,{variant:"h5",children:"Connect a wallet"})]}),Object(Ee.jsx)(He.a,{variant:"body2",children:"Gnosis Safe Multisig supports a wide range of wallets that you can choose to be one of the authentication factors."}),Object(Ee.jsx)(ze,{className:e.btn})]})}),Object(Ee.jsx)(me.a,{item:!0,xs:3,lg:2,children:Object(Ee.jsxs)(Nt,{className:e.stepCard,disabled:!s||!!h,children:[Object(Ee.jsxs)(me.a,{container:!0,alignItems:"center",className:e.cardTitle,children:[Object(Ee.jsx)(Rt,{className:e.dot,color:"primary",children:Object(Ee.jsx)(He.a,{variant:"h5",children:h?"\u2714":2})}),Object(Ee.jsx)(He.a,{variant:"h5",children:"Deploy contracts"})]}),Object(Ee.jsx)(He.a,{variant:"body2",children:"Because the interface doesn't depend on Gnosis infrastructure, you need to deploy the master copy and proxy factory yourself."}),Object(Ee.jsx)(Fe.a,{type:"button",variant:"contained",color:"primary",className:e.btn,onClick:x,children:"Deploy"})]})}),Object(Ee.jsx)(me.a,{item:!0,xs:3,lg:2,children:Object(Ee.jsxs)(Nt,{className:e.stepCard,disabled:!s,children:[Object(Ee.jsxs)(me.a,{container:!0,alignItems:"center",className:e.cardTitle,children:[Object(Ee.jsx)(Rt,{className:e.dot,color:"primary",children:Object(Ee.jsx)(He.a,{variant:"h5",children:"3"})}),Object(Ee.jsx)(He.a,{variant:"h5",children:"Create Safe"})]}),Object(Ee.jsx)(Fe.a,{type:"button",variant:"contained",color:"primary",className:e.btn,onClick:g,disabled:r,children:"Create"})]})})]})]})},Vt=n(838),qt=n(835),Xt=n(836),Jt=n(837),Yt=n(62),$t=function(){var e=Object(B.a)(L.a.mark((function e(t,n){var r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.getBalance(n),e.abrupt("return",r);case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Zt=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.a.useState(Yt.a.BigNumber.from(0)),r=Object(Me.a)(n,2),a=r[0],c=r[1],o=be((function(e){return e.signer}));return i.a.useEffect((function(){var n,r=function(){var e=Object(B.a)(L.a.mark((function e(t,n){var r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$t(t.provider,n);case 2:r=e.sent,a.eq(r)||c(r);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return o&&(r(o,e),t&&(n=setInterval((function(){r(o,e)}),2e3))),function(){clearInterval(n)}}),[o,e,t,a]),a},Qt=d.c.p(Z||(Z=Object(E.a)(["\n background: ",";\n padding: ",";\n border-radius: 5px;\n width: fit-content;\n\n span {\n font-weight: bold;\n }\n"])),O,k),en=function(e){var t=e.balance,n=e.symbol,r=void 0===n?"ETH":n;return Object(Ee.jsxs)(Qt,{children:["Balance:"," ",Object(Ee.jsxs)("span",{children:[t," ",r]})]})},tn=n(834),nn=n.p+"static/media/copy.18fe083f.svg",rn=Object(Oe.a)({container:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",margin:"0 ".concat(k),borderRadius:"50%",transition:"background-color .2s ease-in-out","&:hover":{backgroundColor:"#F0EFEE"}},increasedPopperZindex:{zIndex:2001}}),an=function(e){var t=e.className,n=void 0===t?"":t,r=e.content,a=e.increaseZIndex,c=void 0!==a&&a,o=i.a.useState(!1),s=Object(Me.a)(o,2),d=s[0],l=s[1],u=rn(),p=c?{popper:u.increasedPopperZindex}:{};return Object(Ee.jsx)(tn.a,{classes:p,onClose:function(){setTimeout((function(){d&&l(!1)}),300)},placement:"top",title:d?"Copied":"Copy to clipboard",children:Object(Ee.jsx)("div",{className:"".concat(u.container," ").concat(n),children:Object(Ee.jsx)(Ie,{alt:"Copy to clipboard",height:20,onClick:function(e){e.stopPropagation(),function(e){var t,n,r,a,c=document.createRange();function i(t){var n;null===(n=t.clipboardData)||void 0===n||n.setData("text/plain",e),t.preventDefault()}c.selectNodeContents(document.body),null===(t=document)||void 0===t||null===(n=t.getSelection())||void 0===n||n.addRange(c),document.addEventListener("copy",i),document.execCommand("copy"),document.removeEventListener("copy",i),null===(r=document)||void 0===r||null===(a=r.getSelection())||void 0===a||a.removeAllRanges()}(r),l(!0)},src:nn})})})},cn=d.c.div(Q||(Q=Object(E.a)(["\n display: flex;\n align-items: center;\n flex-direction: column;\n\n & > * {\n margin-top: 0.5rem;\n }\n"]))),on=function(e){var t=e.network,n=e.safeAddress,r=Zt(n,!0);return Object(Ee.jsxs)(cn,{children:[Object(Ee.jsx)("p",{children:t}),Object(Ee.jsx)(at,{size:40,address:n}),Object(Ee.jsxs)(me.a,{container:!0,alignItems:"center",justify:"center",children:[Object(Ee.jsx)("p",{children:lt(n,6,4)}),Object(Ee.jsx)(an,{content:n})]}),Object(Ee.jsx)(en,{balance:Yt.a.utils.formatEther(r)})]})},sn=n.p+"static/media/apps.e0e38444.svg",dn=d.c.aside(ee||(ee=Object(E.a)(["\n width: 200px;\n height: calc(100vh - ",");\n background-color: white;\n border-right: ",";\n padding: ",";\n\n display: flex;\n flex-direction: column;\n"])),x,(function(e){return"2px solid ".concat(e.theme.colors.separator)}),w),ln=d.c.hr(te||(te=Object(E.a)(["\n width: 100%;\n background-color: ",";\n height: 2px;\n border: none;\n"])),(function(e){return e.theme.colors.separator})),un=function(e){var t=e.icon,n=e.primary,r=e.to,a=i.a.useMemo((function(){return i.a.forwardRef((function(e,t){return Object(Ee.jsx)(I.c,Object(je.a)({activeStyle:{color:f},to:r,ref:t},e))}))}),[r]);return Object(Ee.jsx)("li",{children:Object(Ee.jsxs)(qt.a,{button:!0,component:a,children:[t&&Object(Ee.jsx)(Xt.a,{children:t}),Object(Ee.jsx)(Jt.a,{primary:n})]})})},pn=function(){var e=be((function(e){return e.networkId})),t=Object(M.h)(),n=Object(M.i)().url;return Object(Ee.jsxs)(dn,{children:[Object(Ee.jsx)(on,{network:dt(a[e]),safeAddress:t.safeAddress}),Object(Ee.jsx)(ln,{}),Object(Ee.jsx)(Vt.a,{component:"nav","aria-label":"main safe features navigation",children:Object(Ee.jsx)(un,{to:"".concat(n,"/apps"),primary:"Apps",icon:Object(Ee.jsx)("img",{src:sn,alt:"Apps Icon",style:{width:24,fill:"#5D7274"}})})})]})},fn=n(842),hn=n(839),bn=n(840),jn=function(e,t){return fetch(e,t).then((function(e){return e.json()}))},xn=n(845),gn=n(413),mn=n.n(gn),vn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:st;return"".concat(t,"000000000000000000000000").concat(e.replace(st,""),"000000000000000000000000000000000000000000000000000000000000000001")},On=function(){var e=Object(B.a)(L.a.mark((function e(t,n){var r,a;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ht(n,t),e.next=3,r.nonce();case 3:return a=e.sent,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),wn=function(){var e=Object(B.a)(L.a.mark((function e(t,n,r){var a,c,i,o,s,d,l,u,p,f,h,b;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.baseGas,c=r.data,i=r.gasPrice,o=r.gasToken,s=r.operation,d=r.refundReceiver,l=r.safeTxGas,u=r.to,p=r.valueInWei,f=r.sigs,h=Ht(n,t),e.next=4,h.execTransaction(u,p,c,s,l,a,i,o,d,f);case 4:return b=e.sent,e.abrupt("return",b);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),yn=function(){var e=Object(B.a)(L.a.mark((function e(t,n,r){var a,c,i,o,s,d,l,u,p,f,h,b;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.baseGas,c=r.data,i=r.gasPrice,o=r.gasToken,s=r.nonce,d=r.operation,l=r.refundReceiver,u=r.safeTxGas,p=r.to,f=r.valueInWei,h=Ht(n,t),e.next=4,h.getTransactionHash(p,f,c,d,u,a,i,o,l,s);case 4:return b=e.sent,e.abrupt("return",b);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),kn=function(){var e=Object(B.a)(L.a.mark((function e(t,n,r,a){var c,i,o,s,d,l,u,p,f,h,b,j,x,g,m,v,O,w,y,k;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=a.baseGas,i=void 0===c?0:c,o=a.data,s=a.gasPrice,d=void 0===s?0:s,l=a.gasToken,u=void 0===l?ot:l,p=a.operation,f=void 0===p?0:p,h=a.refundReceiver,b=void 0===h?ot:h,j=a.safeTxGas,x=void 0===j?0:j,g=a.to,m=a.valueInWei,v=vn(r),e.next=4,On(t,n);case 4:return O=e.sent,w={baseGas:i,data:o,gasPrice:d,gasToken:u,operation:f,refundReceiver:b,safeTxGas:x,nonce:O,to:g,valueInWei:m,sigs:v},e.next=8,yn(t,n,w);case 8:return y=e.sent,e.next=11,wn(t,n,w);case 11:return k=e.sent,e.abrupt("return",{safeTxHash:y,tx:k});case 13:case"end":return e.stop()}}),e)})));return function(t,n,r,a){return e.apply(this,arguments)}}(),Cn=function(e,t,n){var r=function(e,t){return new Bt.b(e,Mt.abi,t)}(t,e),a=n.map((function(e){var t=Yt.a.utils.arrayify(e.data);return Yt.a.utils.solidityPack(["uint8","address","uint256","uint256","bytes"],[0,e.to,e.value,t.length,t]).slice(2)})).join("");return r.interface.encodeFunctionData("multiSend",["0x".concat(a)])},Sn=n(843),Nn=n(270),En=i.a.forwardRef((function(e,t){var n=e.in,r=e.children,a=e.onEnter,c=e.onExited,i=Object(et.a)(e,["in","children","onEnter","onExited"]),o=Object(Nn.useSpring)({from:{opacity:0},to:{opacity:n?1:0},onStart:function(){n&&a&&a()},onRest:function(){!n&&c&&c()}});return Object(Ee.jsx)(Nn.animated.div,Object(je.a)(Object(je.a)({ref:t,style:o},i),{},{children:r}))})),Rn=function(e){var t=e.children,n=e.open,r=Object(et.a)(e,["children","open"]);return Object(Ee.jsx)(Sn.a,Object(je.a)(Object(je.a)({open:n,closeAfterTransition:!0,BackdropComponent:xn.a,BackdropProps:{timeout:500}},r),{},{children:Object(Ee.jsx)(En,{in:n,children:t})}))},Tn=n.p+"static/media/arrow-down.055702ca.svg",_n=d.c.div(ne||(ne=Object(E.a)(["\n display: flex;\n align-items: center;\n margin: ",";\n\n img {\n margin: 0 ",";\n }\n\n hr {\n width: 100%;\n min-height: 2px;\n height: 2px;\n background-color: ",";\n margin: 0;\n }\n"])),(function(e){return e.noMargin?0:"".concat(m," 0")}),w,p),An=function(e){var t=e.withArrow,n=e.noMargin,r=void 0!==n&&n;return Object(Ee.jsxs)(_n,{noMargin:r,children:[t&&Object(Ee.jsx)("img",{alt:"Arrow Down",src:Tn}),Object(Ee.jsx)("hr",{})]})},In=n.p+"static/media/icon-code.8e767ee3.svg",Mn=n.p+"static/media/icon-arrow.e72eb472.svg",Dn=n(412),Ln=n.n(Dn),Bn=d.c.div(re||(re=Object(E.a)(["\n display: flex;\n align-items: center;\n padding: 0.3rem 1rem;\n\n img:first-child,\n button:first-child {\n margin-right: 0.5rem;\n }\n\n h2 {\n font-weight: 400;\n margin-right: auto;\n }\n"]))),Pn=function(e){var t=e.icon,n=e.heading,r=e.onClose;return Object(Ee.jsxs)(Bn,{children:[t,Object(Ee.jsx)(He.a,{variant:"h5",component:"h2",id:"transaction-modal-title",children:n}),Object(Ee.jsx)(Ne.a,{"aria-label":"Close modal",onClick:function(e){null===r||void 0===r||r(e,"escapeKeyDown")},children:Object(Ee.jsx)(Ln.a,{fontSize:"large"})})]})},Hn=d.c.div(ae||(ae=Object(E.a)(["\n display: flex;\n align-items: center;\n\n & > img {\n margin-right: 0.5rem;\n }\n\n p + p {\n margin-top: 0.5rem;\n }\n"]))),Fn=function(e){var t=e.safeAddress,n=e.ethBalanceWei;return Object(Ee.jsxs)(Hn,{children:[Object(Ee.jsx)(at,{size:32,address:t}),Object(Ee.jsxs)(me.a,{container:!0,direction:"column",justify:"center",children:[Object(Ee.jsxs)(me.a,{container:!0,alignItems:"center",children:[Object(Ee.jsx)("p",{children:t}),Object(Ee.jsx)(an,{content:t})]}),Object(Ee.jsx)(en,{balance:Yt.a.utils.formatEther(n)})]})]})},Wn=Object(Oe.a)((function(){return Object(Ge.a)({txInfoHeading:{color:h,marginBottom:k,"&:not(:first-child)":{marginTop:m}},identicon:{marginRight:w}})})),zn=function(e){var t=e.txData,n=e.txRecipient,r=e.txValue,a=Wn();return Object(Ee.jsxs)("div",{children:[Object(Ee.jsx)(He.a,{variant:"body2",className:a.txInfoHeading,children:"Recipient"}),Object(Ee.jsxs)(me.a,{container:!0,alignItems:"center",children:[Object(Ee.jsx)(at,{className:a.identicon,size:32,address:n}),Object(Ee.jsx)("p",{children:n}),Object(Ee.jsx)(an,{content:n})]}),Object(Ee.jsx)(He.a,{variant:"body2",className:a.txInfoHeading,children:"Value"}),Object(Ee.jsxs)("p",{children:[r," ETH"]}),Object(Ee.jsx)(He.a,{variant:"body2",className:a.txInfoHeading,children:"Data (hex encoded)"}),Object(Ee.jsxs)(me.a,{container:!0,alignItems:"center",children:[Object(Ee.jsxs)("p",{children:[Yt.a.utils.arrayify(t).length," bytes"]}),Object(Ee.jsx)(an,{content:t})]})]})},Gn=Object(Oe.a)((function(e){return Object(Ge.a)({modal:{display:"flex",alignItems:"center",justifyContent:"center"},paper:{borderRadius:8,backgroundColor:e.palette.background.paper,boxShadow:e.shadows[5],width:500},transactionBtnContainer:{width:"100%",borderTop:"".concat(p," 2px solid"),padding:"".concat(m," ").concat(g),"& > h6":{marginRight:"auto"}}})})),Un=d.c.div(ce||(ce=Object(E.a)(["\n padding: "," ",";\n"])),m,g),Kn=d.c.div(ie||(ie=Object(E.a)(["\n display: flex;\n width: 100%;\n justify-content: space-around;\n\n padding: 1rem 0;\n"]))),Vn=function(e){var t=e.open,n=e.onClose,r=e.app,a=e.safeAddress,c=e.txs,o=e.params,s=e.onUserConfirm,d=e.onUserReject,l=Gn(),u=Zt(a,!0),p=c.length>1,f=be((function(e){return[e.signer,e.networkId,e.account]})),h=Object(Me.a)(f,3),b=h[0],j=h[1],x=h[2],g=At((function(e){return e.contracts[j].multiSend})),m=i.a.useState(null),v=Object(Me.a)(m,2),O=v[0],y=v[1],k=i.a.useMemo((function(){var e;return p?g:null===(e=c[0])||void 0===e?void 0:e.to}),[c,p,g]),C=i.a.useMemo((function(){var e;return p?Cn(b,g,c):null===(e=c[0])||void 0===e?void 0:e.data}),[c,p,b,g]),S=i.a.useMemo((function(){var e;return p?"0":Yt.a.BigNumber.from((null===(e=c[0])||void 0===e?void 0:e.value)||0).toString()}),[c,p]),N=p?1:0;if(!k||!C||!S)return Object(Ee.jsx)("div",{});var E=Object(Ee.jsx)(Pn,{icon:Object(Ee.jsx)("img",{src:"".concat(r.url,"/").concat(r.iconPath),alt:"".concat(r.name," logo"),width:20,height:20}),heading:r.name,onClose:n}),R=Object(Ee.jsxs)(Ee.Fragment,{children:[Object(Ee.jsxs)(Un,{children:[Object(Ee.jsx)(Fn,{safeAddress:a,ethBalanceWei:u}),Object(Ee.jsx)(An,{withArrow:!0}),Object(Ee.jsx)(zn,{txData:C,txRecipient:k,txValue:S})]}),c.length>1&&c.map((function(e,t){return Object(Ee.jsxs)(me.a,{role:"button",container:!0,className:l.transactionBtnContainer,alignItems:"center",onClick:function(){return y(e)},onKeyDown:function(t){" "!==t.key&&"Enter"!==t.key&&"Spacebar"!==t.key||y(e)},tabIndex:0,children:[Object(Ee.jsx)(Ie,{src:In,style:{marginRight:w},alt:"Code icon"}),Object(Ee.jsxs)(He.a,{variant:"subtitle1",children:["Transaction ",t]}),Object(Ee.jsx)(Ie,{src:Mn,alt:"Arrow right",style:{transform:"rotate(90deg)"}})]},t)})),Object(Ee.jsx)(An,{noMargin:!0}),Object(Ee.jsxs)(Kn,{children:[Object(Ee.jsx)(Fe.a,{onClick:function(e){null===n||void 0===n||n(e,"escapeKeyDown"),null===d||void 0===d||d()},variant:"contained",color:"secondary",children:"Cancel"}),Object(Ee.jsx)(Fe.a,{onClick:function(){var e=Object(B.a)(L.a.mark((function e(t){var r,c,i;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,kn(b,a,x,{to:k,data:C,valueInWei:S,operation:N,safeTxGas:null!==(r=null===o||void 0===o?void 0:o.safeTxGas)&&void 0!==r?r:0});case 3:c=e.sent,i=c.safeTxHash,null===n||void 0===n||n(t,"escapeKeyDown"),null===s||void 0===s||s(i),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),null===n||void 0===n||n(t,"escapeKeyDown"),null===d||void 0===d||d();case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),variant:"contained",color:"primary",children:"Confirm"})]})]});return O&&(E=Object(Ee.jsx)(Pn,{icon:Object(Ee.jsx)(Ne.a,{"aria-label":"Go back",onClick:function(){return y(null)},children:Object(Ee.jsx)(mn.a,{fontSize:"large"})}),heading:"Transaction",onClose:n}),R=Object(Ee.jsx)(Un,{children:Object(Ee.jsx)(zn,{txData:O.data,txRecipient:O.to,txValue:O.value})})),Object(Ee.jsx)(Rn,{"aria-labelledby":"transaction-modal-title",className:l.modal,open:t,onClose:n,closeAfterTransition:!0,BackdropComponent:xn.a,BackdropProps:{timeout:500},children:Object(Ee.jsxs)("div",{className:l.paper,children:[E,Object(Ee.jsx)(An,{noMargin:!0}),R]})})},qn=n(8),Xn=n(162),Jn=function e(t,n){var r=this;Object(qn.a)(this,e),this.iframeRef=void 0,this.handlers=new Map,this.app=void 0,this.on=function(e,t){r.handlers.set(e,t)},this.isValidMessage=function(e){var t=e.source.parent===window.parent,n=r.app.url.includes(e.origin),a=Object.values(Xn.METHODS).includes(e.data.method);return n&&t&&a},this.canHandleMessage=function(e){return Boolean(r.handlers.get(e.data.method))},this.send=function(e,t){var n,a,c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object(Xn.getSDKVersion)(),o=c?Xn.MessageFormatter.makeErrorResponse(t,e,i):Xn.MessageFormatter.makeResponse(t,e,i);null===(n=r.iframeRef.current)||void 0===n||null===(a=n.contentWindow)||void 0===a||a.postMessage(o,r.app.url)},this.handleIncomingMessage=function(){var e=Object(B.a)(L.a.mark((function e(t){var n,a,c,i;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.isValidMessage(t),a=r.canHandleMessage(t),!n||!a){e.next=15;break}return c=r.handlers.get(t.data.method),e.prev=4,e.next=7,c(t);case 7:"undefined"!==typeof(i=e.sent)&&r.send(i,t.data.id),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(4),console.log({err:e.t0}),r.send(e.t0.message,t.data.id,!0);case 15:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(t){return e.apply(this,arguments)}}(),this.clear=function(){window.removeEventListener("message",r.handleIncomingMessage)},this.iframeRef=t,this.app=n,window.addEventListener("message",this.handleIncomingMessage)},Yn=d.c.iframe(oe||(oe=Object(E.a)(["\n border: none;\n width: 100%;\n height: 100%;\n"]))),$n=function(e){var t=e.url,n=e.app,r=i.a.useRef(null),o=function(e,t){var n=Object(c.useState)(void 0),r=Object(Me.a)(n,2),a=r[0],i=r[1];return Object(c.useEffect)((function(){var n=null;return t&&function(e,t){n=new Jn(e,t),i(n)}(e,t),function(){var e;null===(e=n)||void 0===e||e.clear()}}),[t,e]),a}(r,n),s=i.a.useState(null),d=Object(Me.a)(s,2),l=d[0],u=d[1],p=be((function(e){return[e.networkId,e.provider]})),f=Object(Me.a)(p,2),h=f[0],b=f[1],j=Object(M.i)().params.safeAddress;return i.a.useEffect((function(){null===o||void 0===o||o.on("getSafeInfo",(function(){return{safeAddress:j,network:a[h]}})),null===o||void 0===o||o.on("sendTransactions",(function(e){var t=e.data.params;u({transactions:t.txs,params:t.params||{safeTxGas:0},requestId:e.data.id})})),null===o||void 0===o||o.on("rpcCall",function(){var e=Object(B.a)(L.a.mark((function e(t){var n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.data.params,e.prev=1,!b){e.next=7;break}return e.next=5,b.send(n.call,n.params);case 5:return r=e.sent,e.abrupt("return",r);case 7:throw new Error("Provider unavailable");case 10:return e.prev=10,e.t0=e.catch(1),e.abrupt("return",e.t0);case 13:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(t){return e.apply(this,arguments)}}())}),[o,j,h,b]),Object(Ee.jsxs)(Ee.Fragment,{children:[Object(Ee.jsx)(Yn,{title:"Safe App iframe",src:t,ref:r}),";",Object(Ee.jsx)(Vn,{open:!!l,txs:(null===l||void 0===l?void 0:l.transactions)||[],params:null===l||void 0===l?void 0:l.params,onClose:function(){return u(null)},app:n,safeAddress:j,onUserConfirm:function(e){return null===o||void 0===o?void 0:o.send({safeTxHash:e},(null===l||void 0===l?void 0:l.requestId)||"")},onUserReject:function(){return null===o||void 0===o?void 0:o.send("Transaction rejected by user",(null===l||void 0===l?void 0:l.requestId)||"",!0)}})]})};!function(e){e.notAsked="notAsked",e.loading="loading",e.invalidUrl="invalidUrl",e.invalidManifest="invalidManifest",e.loaded="loaded",e.failed="failed"}(se||(se={}));var Zn,Qn,er=d.c.div(de||(de=Object(E.a)(["\n padding: "," ",";\n display: flex;\n flex-direction: column;\n height: 100%;\n"])),m,w),tr=Object(d.c)(hn.a)(le||(le=Object(E.a)(["\n margin-top: 10px;\n flex-grow: 1;\n"]))),nr=Object(d.c)(bn.a)(ue||(ue=Object(E.a)(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n flex-direction: column;\n"]))),rr=function(e){var t=e.state;return t===se.loaded?null:Object(Ee.jsxs)(nr,{children:[t===se.notAsked&&Object(Ee.jsx)(He.a,{variant:"h2",children:"Enter Safe App URL \u2b06\ufe0f"}),t===se.invalidUrl&&Object(Ee.jsx)(He.a,{variant:"h2",children:"\u274c Invalid URL"}),t===se.invalidManifest&&Object(Ee.jsx)(He.a,{variant:"h2",children:"\u274c Invalid App Manifest"})]})},ar=function(){var e=i.a.useState(""),t=Object(Me.a)(e,2),n=t[0],r=t[1],a=i.a.useState(se.notAsked),c=Object(Me.a)(a,2),o=c[0],s=c[1],d=i.a.useState(null),l=Object(Me.a)(d,2),u=l[0],p=l[1];i.a.useEffect((function(){""!==n||o!==se.invalidUrl&&o!==se.invalidManifest||s(se.notAsked)}),[o,n]);var f=function(){var e=Object(B.a)(L.a.mark((function e(t){var r,a;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),!ut(n)){e.next=20;break}return r=String(n).replace(/\/+$/,""),e.prev=3,e.next=6,jn("".concat(r,"/manifest.json"));case 6:if(a=e.sent,(null===(c=a)||void 0===c?void 0:c.name)&&"unknown"!==c.name&&c.description){e.next=10;break}return s(se.invalidManifest),e.abrupt("return");case 10:s(se.loaded),p(Object(je.a)(Object(je.a)({},a),{},{url:r})),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(3),console.error(e.t0),s(se.failed);case 18:e.next=21;break;case 20:s(se.invalidUrl);case 21:case"end":return e.stop()}var c}),e,null,[[3,14]])})));return function(t){return e.apply(this,arguments)}}();return Object(Ee.jsxs)(er,{children:[Object(Ee.jsx)(hn.a,{children:Object(Ee.jsx)(bn.a,{children:Object(Ee.jsx)("form",{onSubmit:f,children:Object(Ee.jsx)(fn.a,{placeholder:"Enter Safe App URL",style:{width:"100%"},value:n,onChange:function(e){return r(e.target.value)}})})})}),Object(Ee.jsxs)(tr,{children:[Object(Ee.jsx)(rr,{state:o}),o===se.loaded&&u&&Object(Ee.jsx)($n,{url:u.url,app:u})]})]})},cr=d.c.div(Zn||(Zn=Object(E.a)(["\n display: flex;\n"]))),ir=d.c.main(Qn||(Qn=Object(E.a)(["\n flex-grow: 1;\n"]))),or=function(){var e=Object(M.i)(),t=e.path,n=e.url;return Object(Ee.jsxs)(cr,{children:[Object(Ee.jsx)(pn,{}),Object(Ee.jsx)(ir,{children:Object(Ee.jsxs)(M.d,{children:[Object(Ee.jsx)(M.b,{path:"".concat(t,"/apps"),children:Object(Ee.jsx)(ar,{})}),Object(Ee.jsx)(M.a,{to:"".concat(n,"/apps")})]})})]})};var sr=function(){return Object(Ee.jsxs)(I.a,{children:[Object(Ee.jsx)(yt,{}),Object(Ee.jsxs)(M.d,{children:[Object(Ee.jsx)(M.b,{exact:!0,path:"/",children:Object(Ee.jsx)(Kt,{})}),Object(Ee.jsx)(M.b,{path:"/safes/:safeAddress",children:Object(Ee.jsx)(or,{})}),Object(Ee.jsx)(M.a,{to:"/"})]})]})};Tt("WEB3_CONNECT_CACHED_PROVIDER")&&be.getState().connectProvider(),s.a.render(Object(Ee.jsx)(i.a.StrictMode,{children:Object(Ee.jsx)(d.a,{theme:{colors:{primary:"#008C73",primaryLight:"#A1D2CA",primaryHover:"#005546",secondary:"#001428",secondaryLight:"#B2B5B2",secondaryHover:"#5D6D74",error:"#DB3A3D",errorHover:"#C31717",text:"#001428",icon:"#B2B5B2",placeHolder:"#5D6D74",inputField:"#F0EFEE",separator:"#E8E7E6",rinkeby:"#E8673C",pendingTagHover:"#FBE5C5",tag:"#D4D5D3",background:"#F7F5F5",white:"#ffffff",warning:"#FFC05F",disabled:{opacity:.5},overlay:{opacity:.75,color:"#E8E7E6"},shadow:{blur:"18px",opacity:.75,color:"#28363D"}}},children:Object(Ee.jsxs)(l.a,{theme:N,children:[Object(Ee.jsx)(_,{}),Object(Ee.jsx)(sr,{})]})})}),document.getElementById("root")),A(console.log)}},[[785,1,2]]]); +//# sourceMappingURL=main.c31c54ea.chunk.js.map \ No newline at end of file diff --git a/packages/safe-apps-developer-ui/build/static/js/main.c31c54ea.chunk.js.map b/packages/safe-apps-developer-ui/build/static/js/main.c31c54ea.chunk.js.map new file mode 100644 index 00000000..557d20bd --- /dev/null +++ b/packages/safe-apps-developer-ui/build/static/js/main.c31c54ea.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../../src/communication/methods.ts","../../../src/index.ts","../../../src/sdk.ts","../../../../src/communication/index.ts","../../../../src/communication/messageFormatter.ts","../../../src/utils.ts","../../../../src/communication/utils.ts","../../../../src/txs/index.ts","../../../../src/eth/index.ts","../../../../src/eth/constants.ts","../../../src/types.ts","api/provider.ts","styles/variables.ts","styles/mui.ts","assets/fonts/Averta-ExtraBold.woff2","assets/fonts/Averta-normal.woff2","styles/global.ts","reportWebVitals.ts","pages/safes/apps/utils.ts","stores/provider.ts","components/Layout/Divider.tsx","components/Header/components/Provider.tsx","components/Layout/Img.tsx","components/Header/assets/gnosis-safe-multisig-logo.svg","components/Layout/Spacer.tsx","components/Header/components/Layout.tsx","hooks/useOpenHandler.ts","components/ConnectButton.tsx","components/Header/assets/key.svg","components/Header/assets/triangle.svg","components/Header/components/KeyRing.tsx","components/Header/components/ProviderDetailsDropdown/ConnectDetails.tsx","components/Identicon.tsx","styles/utils.ts","components/Layout/Hairline.tsx","utils/strings.ts","components/Header/components/CircleDot.tsx","components/Header/assets/wallet.svg","components/Header/components/ProviderDetailsDropdown/UserDetails.tsx","components/Header/components/NetworkLabel.tsx","components/Header/components/ProviderInfo/ProviderAccessible.tsx","components/Header/components/ProviderInfo/ProviderDisconnected.tsx","components/Header/index.tsx","components/Card.tsx","components/Dot.tsx","utils/localStorage.ts","stores/contracts.ts","api/safeContracts.ts","pages/Welcome.tsx","api/eth.ts","hooks/useEthBalance.ts","components/BalanceBox.tsx","components/CopyBtn/copy.svg","components/CopyBtn/index.tsx","utils/clipboard.ts","components/Sidebar/SafeHeader.tsx","components/Sidebar/apps.svg","components/Sidebar/index.tsx","utils/fetch.ts","api/signatures.ts","api/safe.ts","api/transactions.ts","components/Modal.tsx","components/DividerLine/arrow-down.svg","components/DividerLine/index.tsx","assets/icons/icon-code.svg","assets/icons/icon-arrow.svg","components/pages/safes/apps/TransactionModal/ModalHeader.tsx","components/pages/safes/apps/TransactionModal/SafeDetails.tsx","components/pages/safes/apps/TransactionModal/TransactionDetails.tsx","components/pages/safes/apps/TransactionModal/index.tsx","components/pages/safes/apps/communicator.ts","components/pages/safes/apps/AppIframe.tsx","pages/safes/apps/index.tsx","pages/safes/index.tsx","App.tsx","index.tsx","styles/styled-theme.ts"],"names":["id","success","error","version","ETHEREUM_NETWORK_TO_ID","border","connected","disabled","fancyColor","fontColor","headerHeight","lg","md","primary","secondaryBackground","sm","warning","xs","screenSm","mediumFontSize","theme","createMuiTheme","typography","fontFamily","h3","fontSize","fontWeight","h5","h6","subtitle1","overrides","MuiListItemIcon","root","minWidth","MuiListItemText","textTransform","MuiButtonBase","letterSpacing","color","borderRadius","minHeight","MuiButton","label","lineHeight","contained","boxShadow","containedPrimary","backgroundColor","containedSecondary","outlinedPrimary","sizeLarge","padding","sizeSmall","textSecondary","MuiInput","order","borderBottomLeftRadius","borderBottomRightRadius","input","display","height","textOverflow","MuiBackdrop","GlobalStyle","createGlobalStyle","AvertaNormal","AvertaExtraBold","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","WALLET_PROVIDER","AppState","providerOptions","walletconnect","package","WalletConnectProvider","options","infuraId","web3Modal","Web3Modal","network","cacheProvider","connectToProvider","a","connect","provider","useProviderStore","create","set","get","loaded","account","name","networkId","UNKNOWN","signer","fetchAndSetProvider","listAccounts","getNetwork","chainId","getSigner","connectProvider","updateProvider","disconnect","connection","Web3Provider","on","style","borderRight","Divider","className","useStyles","makeStyles","alignItems","marginLeft","maxWidth","marginRight","cursor","flex","paddingLeft","paddingRight","expand","width","Provider","render","info","open","toggle","classes","containerRef","React","useRef","ref","onClick","IconButton","disableRipple","Img","styled","img","props","bordered","fullWidth","Spacer","div","dropdownContainer","marginTop","container","borderBottom","flexWrap","zIndex","link","popper","Layout","dropdownContent","providerInfo","openInitially","useState","setOpen","close","useOpenHandler","Grid","component","item","to","alt","src","SafeLogo","providerRef","Popper","anchorEl","current","placement","popperOptions","positionFixed","TransitionProps","Grow","ClickAwayListener","mouseEvent","onClickAway","touchEvent","direction","justify","SButton","Button","ConnectButton","setDisabled","state","handleProviderConnect","useCallback","console","type","variant","styles","createStyles","dot","position","key","justifyContent","top","KeyRing","center","circleSize","dotRight","dotSize","dotTop","hideDot","keySize","mode","keyStyle","size","buildKeyStyleFrom","dotStyle","right","buildDotStyleFrom","isWarning","TriangleIcon","KeyIcon","undefined","headingContainer","logo","text","flexGrow","textAlign","connectText","margin","ConnectDetails","Typography","StyledImg","Identicon","address","rest","iconSrc","makeBlockie","getSize","Hairline","calculatedStyles","calculateStyleFrom","mergedStyles","ZERO_ADDRESS","EMPTY_DATA","upperFirst","value","charAt","toUpperCase","toLowerCase","slice","textShortener","charsStart","charsEnd","separator","amountOfCharsToKeep","length","r","RegExp","matchResult","exec","textStart","textEnd","isValidURL","url","allowedProtocols","urlInfo","URL","includes","protocol","CircleDot","xmlns","viewBox","cx","cy","fill","fillRule","stroke","strokeWidth","transform","identicon","user","details","flexGGrid","labels","background","disconnectText","connectedBg","UserDetails","onDisconnect","providerName","userAddress","status","clsx","WalletIcon","data-testid","NetworkLabel","icon","ProviderInfo","flexDirection","whiteSpace","ProviderDisconnected","HeaderComponent","disconnectFromProvider","ProviderAccessible","StyledCard","fade","colors","shadow","white","DisabledOverlay","Card","children","StyledDot","Dot","getFromLocalStorage","window","localStorage","getItem","JSON","parse","CONTRACTS_STORE_KEY","useContractsStore","contracts","saveContracts","deployedContracts","newContracts","setItem","stringify","saveToStorage","getProxyFactoryContract","Contract","ProxyFactorySol","abi","getSafeContract","GnosisSafeSol","deployMasterCopy","factory","ContractFactory","bytecode","deploy","masterCopy","deployProxyFactory","proxyFactory","deployFallbackHandler","FallbackHandlerSol","fallbackHandler","deployMultiSend","MultiSendSol","multiSend","pageContainer","heading","stepsContainer","interfaceDescription","stepCard","btn","cardTitle","marginBottom","WelcomePage","safeDeploying","setSafeDeploying","providerLoaded","history","useHistory","deployContracts","Promise","all","deploySafe","safeContract","owners","setupData","interface","encodeFunctionData","createProxyWithNonce","Date","now","tx","wait","safeAddr","events","args","push","spacing","getEthBalance","balance","getBalance","useEthBalance","poll","ethers","BigNumber","from","setBalance","useEffect","interval","loadBalance","bal","eq","setInterval","clearInterval","Box","p","BalanceBox","symbol","transition","increasedPopperZindex","CopyBtn","content","increaseZIndex","clicked","setClicked","customClasses","Tooltip","onClose","setTimeout","title","event","stopPropagation","range","document","createRange","listener","e","clipboardData","setData","preventDefault","selectNodeContents","body","getSelection","addRange","addEventListener","execCommand","removeEventListener","removeAllRanges","copyToClipboard","CopyIcon","Container","SafeHeader","safeAddress","etherBalance","utils","formatEther","SidebarContainer","aside","Line","hr","ListItemLink","renderLink","useMemo","forwardRef","itemProps","activeStyle","ListItem","button","ListItemIcon","ListItemText","Sidebar","params","useParams","useRouteMatch","List","aria-label","AppsIcon","fetchJSON","opts","fetch","resp","json","getPreValidatedSignature","startStr","replace","getSafeNonce","safe","nonce","executeTransaction","baseGas","data","gasPrice","gasToken","operation","refundReceiver","safeTxGas","valueInWei","sigs","safeInstance","execTransaction","execution","getTransactionHash","txHash","createTransaction","sender","senderSignature","safeNonce","safeTxHash","executedTx","encodeMultiSendCall","multiSendAddress","txs","getMultiSendContract","joinedTxs","map","arrayify","solidityPack","join","Fade","in","onEnter","onExited","other","useSpring","opacity","onStart","onRest","Modal","closeAfterTransition","BackdropComponent","Backdrop","BackdropProps","timeout","Wrapper","noMargin","DividerLine","withArrow","ArrowDown","AppNameContainer","ModalHeader","SafeContainer","SafeDetails","ethBalanceWei","txInfoHeading","TransactionDetails","txData","txRecipient","txValue","modal","paper","palette","shadows","transactionBtnContainer","borderTop","Content","ButtonContainer","TransactionModal","app","onUserConfirm","onUserReject","ethBalance","isMultiSend","openedTransaction","setOpenedTransaction","toString","header","iconPath","index","role","onKeyDown","tabIndex","CodeIcon","ArrowIcon","aria-labelledby","AppCommunicator","iframeRef","handlers","Map","method","handler","isValidMessage","msg","sentFromIframe","source","parent","knownOrigin","origin","knownMethod","Object","values","METHODS","canHandleMessage","Boolean","send","requestId","sdkVersion","getSDKVersion","MessageFormatter","makeErrorResponse","makeResponse","contentWindow","postMessage","handleIncomingMessage","validMessage","hasHandler","response","log","err","message","clear","this","SIframe","iframe","AppIframe","communicator","setCommunicator","communicatorInstance","initCommunicator","useAppCommunicator","proposedTxs","setProposedTxs","transactions","call","Error","AppFrame","FrameContentCentered","CardContent","FrameMessage","notAsked","invalidUrl","invalidManifest","Apps","appUrl","setAppUrl","appState","setAppState","safeApp","setSafeApp","onUrlSubmit","String","manifest","appInfo","description","failed","onSubmit","TextField","placeholder","onChange","target","PageContainer","main","SafePage","path","App","Header","exact","getState","ReactDOM","StrictMode","primaryLight","primaryHover","secondary","secondaryLight","secondaryHover","errorHover","placeHolder","inputField","rinkeby","pendingTagHover","tag","overlay","blur","muiTheme","getElementById"],"mappings":"gOAAa,UAAU,CACrB,WAAY,aACZ,iBAAkB,mBAClB,QAAS,UACP,YAAW,gB,kgBCJf,gBAEA,UAAe,UACf,YACA,YACA,YACA,YACA,aAAS,iG,qMCPT,aAEA,YACA,SACA,SAOM,E,WAKF,SAAF,IAA2B,IAAf,EAAe,uDAAF,GACnB,GADqB,UACH,qBAAX,OACT,MAAM,IAAI,MAAM,mDAGd,IAAJ,EAAqD,EAA7C,0BAAR,MAA6B,KAA7B,IAAqD,EAAlB,aAAnC,SAEA,KAAK,aAAe,IAAI,UAAsB,EAAoB,GAClE,KAAK,IAAM,IAAI,MAAI,KAAK,cACpB,KAAC,IAAM,IAAI,MAAI,KAAK,cACpB,KAAC,Y,8DAGC,oGACyB,KAAK,aAD9B,gBACE,EADF,EACE,aAER,KAAK,IAAI,gBAAgB,GAHnB,gD,yG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WAAP,UACE,eAAC,IAAD,CAAqBhnB,MClBX,CACZgS,OAAQ,CACNvS,QAAS,UACTwnB,aAAc,UACdC,aAAc,UAEdC,UAAW,UACXC,eAAgB,UAChBC,eAAgB,UAEhBvoB,MAAO,UACPwoB,WAAY,UAEZxa,KAAM,UACNwE,KAAM,UACNiW,YAAa,UACbC,WAAY,UAEZ7Y,UAAW,UACX8Y,QAAS,UACTC,gBAAiB,UACjBC,IAAK,UACLjX,WAAY,UACZwB,MAAO,UACPtS,QAAS,UAETT,SAAU,CACRuf,QAAS,IAEXkJ,QAAS,CACPlJ,QAAS,IACTxd,MAAO,WAET+Q,OAAQ,CACN4V,KAAM,OACNnJ,QAAS,IACTxd,MAAO,aDlBT,SACE,gBAAC,IAAD,CAAkBlB,MAAO8nB,EAAzB,UACE,eAAC,EAAD,IACA,eAAC,GAAD,WAIN/O,SAASgP,eAAe,SAM1BhlB,EAAgBgI,QAAQ6Y,O","file":"static/js/main.c31c54ea.chunk.js","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.METHODS = void 0;\nexports.METHODS = {\n getEnvInfo: 'getEnvInfo',\n sendTransactions: 'sendTransactions',\n rpcCall: 'rpcCall',\n getSafeInfo: 'getSafeInfo',\n};\n//# sourceMappingURL=methods.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSDKVersion = void 0;\nconst sdk_1 = __importDefault(require(\"./sdk\"));\nexports.default = sdk_1.default;\n__exportStar(require(\"./sdk\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./communication/methods\"), exports);\n__exportStar(require(\"./communication/messageFormatter\"), exports);\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"getSDKVersion\", { enumerable: true, get: function () { return utils_1.getSDKVersion; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst communication_1 = require(\"./communication\");\nconst communication_2 = __importDefault(require(\"./communication\"));\nconst txs_1 = require(\"./txs\");\nconst eth_1 = require(\"./eth\");\nclass SafeAppsSDK {\n constructor(opts = {}) {\n if (typeof window === 'undefined') {\n throw new Error('Error initializing the sdk: window is undefined');\n }\n const { whitelistedDomains = null, debug = false } = opts;\n this.communicator = new communication_2.default(whitelistedDomains, debug);\n this.eth = new eth_1.Eth(this.communicator);\n this.txs = new txs_1.TXs(this.communicator);\n this.bootstrap();\n }\n async bootstrap() {\n const { txServiceUrl } = await this.getEnvInfo();\n this.txs.setTxServiceUrl(txServiceUrl);\n }\n async getEnvInfo() {\n const response = await this.communicator.send(communication_1.METHODS.getEnvInfo, undefined);\n if (!response.success) {\n throw new Error(response.error);\n }\n return response.data;\n }\n async getSafeInfo() {\n const response = await this.communicator.send(communication_1.METHODS.getSafeInfo, undefined);\n if (!response.success) {\n throw new Error(response.error);\n }\n return response.data;\n }\n}\nexports.default = SafeAppsSDK;\n//# sourceMappingURL=sdk.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst semver_1 = __importDefault(require(\"semver\"));\nconst messageFormatter_1 = require(\"./messageFormatter\");\nclass PostMessageCommunicator {\n constructor(allowedOrigins = null, debugMode = false) {\n this.allowedOrigins = null;\n this.callbacks = new Map();\n this.debugMode = false;\n this.isValidMessage = ({ origin, data, source }) => {\n const emptyOrMalformed = !data;\n const sentFromParentEl = source === window.parent;\n const allowedSDKVersion = typeof data.version !== 'undefined' ? semver_1.default.gte(data.version, '1.0.0') : false;\n let validOrigin = true;\n if (Array.isArray(this.allowedOrigins)) {\n validOrigin = this.allowedOrigins.find((regExp) => regExp.test(origin)) !== undefined;\n }\n return !emptyOrMalformed && sentFromParentEl && allowedSDKVersion && validOrigin;\n };\n this.logIncomingMessage = (msg) => {\n console.info(`Safe Apps SDK v1: A message was received from origin ${msg.origin}. `, msg.data);\n };\n this.onParentMessage = (msg) => {\n if (this.isValidMessage(msg)) {\n this.debugMode && this.logIncomingMessage(msg);\n this.handleIncomingMessage(msg.data);\n }\n };\n this.handleIncomingMessage = (payload) => {\n const { id } = payload;\n const cb = this.callbacks.get(id);\n if (cb) {\n cb(payload);\n this.callbacks.delete(id);\n }\n };\n this.send = (method, params) => {\n const request = messageFormatter_1.MessageFormatter.makeRequest(method, params);\n if (typeof window === 'undefined') {\n throw new Error(\"Window doesn't exist\");\n }\n window.parent.postMessage(request, '*');\n return new Promise((resolve) => {\n this.callbacks.set(request.id, (response) => {\n resolve(response);\n });\n });\n };\n this.allowedOrigins = allowedOrigins;\n this.debugMode = debugMode;\n window.addEventListener('message', this.onParentMessage);\n }\n}\nexports.default = PostMessageCommunicator;\n__exportStar(require(\"./methods\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MessageFormatter = void 0;\nconst utils_1 = require(\"./utils\");\nconst utils_2 = require(\"../utils\");\nclass MessageFormatter {\n}\nexports.MessageFormatter = MessageFormatter;\nMessageFormatter.makeRequest = (method, params) => {\n const id = utils_1.generateRequestId();\n return {\n id,\n method,\n params,\n env: {\n sdkVersion: utils_2.getSDKVersion(),\n },\n };\n};\nMessageFormatter.makeResponse = (id, data, version) => ({\n id,\n success: true,\n version,\n data,\n});\nMessageFormatter.makeErrorResponse = (id, error, version) => ({\n id,\n success: false,\n error,\n version,\n});\n//# sourceMappingURL=messageFormatter.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSDKVersion = void 0;\nconst package_json_1 = __importDefault(require(\"../package.json\"));\n// console.log({ pkg });\n// Slice is needed for versions like '1.0.0-beta.0'\nconst getSDKVersion = () => package_json_1.default.version.slice(0, 5);\nexports.getSDKVersion = getSDKVersion;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateRequestId = void 0;\n// i.e. 0-255 -> '00'-'ff'\nconst dec2hex = (dec) => dec.toString(16).padStart(2, '0');\nconst generateId = (len) => {\n const arr = new Uint8Array((len || 40) / 2);\n window.crypto.getRandomValues(arr);\n return Array.from(arr, dec2hex).join('');\n};\nconst generateRequestId = () => {\n if (typeof window !== 'undefined') {\n return generateId(10);\n }\n return new Date().getTime().toString(36);\n};\nexports.generateRequestId = generateRequestId;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TXs = void 0;\nconst methods_1 = require(\"../communication/methods\");\nclass TXs {\n constructor(communicator) {\n this.txServiceUrl = null;\n this.communicator = communicator;\n }\n async getBySafeTxHash(safeTxHash) {\n if (!this.txServiceUrl) {\n throw new Error(\"ENV information hasn't been synced yet or there was an error during the process\");\n }\n const controller = new AbortController();\n const options = {\n method: 'GET',\n signal: controller.signal,\n };\n setTimeout(() => controller.abort(), 10000);\n try {\n const res = await fetch(`${this.txServiceUrl}/transactions/${safeTxHash}`, options);\n if (res.status !== 200) {\n throw new Error(\"Failed to get the transaction. Either safeTxHash is incorrect or transaction hasn't been indexed by the service yet\");\n }\n const json = await res.json();\n return json;\n }\n catch (err) {\n throw err;\n }\n }\n async send({ txs, params }) {\n if (!txs || !txs.length) {\n throw new Error('No transactions were passed');\n }\n const messagePayload = {\n txs,\n params,\n };\n const response = await this.communicator.send(methods_1.METHODS.sendTransactions, messagePayload);\n if (!response.success) {\n throw new Error(response.error);\n }\n return response.data;\n }\n setTxServiceUrl(url) {\n this.txServiceUrl = url;\n }\n}\nexports.TXs = TXs;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Eth = void 0;\nconst constants_1 = require(\"../eth/constants\");\nconst methods_1 = require(\"../communication/methods\");\nconst inputFormatters = {\n defaultBlockParam: (arg = 'latest') => arg,\n returnFullTxObjectParam: (arg = false) => arg,\n blockNumberToHex: (arg) => Number.isInteger(arg) ? `0x${arg.toString(16)}` : arg,\n};\nclass Eth {\n constructor(communicator) {\n this.communicator = communicator;\n this.call = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_call,\n formatters: [null, inputFormatters.defaultBlockParam],\n });\n this.getBalance = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_getBalance,\n formatters: [null, inputFormatters.defaultBlockParam],\n });\n this.getCode = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_getCode,\n formatters: [null, inputFormatters.defaultBlockParam],\n });\n this.getStorageAt = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_getStorageAt,\n formatters: [null, inputFormatters.blockNumberToHex, inputFormatters.defaultBlockParam],\n });\n this.getPastLogs = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_getLogs,\n });\n this.getBlockByHash = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_getBlockByHash,\n formatters: [null, inputFormatters.returnFullTxObjectParam],\n });\n this.getBlockByNumber = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_getBlockByNumber,\n formatters: [inputFormatters.blockNumberToHex, inputFormatters.returnFullTxObjectParam],\n });\n this.getTransactionByHash = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_getTransactionByHash,\n });\n this.getTransactionReceipt = this.buildRequest({\n call: constants_1.RPC_CALLS.eth_getTransactionReceipt,\n });\n }\n buildRequest({ call, formatters }) {\n return async (params) => {\n if (formatters && Array.isArray(params)) {\n formatters.forEach((formatter, i) => {\n if (formatter) {\n params[i] = formatter(params[i]);\n }\n });\n }\n const payload = {\n call,\n params,\n };\n const response = await this.communicator.send(methods_1.METHODS.rpcCall, payload);\n if (!response.success) {\n throw new Error(response.error);\n }\n return response.data;\n };\n }\n}\nexports.Eth = Eth;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RPC_CALLS = void 0;\nexports.RPC_CALLS = {\n eth_call: 'eth_call',\n eth_getLogs: 'eth_getLogs',\n eth_getBalance: 'eth_getBalance',\n eth_getCode: 'eth_getCode',\n eth_getBlockByHash: 'eth_getBlockByHash',\n eth_getBlockByNumber: 'eth_getBlockByNumber',\n eth_getStorageAt: 'eth_getStorageAt',\n eth_getTransactionByHash: 'eth_getTransactionByHash',\n eth_getTransactionReceipt: 'eth_getTransactionReceipt',\n};\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SettingsChangeMethods = exports.TransferMethods = exports.Operation = void 0;\nconst methods_1 = require(\"./communication/methods\");\n// copy-pasting all the types below from safe-react makes me think we might want to export them to a package\nvar Operation;\n(function (Operation) {\n Operation[Operation[\"CALL\"] = 0] = \"CALL\";\n Operation[Operation[\"DELEGATE_CALL\"] = 1] = \"DELEGATE_CALL\";\n Operation[Operation[\"CREATE\"] = 2] = \"CREATE\";\n})(Operation = exports.Operation || (exports.Operation = {}));\n// types comes from: https://github.com/gnosis/safe-client-gateway/blob/752e76b6d1d475791dbd7917b174bb41d2d9d8be/src/utils.rs\nvar TransferMethods;\n(function (TransferMethods) {\n TransferMethods[\"TRANSFER\"] = \"transfer\";\n TransferMethods[\"TRANSFER_FROM\"] = \"transferFrom\";\n TransferMethods[\"SAFE_TRANSFER_FROM\"] = \"safeTransferFrom\";\n})(TransferMethods = exports.TransferMethods || (exports.TransferMethods = {}));\nvar SettingsChangeMethods;\n(function (SettingsChangeMethods) {\n SettingsChangeMethods[\"SETUP\"] = \"setup\";\n SettingsChangeMethods[\"SET_FALLBACK_HANDLER\"] = \"setFallbackHandler\";\n SettingsChangeMethods[\"ADD_OWNER_WITH_THRESHOLD\"] = \"addOwnerWithThreshold\";\n SettingsChangeMethods[\"REMOVE_OWNER\"] = \"removeOwner\";\n SettingsChangeMethods[\"REMOVE_OWNER_WITH_THRESHOLD\"] = \"removeOwnerWithThreshold\";\n SettingsChangeMethods[\"SWAP_OWNER\"] = \"swapOwner\";\n SettingsChangeMethods[\"CHANGE_THRESHOLD\"] = \"changeThreshold\";\n SettingsChangeMethods[\"CHANGE_MASTER_COPY\"] = \"changeMasterCopy\";\n SettingsChangeMethods[\"ENABLE_MODULE\"] = \"enableModule\";\n SettingsChangeMethods[\"DISABLE_MODULE\"] = \"disableModule\";\n SettingsChangeMethods[\"EXEC_TRANSACTION_FROM_MODULE\"] = \"execTransactionFromModule\";\n SettingsChangeMethods[\"APPROVE_HASH\"] = \"approveHash\";\n SettingsChangeMethods[\"EXEC_TRANSACTION\"] = \"execTransaction\";\n})(SettingsChangeMethods = exports.SettingsChangeMethods || (exports.SettingsChangeMethods = {}));\n//# sourceMappingURL=types.js.map","import Web3Modal, { IProviderOptions } from 'web3modal';\nimport WalletConnectProvider from '@walletconnect/web3-provider';\n\nconst WALLET_PROVIDER = {\n SAFE: 'SAFE',\n METAMASK: 'METAMASK',\n REMOTE: 'REMOTE',\n TORUS: 'TORUS',\n PORTIS: 'PORTIS',\n FORTMATIC: 'FORTMATIC',\n SQUARELINK: 'SQUARELINK',\n WALLETCONNECT: 'WALLETCONNECT',\n OPERA: 'OPERA',\n WALLETLINK: 'WALLETLINK',\n AUTHEREUM: 'AUTHEREUM',\n LEDGER: 'LEDGER',\n TREZOR: 'TREZOR',\n LATTICE: 'LATTICE',\n UNKNOWN: 'UNKNOWN',\n};\n\nenum ETHEREUM_NETWORK_TO_ID {\n MAINNET = 1,\n MORDEN = 2,\n ROPSTEN = 3,\n RINKEBY = 4,\n GOERLI = 5,\n KOVAN = 42,\n XDAI = 100,\n ENERGY_WEB_CHAIN = 246,\n VOLTA = 73799,\n UNKNOWN = 0,\n LOCAL = 4447,\n}\n\nconst providerOptions: IProviderOptions = {\n walletconnect: {\n package: WalletConnectProvider,\n options: {\n infuraId: '82b8340f4bd146a2bfc606609ffbec41',\n },\n },\n};\n\nconst web3Modal = new Web3Modal({ network: 'rinkeby', providerOptions, cacheProvider: true });\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst connectToProvider = async (): Promise => {\n const provider = await web3Modal.connect();\n return provider;\n};\n\nexport { WALLET_PROVIDER, ETHEREUM_NETWORK_TO_ID, connectToProvider };\n","export const background = '#f7f5f5';\nexport const border = '#e8e7e6';\nexport const connected = '#008C73';\nexport const disabled = '#5D6D74';\nexport const error = '#f02525';\nexport const fancyColor = '#f02525';\nexport const fontColor = '#001428';\nexport const headerHeight = '53px';\nexport const lg = '24px';\nexport const marginButtonImg = '12px';\nexport const md = '16px';\nexport const primary = '#001428';\nexport const secondary = '#008C73';\nexport const secondaryText = '#B2B5B2';\nexport const secondaryBackground = '#f0efee';\nexport const sm = '8px';\nexport const warning = '#ffc05f';\nexport const xl = '32px';\nexport const xs = '4px';\nexport const xxl = '40px';\nexport const boldFont = 700;\nexport const bolderFont = 500;\nexport const fontSizeHeadingLg = 32;\nexport const fontSizeHeadingMd = 20;\nexport const fontSizeHeadingSm = 16;\nexport const fontSizeHeadingXs = 13;\nexport const regularFont = 400;\nexport const screenLg = 1200;\nexport const screenMd = 992;\nexport const screenMdMax = 1199;\nexport const screenSm = 768;\nexport const screenSmMax = 991;\nexport const screenXs = 480;\nexport const screenXsMax = 767;\nexport const buttonLargeFontSize = '16px';\nexport const extraBoldFont = 800;\nexport const extraLargeFontSize = '20px';\nexport const extraSmallFontSize = '11px';\nexport const largeFontSize = '16px';\nexport const lightFont = 300;\nexport const mainFontFamily = 'Averta, sans-serif';\nexport const mediumFontSize = '14px';\nexport const secondaryFontFamily = 'Averta, monospace';\nexport const smallFontSize = '12px';\nexport const xxlFontSize = '32px';\n","import { createMuiTheme } from '@material-ui/core/styles';\nimport {\n largeFontSize,\n disabled,\n secondary,\n primary,\n buttonLargeFontSize,\n md,\n lg,\n sm,\n smallFontSize,\n regularFont,\n secondaryBackground,\n mediumFontSize,\n} from './variables';\n\nconst theme = createMuiTheme({\n typography: {\n fontFamily: 'Averta, sans-serif',\n h3: {\n fontSize: '2.3rem',\n fontWeight: 800,\n },\n h5: { fontWeight: 800 },\n h6: {\n fontSize: '1.15rem',\n fontWeight: 800,\n },\n subtitle1: {\n fontSize: '1.15rem',\n },\n },\n overrides: {\n MuiListItemIcon: {\n root: {\n minWidth: 32,\n },\n },\n MuiListItemText: {\n primary: {\n textTransform: 'uppercase',\n fontWeight: 'bold',\n fontSize: '0.76rem',\n },\n },\n MuiButtonBase: {\n root: {\n letterSpacing: '0.9px',\n '&$disabled': {\n color: disabled,\n },\n color: disabled,\n textTransform: 'none',\n borderRadius: sm,\n minWidth: 'none',\n minHeight: '35px',\n },\n },\n MuiButton: {\n label: {\n lineHeight: '1',\n fontSize: largeFontSize,\n fontWeight: regularFont,\n },\n root: {\n letterSpacing: '0.9px',\n '&$disabled': {\n color: disabled,\n },\n color: disabled,\n textTransform: 'none',\n borderRadius: sm,\n minWidth: 'none',\n minHeight: '35px',\n },\n contained: {\n boxShadow: '1px 2px 10px 0 rgba(212, 212, 211, 0.59)',\n },\n containedPrimary: {\n backgroundColor: secondary,\n '&:hover': {\n backgroundColor: primary,\n },\n },\n containedSecondary: {\n backgroundColor: primary,\n '&:hover': {\n backgroundColor: '#5d7274',\n },\n },\n outlinedPrimary: {\n border: `2px solid ${primary}`,\n '&:hover': {\n border: `2px solid ${primary}`,\n },\n },\n sizeLarge: {\n padding: `${md} ${lg}`,\n minHeight: '52px',\n fontSize: buttonLargeFontSize,\n },\n sizeSmall: {\n minWidth: '130px',\n fontSize: smallFontSize,\n },\n textSecondary: {\n '&:hover': {\n borderRadius: '3px',\n },\n },\n },\n MuiInput: {\n root: {\n backgroundColor: secondaryBackground,\n borderRadius: '5px',\n color: primary,\n fontSize: mediumFontSize,\n lineHeight: '56px',\n order: 1,\n padding: `0 ${md}`,\n '&:$disabled': {\n color: '#0000ff',\n },\n '&:active': {\n borderBottomLeftRadius: '0',\n borderBottomRightRadius: '0',\n },\n },\n input: {\n color: primary,\n display: 'flex',\n height: 'auto',\n letterSpacing: '0.5px',\n padding: '0',\n textOverflow: 'ellipsis',\n },\n },\n MuiBackdrop: {\n root: {\n backgroundColor: 'rgba(232,231,230, 0.75)',\n },\n },\n },\n});\n\nexport { theme };\n","export default __webpack_public_path__ + \"static/media/Averta-ExtraBold.8fdcd8d4.woff2\";","export default __webpack_public_path__ + \"static/media/Averta-normal.39d04879.woff2\";","import { createGlobalStyle } from 'styled-components';\nimport { fontColor, mediumFontSize } from './variables';\nimport AvertaExtraBold from '../assets/fonts/Averta-ExtraBold.woff2';\nimport AvertaNormal from '../assets/fonts/Averta-normal.woff2';\n\nconst GlobalStyle = createGlobalStyle`\n @font-face {\n font-family: \"Averta\";\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: local(\"Averta-Regular\"),\n url(${AvertaNormal}) format(\"woff2\");\n }\n\n @font-face {\n font-family: \"Averta\";\n font-style: normal;\n font-weight: 800;\n font-display: swap;\n src: local(\"Averta-Extrabold\"),\n url(${AvertaExtraBold}) format(\"woff2\");\n }\n\n\n body {\n background-color: #f7f5f5;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n bottom: 0;\n color: ${fontColor};\n font-family: \"Averta\", monospace;\n left: 0;\n margin: 0;\n overflow-x: hidden;\n position: absolute;\n right: 0;\n text-rendering: geometricPrecision;\n top: 0;\n }\n\n html {\n font-size: ${mediumFontSize};\n }\n\n * {\n box-sizing: border-box;\n }\n\n p {\n margin: 0;\n }\n`;\n\nexport default GlobalStyle;\n","import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler): void => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","const isAppManifestValid = (appInfo: Record): boolean =>\n // `appInfo` exists and `name` exists\n !!appInfo?.name &&\n // if `name` exists is not 'unknown'\n appInfo.name !== 'unknown' &&\n // `description` exists\n !!appInfo.description;\n\nenum AppState {\n notAsked = 'notAsked',\n loading = 'loading',\n invalidUrl = 'invalidUrl',\n invalidManifest = 'invalidManifest',\n loaded = 'loaded',\n failed = 'failed',\n}\n\nexport { isAppManifestValid, AppState };\n","import create from 'zustand';\nimport { Web3Provider, JsonRpcSigner } from '@ethersproject/providers';\nimport { connectToProvider, ETHEREUM_NETWORK_TO_ID, WALLET_PROVIDER } from 'src/api/provider';\n\ntype ProviderInfo = { loaded: boolean; account: string; name: string; networkId: ETHEREUM_NETWORK_TO_ID };\n\ntype ProviderState = ProviderInfo & {\n provider: Web3Provider | null;\n signer: JsonRpcSigner | null;\n connectProvider: () => void;\n fetchAndSetProvider: (provider: Web3Provider) => Promise;\n disconnect: () => void;\n updateProvider: () => void;\n};\n\nconst useProviderStore = create((set, get) => ({\n loaded: false,\n account: '',\n name: WALLET_PROVIDER.UNKNOWN,\n networkId: ETHEREUM_NETWORK_TO_ID.UNKNOWN,\n provider: null,\n signer: null,\n\n fetchAndSetProvider: async (provider: Web3Provider) => {\n const account = (await provider.listAccounts())[0];\n const { chainId: networkId } = await provider.getNetwork();\n\n return set({ account, loaded: true, networkId, provider, signer: provider.getSigner() });\n },\n\n connectProvider: async () => {\n const { updateProvider, disconnect, fetchAndSetProvider } = get();\n\n const connection = await connectToProvider();\n\n const provider = new Web3Provider(connection, 'any');\n\n connection.on('chainChanged', updateProvider);\n connection.on('accountsChanged', updateProvider);\n connection.on('disconnect', disconnect);\n\n fetchAndSetProvider(provider);\n },\n\n updateProvider: async () => {\n const { provider } = get();\n\n if (!provider) {\n return;\n }\n\n const account = (await provider.listAccounts())[0];\n const { chainId: networkId } = await provider.getNetwork();\n\n if (!account) {\n return set({\n loaded: false,\n account: '',\n networkId: ETHEREUM_NETWORK_TO_ID.UNKNOWN,\n provider: null,\n signer: null,\n });\n }\n\n return set({ account, loaded: true, networkId });\n },\n\n disconnect: () =>\n set({\n loaded: false,\n account: '',\n networkId: ETHEREUM_NETWORK_TO_ID.UNKNOWN,\n provider: null,\n signer: null,\n }),\n}));\n\nexport { useProviderStore };\n","import { border } from 'src/styles/variables';\n\nconst style = {\n borderRight: `solid 2px ${border}`,\n height: '100%',\n};\n\nconst Divider = ({ className }: { className?: string }): React.ReactElement => (\n
\n);\n\nexport { Divider };\n","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport ExpandLess from '@material-ui/icons/ExpandLess';\nimport ExpandMore from '@material-ui/icons/ExpandMore';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport { Divider } from 'src/components/Layout/Divider';\nimport { screenSm, sm } from 'src/styles/variables';\n\nconst useStyles = makeStyles({\n root: {\n alignItems: 'center',\n display: 'flex',\n height: '100%',\n marginLeft: 'auto',\n [`@media (min-width: ${screenSm}px)`]: {\n maxWidth: '284px',\n marginRight: '20px',\n },\n },\n provider: {\n alignItems: 'center',\n cursor: 'pointer',\n display: 'flex',\n flex: '1 1 auto',\n padding: sm,\n [`@media (min-width: ${screenSm}px)`]: {\n paddingLeft: sm,\n paddingRight: sm,\n },\n },\n expand: {\n height: '30px',\n width: '30px',\n },\n});\n\ntype Props = {\n info: React.ReactNode;\n open: boolean;\n toggle: () => void;\n render: (ref: React.MutableRefObject) => React.ReactNode;\n};\n\nconst Provider = ({ render, info, open, toggle }: Props): React.ReactElement => {\n const classes = useStyles();\n const containerRef = React.useRef(null);\n\n return (\n <>\n
\n \n
\n {info}\n \n {open ? : }\n \n
\n \n
\n {render(containerRef)}\n \n );\n};\n\nexport { Provider };\n","import { ImgHTMLAttributes } from 'react';\nimport styled from 'styled-components';\n\ntype ImgProps = ImgHTMLAttributes & {\n bordered?: boolean;\n fullWidth?: boolean;\n};\n\nconst Img = styled.img`\n max-width: 100%;\n box-sizing: border-box;\n\n ${(props) => props.bordered && 'border: 1px solid #ddd;'}\n\n ${(props) =>\n props.fullWidth &&\n `\n padding: 0;\n width: 40% !important;\n margin: 0 60% 25px !important;\n `}\n`;\n\nexport { Img };\n","export default __webpack_public_path__ + \"static/media/gnosis-safe-multisig-logo.ebc553e5.svg\";","import styled from 'styled-components';\n\nconst Spacer = styled.div`\n flex-grow: 1;\n`;\n\nexport { Spacer };\n","import ClickAwayListener from '@material-ui/core/ClickAwayListener';\nimport Grow from '@material-ui/core/Grow';\nimport Grid from '@material-ui/core/Grid';\nimport Popper from '@material-ui/core/Popper';\nimport { makeStyles } from '@material-ui/core/styles';\nimport * as React from 'react';\nimport { Link } from 'react-router-dom';\n\nimport { Provider } from './Provider';\n\nimport { Img } from 'src/components/Layout/Img';\nimport { border, headerHeight, sm, md } from 'src/styles/variables';\nimport { useOpenHandler } from 'src/hooks/useOpenHandler';\n\nimport SafeLogo from '../assets/gnosis-safe-multisig-logo.svg';\nimport { Spacer } from 'src/components/Layout/Spacer';\n\nconst useStyles = makeStyles({\n dropdownContainer: {\n backgroundColor: 'white',\n borderRadius: sm,\n boxShadow: '0 0 10px 0 rgba(33, 48, 77, 0.1)',\n marginTop: '11px',\n minWidth: '280px',\n minHeight: '244px',\n padding: 0,\n },\n container: {\n backgroundColor: 'white',\n borderBottom: `solid 2px ${border}`,\n boxShadow: '0 2px 4px 0 rgba(212, 212, 211, 0.59)',\n flexWrap: 'nowrap',\n height: headerHeight,\n width: '100%',\n zIndex: 1301,\n },\n link: {\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n paddingLeft: md,\n },\n popper: {\n zIndex: 2000,\n },\n});\n\ntype Props = { dropdownContent: React.ReactElement; providerInfo: React.ReactElement };\n\nconst Layout = ({ dropdownContent, providerInfo }: Props): React.ReactElement => {\n const classes = useStyles();\n const { close, open, toggle } = useOpenHandler();\n\n return (\n \n \n \n \"Gnosis\n \n \n \n \n ) => (\n \n {({ TransitionProps }) => (\n \n <>\n \n \n {dropdownContent}\n \n \n \n \n )}\n \n )}\n />\n \n \n );\n};\n\nexport default Layout;\n","import { useState } from 'react';\n\ntype ReturnValue = {\n open: boolean;\n toggle: () => void;\n close: () => void;\n};\n\nexport const useOpenHandler = (openInitially = false): ReturnValue => {\n const [open, setOpen] = useState(openInitially);\n\n return {\n open,\n toggle: () => setOpen((open) => !open),\n close: () => setOpen(false),\n };\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport Button from '@material-ui/core/Button';\n\nimport { useProviderStore } from 'src/stores/provider';\n\nconst SButton = styled(Button)`\n min-width: 140px;\n`;\n\nconst ConnectButton = ({ className }: { className?: string }): React.ReactElement => {\n const [disabled, setDisabled] = React.useState(false);\n const connectProvider = useProviderStore((state) => state.connectProvider);\n\n const handleProviderConnect = React.useCallback(async () => {\n setDisabled(true);\n\n try {\n await connectProvider();\n } catch (err) {\n console.error(err);\n } finally {\n setDisabled(false);\n }\n }, [connectProvider]);\n\n return (\n \n Connect\n \n );\n};\n\nexport { ConnectButton };\n","export default __webpack_public_path__ + \"static/media/key.566b7e77.svg\";","export default __webpack_public_path__ + \"static/media/triangle.c539e7f8.svg\";","import { createStyles, makeStyles } from '@material-ui/core/styles';\nimport Dot from '@material-ui/icons/FiberManualRecord';\nimport React, { ReactElement } from 'react';\n\nimport { Img } from 'src/components/Layout/Img';\nimport { border, fancyColor, screenSm, warning } from 'src/styles/variables';\n\nimport KeyIcon from '../assets/key.svg';\nimport TriangleIcon from '../assets/triangle.svg';\n\nconst styles = createStyles({\n root: {\n display: 'none',\n [`@media (min-width: ${screenSm}px)`]: {\n display: 'flex',\n },\n },\n dot: {\n position: 'relative',\n backgroundColor: '#ffffff',\n color: fancyColor,\n },\n key: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: border,\n },\n warning: {\n position: 'relative',\n top: '-2px',\n },\n});\n\nconst useStyles = makeStyles(styles);\n\nconst buildKeyStyleFrom = (size: number, center: boolean, dotSize: number) => ({\n width: `${size}px`,\n height: `${size}px`,\n marginLeft: center ? `${dotSize}px` : 'none',\n borderRadius: `${size}px`,\n});\n\nconst buildDotStyleFrom = (size: number, top: number, right: number, mode: string) => ({\n width: `${size}px`,\n height: `${size}px`,\n borderRadius: `${size}px`,\n top: `${top}px`,\n right: `${right}px`,\n color: mode === 'error' ? fancyColor : warning,\n});\n\ntype Props = {\n center?: boolean;\n circleSize?: number;\n dotRight?: number;\n dotSize?: number;\n dotTop?: number;\n hideDot?: boolean;\n keySize: number;\n mode?: string;\n};\n\nexport const KeyRing = ({\n center = false,\n circleSize,\n dotRight,\n dotSize,\n dotTop,\n hideDot = false,\n keySize,\n mode = '',\n}: Props): ReactElement => {\n const classes = useStyles(styles);\n const keyStyle = buildKeyStyleFrom(circleSize || 5, center, dotSize || 5);\n const dotStyle = buildDotStyleFrom(dotSize || 5, dotTop || 5, dotRight || 5, mode);\n const isWarning = mode === 'warning';\n const img = isWarning ? TriangleIcon : KeyIcon;\n\n return (\n <>\n
\n
\n \n
\n {!hideDot && }\n
\n \n );\n};\n","import { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport { ConnectButton } from 'src/components/ConnectButton';\nimport { md } from 'src/styles/variables';\nimport { KeyRing } from 'src/components/Header/components/KeyRing';\n\nconst useStyles = makeStyles({\n headingContainer: {\n padding: `${md} 12px`,\n },\n logo: {\n justifyContent: 'center',\n },\n text: {\n letterSpacing: '-0.6px',\n flexGrow: 1,\n textAlign: 'center',\n },\n connect: {\n padding: `${md} 0`,\n textAlign: 'center',\n },\n connectText: {\n letterSpacing: '1px',\n },\n img: {\n margin: '0px 2px',\n },\n});\n\nconst ConnectDetails = (): React.ReactElement => {\n const classes = useStyles();\n\n return (\n <>\n
\n \n Connect a Wallet\n \n
\n
\n \n
\n
\n \n
\n \n );\n};\n\nexport default ConnectDetails;\n","import * as React from 'react';\n\nimport makeBlockie from 'ethereum-blockies-base64';\nimport styled from 'styled-components';\n\ntype Props = {\n address: string;\n size?: number;\n className?: string;\n};\n\nconst StyledImg = styled.img<{ size: number }>`\n height: ${({ size }) => `${size}px`};\n width: ${({ size }) => `${size}px`};\n border-radius: 50%;\n`;\n\nconst Identicon = ({ size = 40, address, ...rest }: Props): React.ReactElement => {\n const iconSrc = React.useMemo(() => makeBlockie(address), [address]);\n\n return ;\n};\n\nexport { Identicon };\n","import { lg, md, sm, xl, xs } from 'src/styles/variables';\n\nexport type GridLayoutUnit = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport const getSize = (size?: GridLayoutUnit): string => {\n switch (size) {\n case 'xs':\n return xs;\n case 'sm':\n return sm;\n case 'md':\n return md;\n case 'lg':\n return lg;\n case 'xl':\n return xl;\n default:\n return '0';\n }\n};\n","import { CSSProperties } from 'react';\nimport { getSize, GridLayoutUnit } from 'src/styles/utils';\nimport { border } from 'src/styles/variables';\n\nconst calculateStyleFrom = (color?: string, margin?: GridLayoutUnit) => ({\n width: '100%',\n minHeight: '2px',\n height: '2px',\n backgroundColor: color || border,\n margin: `${getSize(margin)} 0px`,\n});\n\ntype Props = {\n className?: string;\n color?: string;\n margin?: GridLayoutUnit;\n style?: CSSProperties;\n};\n\nconst Hairline = ({ className, color, margin, style }: Props): React.ReactElement => {\n const calculatedStyles = calculateStyleFrom(color, margin);\n const mergedStyles = { ...calculatedStyles, ...(style || {}) };\n\n return
;\n};\n\nexport { Hairline };\n","const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';\nconst EMPTY_DATA = '0x';\n\nconst upperFirst = (value: string): string => value.charAt(0).toUpperCase() + value.toLowerCase().slice(1);\n\nconst textShortener = (text: string, charsStart: number, charsEnd: number, separator = '...'): string => {\n const amountOfCharsToKeep = charsEnd + charsStart;\n\n if (amountOfCharsToKeep >= text.length || !amountOfCharsToKeep) {\n // no need to shorten\n return text;\n }\n\n const r = new RegExp(`^(.{${charsStart}}).+(.{${charsEnd}})$`);\n const matchResult = r.exec(text);\n\n if (!matchResult) {\n // if for any reason the exec returns null, the text remains untouched\n return text;\n }\n\n const [, textStart, textEnd] = matchResult;\n\n return `${textStart}${separator}${textEnd}`;\n};\n\nconst isValidURL = (url: string, allowedProtocols = ['https:', 'http:']): boolean => {\n try {\n const urlInfo = new URL(url);\n\n return allowedProtocols.includes(urlInfo.protocol);\n } catch (error) {\n return false;\n }\n};\n\nconst removeTrailingSlash = (str: string): string => String(str).replace(/\\/+$/, '');\n\nexport { ZERO_ADDRESS, upperFirst, textShortener, EMPTY_DATA, isValidURL, removeTrailingSlash };\n","type Props = {\n className: string;\n};\n\nconst CircleDot = (props: Props): React.ReactElement => (\n
\n \n \n \n
\n);\n\nexport { CircleDot };\n","export default __webpack_public_path__ + \"static/media/wallet.196ce26b.svg\";","import { makeStyles } from '@material-ui/core/styles';\nimport Dot from '@material-ui/icons/FiberManualRecord';\nimport Grid from '@material-ui/core/Grid';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport clsx from 'clsx';\n\nimport { Identicon } from 'src/components/Identicon';\nimport { Spacer } from 'src/components/Layout/Spacer';\nimport { Hairline } from 'src/components/Layout/Hairline';\nimport { Img } from 'src/components/Layout/Img';\nimport { background, connected as connectedBg, lg, md, sm, warning, xs } from 'src/styles/variables';\nimport { upperFirst, textShortener } from 'src/utils/strings';\nimport { ETHEREUM_NETWORK_TO_ID } from 'src/api/provider';\n\n// import { getExplorerInfo } from 'src/config';\nimport { KeyRing } from 'src/components/Header/components/KeyRing';\nimport { CircleDot } from '../CircleDot';\nimport { createStyles } from '@material-ui/core';\n\nimport WalletIcon from '../../assets/wallet.svg';\n\nconst styles = createStyles({\n container: {\n padding: `${md} 12px`,\n },\n identicon: {\n margin: `${md} 0`,\n },\n user: {\n borderRadius: '3px',\n backgroundColor: background,\n margin: '0 auto',\n padding: '9px',\n lineHeight: 1,\n },\n details: {\n padding: `0 ${md}`,\n height: '20px',\n alignItems: 'center',\n },\n address: {\n flexGGrid: 1,\n textAlign: 'center',\n letterSpacing: '-0.5px',\n marginRight: sm,\n },\n labels: {\n fontSize: '12px',\n letterSpacing: '0.5px',\n },\n open: {\n paddingLeft: sm,\n width: 'auto',\n '&:hover': {\n cursor: 'pointer',\n },\n },\n disconnect: {\n padding: `${md} ${lg}`,\n '& button': {\n background: '#f02525',\n },\n },\n disconnectText: {\n letterSpacing: '1px',\n },\n logo: {\n margin: `0px ${xs}`,\n },\n dot: {\n marginRight: xs,\n height: '15px',\n width: '15px',\n },\n warning: {\n color: warning,\n },\n connected: {\n color: connectedBg,\n },\n});\n\ntype Props = {\n connected: boolean;\n networkId: number;\n onDisconnect: () => void;\n openDashboard?: () => void | null;\n providerName?: string;\n userAddress: string;\n};\n\nconst useStyles = makeStyles(styles);\n\nexport const UserDetails = ({\n connected,\n networkId,\n onDisconnect,\n providerName = 'UNKNOWN',\n userAddress,\n}: Props): React.ReactElement => {\n const status = connected ? 'Connected' : 'Connection error';\n // const color = connected ? 'primary' : 'warning';\n\n const classes = useStyles();\n\n return (\n <>\n \n {connected ? (\n \n ) : (\n \n )}\n
{userAddress ? textShortener(userAddress, 6, 4) : 'Address not available'}
\n
\n \n \n Status\n \n \n {status}\n \n \n \n Wallet\n \n \"Wallet\n {upperFirst(providerName)}\n \n \n \n Network\n \n \n {upperFirst(ETHEREUM_NETWORK_TO_ID[networkId])}\n \n \n \n \n \n \n );\n};\n","import { makeStyles } from '@material-ui/core/styles';\nimport { ReactElement } from 'react';\nimport Typography from '@material-ui/core/Typography';\n\nimport { border, md, screenSm, sm, xs, fontColor } from 'src/styles/variables';\nimport { ETHEREUM_NETWORK_TO_ID } from 'src/api/provider';\nimport { upperFirst } from 'src/utils/strings';\n\nconst useStyles = makeStyles({\n container: {\n flexGrow: 0,\n padding: `0 ${sm}`,\n [`@media (min-width: ${screenSm}px)`]: {\n paddingLeft: md,\n paddingRight: md,\n },\n },\n text: {\n backgroundColor: border,\n color: fontColor,\n borderRadius: '3px',\n lineHeight: 'normal',\n margin: '0',\n padding: `${xs} ${sm}`,\n\n [`@media (min-width: ${screenSm}px)`]: {\n marginLeft: '8px',\n },\n },\n});\n\ntype Props = {\n networkId: number;\n};\n\nconst NetworkLabel = ({ networkId }: Props): ReactElement => {\n const classes = useStyles();\n\n return (\n
\n \n {upperFirst(ETHEREUM_NETWORK_TO_ID[networkId])}\n \n
\n );\n};\n\nexport { NetworkLabel };\n","import { makeStyles } from '@material-ui/core/styles';\nimport { Grid, Typography } from '@material-ui/core';\n\nimport { Identicon } from 'src/components/Identicon';\nimport { textShortener } from 'src/utils/strings';\nimport { connected as connectedBg, screenSm } from 'src/styles/variables';\nimport { NetworkLabel } from '../NetworkLabel';\nimport { KeyRing } from 'src/components/Header/components/KeyRing';\n\nconst useStyles = makeStyles({\n identicon: {\n display: 'none',\n [`@media (min-width: ${screenSm}px)`]: {\n display: 'block',\n },\n },\n dot: {\n backgroundColor: '#fff',\n borderRadius: '15px',\n color: connectedBg,\n display: 'none',\n height: '15px',\n position: 'relative',\n right: '10px',\n top: '12px',\n width: '15px',\n [`@media (min-width: ${screenSm}px)`]: {\n display: 'block',\n },\n },\n address: {\n marginLeft: '5px',\n letterSpacing: '-0.5px',\n },\n icon: {\n marginRight: '8px',\n },\n});\n\ninterface ProviderInfoProps {\n connected: boolean;\n userAddress?: string;\n networkId: number;\n}\n\nconst ProviderInfo = ({ connected, userAddress, networkId }: ProviderInfoProps): React.ReactElement => {\n const classes = useStyles();\n\n return (\n <>\n {!connected && }\n \n \n {connected ? (\n {textShortener(userAddress || '', 6, 4)}\n ) : (\n Connection Error\n )}\n \n \n \n );\n};\n\nexport default ProviderInfo;\n","import { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport { sm } from 'src/styles/variables';\nimport { KeyRing } from 'src/components/Header/components/KeyRing';\n\nconst useStyles = makeStyles({\n network: {\n fontWeight: 800,\n },\n account: {\n alignItems: 'start',\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n justifyContent: 'center',\n paddingRight: sm,\n },\n connect: {\n letterSpacing: '-0.5px',\n whiteSpace: 'nowrap',\n },\n});\n\nconst ProviderDisconnected = (): React.ReactElement => {\n const classes = useStyles();\n\n return (\n <>\n \n
\n \n Not Connected\n \n \n Connect Wallet\n \n
\n \n );\n};\n\nexport default ProviderDisconnected;\n","import React from 'react';\n\nimport { useProviderStore } from 'src/stores/provider';\nimport Layout from './components/Layout';\nimport ConnectDetails from './components/ProviderDetailsDropdown/ConnectDetails';\nimport { UserDetails } from './components/ProviderDetailsDropdown/UserDetails';\nimport ProviderAccessible from './components/ProviderInfo/ProviderAccessible';\nimport ProviderDisconnected from './components/ProviderInfo/ProviderDisconnected';\n\nconst HeaderComponent = (): React.ReactElement => {\n const userAddress = useProviderStore((state) => state.account);\n const loaded = useProviderStore((state) => state.loaded);\n const networkId = useProviderStore((state) => state.networkId);\n const disconnectFromProvider = useProviderStore((state) => state.disconnect);\n\n if (!loaded) {\n return } dropdownContent={} />;\n }\n\n return (\n }\n dropdownContent={\n \n }\n />\n );\n};\n\nexport default HeaderComponent;\n","import styled from 'styled-components';\nimport { fade } from '@material-ui/core/styles/colorManipulator';\n\nconst StyledCard = styled.div`\n box-shadow: 1px 2px 10px 0 ${({ theme }) => fade(theme.colors.shadow.color, 0.18)};\n border-radius: 8px;\n padding: 24px;\n background-color: ${({ theme }) => theme.colors.white};\n position: relative;\n`;\n\nconst DisabledOverlay = styled.div`\n opacity: 0.5;\n position: absolute;\n height: 100%;\n width: 100%;\n background-color: ${({ theme }) => theme.colors.white};\n z-index: 1;\n top: 0;\n left: 0;\n border-radius: 8px;\n transition: opacity 0.2s;\n`;\n\ntype Props = {\n className?: string;\n disabled?: boolean;\n} & React.HTMLAttributes;\n\nconst Card: React.FC = ({ className, children, disabled, ...rest }) => (\n \n {disabled && }\n {children}\n \n);\n\nexport { Card };\n","import styled from 'styled-components';\nimport { ThemeColors } from '../styles/styled-theme';\n\ntype Props = {\n className?: string;\n color: ThemeColors;\n children: React.ReactNode;\n};\n\nconst StyledDot = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n height: 36px;\n width: 36px;\n background-color: ${({ theme, color }) => theme.colors[color]};\n`;\n\nconst Dot = ({ children, ...rest }: Props): React.ReactElement => {children};\n\nexport { Dot };\n","const getFromLocalStorage = (key: string): T | null => {\n const item = window.localStorage.getItem(key);\n\n if (item != null) {\n return JSON.parse(item);\n }\n\n return null;\n};\n\nconst saveToStorage = (key: string, value: unknown): void => window.localStorage.setItem(key, JSON.stringify(value));\n\nexport { getFromLocalStorage, saveToStorage };\n","import create from 'zustand';\nimport { ETHEREUM_NETWORK_TO_ID } from 'src/api/provider';\nimport { getFromLocalStorage, saveToStorage } from 'src/utils/localStorage';\n\ntype ContractNames = 'fallbackHandler' | 'proxyFactory' | 'masterCopy' | 'multiSend';\ntype DeployedContracts = Record;\n\ntype ContractsMap = Record;\n\ntype ContractsState = {\n contracts: ContractsMap;\n saveContracts: (networkId: ETHEREUM_NETWORK_TO_ID, deployedContracts: DeployedContracts) => void;\n};\n\nconst CONTRACTS_STORE_KEY = 'contracts_state_v1';\n\nconst useContractsStore = create((set, get) => ({\n contracts: getFromLocalStorage(CONTRACTS_STORE_KEY) || {},\n saveContracts(networkId: ETHEREUM_NETWORK_TO_ID, deployedContracts: DeployedContracts) {\n const { contracts } = get();\n\n const newContracts = { ...contracts, [networkId]: deployedContracts };\n saveToStorage(CONTRACTS_STORE_KEY, newContracts);\n\n return set({ contracts: newContracts });\n },\n}));\n\nexport { useContractsStore };\n","import GnosisSafeSol from '@gnosis.pm/safe-contracts/build/contracts/GnosisSafe.json';\nimport MultiSendSol from '@gnosis.pm/safe-contracts/build/contracts/MultiSend.json';\nimport ProxyFactorySol from '@gnosis.pm/safe-contracts/build/contracts/GnosisSafeProxyFactory.json';\nimport FallbackHandlerSol from '@gnosis.pm/safe-contracts/build/contracts/FallbackManager.json';\nimport { JsonRpcSigner } from '@ethersproject/providers';\nimport { Contract, ContractFactory } from 'ethers';\nimport { GnosisSafe, GnosisSafeProxyFactory, MultiSend, MasterCopy, FallbackManager } from 'src/types/contracts';\n\nconst getProxyFactoryContract = (address: string, signer: JsonRpcSigner): GnosisSafeProxyFactory =>\n new Contract(address, ProxyFactorySol.abi, signer) as GnosisSafeProxyFactory;\n\nconst getSafeContract = (address: string, signer: JsonRpcSigner): GnosisSafe =>\n new Contract(address, GnosisSafeSol.abi, signer) as GnosisSafe;\n\nconst getMultiSendContract = (address: string, signer: JsonRpcSigner): MultiSend =>\n new Contract(address, MultiSendSol.abi, signer) as MultiSend;\n\nconst deployMasterCopy = async (signer: JsonRpcSigner): Promise => {\n const factory = new ContractFactory(GnosisSafeSol.abi, GnosisSafeSol.bytecode, signer);\n const masterCopy = await factory.deploy();\n\n return masterCopy as MasterCopy;\n};\n\nconst deployProxyFactory = async (signer: JsonRpcSigner): Promise => {\n const factory = new ContractFactory(ProxyFactorySol.abi, ProxyFactorySol.bytecode, signer);\n const proxyFactory = await factory.deploy();\n\n return proxyFactory as GnosisSafeProxyFactory;\n};\n\nconst deployFallbackHandler = async (signer: JsonRpcSigner): Promise => {\n const factory = new ContractFactory(FallbackHandlerSol.abi, FallbackHandlerSol.bytecode, signer);\n const fallbackHandler = await factory.deploy();\n\n return fallbackHandler as FallbackManager;\n};\n\nconst deployMultiSend = async (signer: JsonRpcSigner): Promise => {\n const factory = new ContractFactory(MultiSendSol.abi, MultiSendSol.bytecode, signer);\n const multiSend = await factory.deploy();\n\n return multiSend as MultiSend;\n};\n\nexport {\n deployProxyFactory,\n deployFallbackHandler,\n deployMasterCopy,\n getSafeContract,\n getProxyFactoryContract,\n getMultiSendContract,\n deployMultiSend,\n};\n","import React from 'react';\nimport { useHistory } from 'react-router-dom';\nimport Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\nimport Button from '@material-ui/core/Button';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { lg, md } from 'src/styles/variables';\nimport { Card } from 'src/components/Card';\nimport { Dot } from 'src/components/Dot';\nimport { useProviderStore } from 'src/stores/provider';\nimport { useContractsStore } from 'src/stores/contracts';\nimport { ConnectButton } from 'src/components/ConnectButton';\nimport { deployFallbackHandler, deployProxyFactory, deployMasterCopy, deployMultiSend } from 'src/api/safeContracts';\nimport { getSafeContract, getProxyFactoryContract } from 'src/api/safeContracts';\nimport { ZERO_ADDRESS, EMPTY_DATA } from 'src/utils/strings';\n\nconst useStyles = makeStyles({\n pageContainer: {\n padding: `0 ${md}`,\n },\n heading: {\n margin: `${lg} 0`,\n },\n stepsContainer: {\n marginTop: md,\n },\n interfaceDescription: {\n fontWeight: 400,\n },\n stepCard: {\n height: 276,\n display: 'flex',\n flexDirection: 'column',\n },\n btn: {\n marginTop: 'auto',\n },\n dot: {\n marginRight: md,\n '& > h5': {\n color: '#fff',\n fontWeight: 400,\n },\n },\n cardTitle: {\n marginBottom: md,\n },\n});\n\nconst WelcomePage = (): React.ReactElement => {\n const classes = useStyles();\n const [safeDeploying, setSafeDeploying] = React.useState(false);\n const [providerLoaded, networkId, signer, account] = useProviderStore((state) => [\n state.loaded,\n state.networkId,\n state.signer,\n state.account,\n ]);\n const [contracts, saveContracts] = useContractsStore(\n React.useCallback((state) => [state.contracts[networkId], state.saveContracts], [networkId]),\n );\n const history = useHistory();\n\n const deployContracts = React.useCallback(async (): Promise => {\n if (signer) {\n const [proxyFactory, fallbackHandler, masterCopy, multiSend] = await Promise.all([\n deployProxyFactory(signer),\n deployFallbackHandler(signer),\n deployMasterCopy(signer),\n deployMultiSend(signer),\n ]);\n console.info('Deployed contracts: ', { proxyFactory, fallbackHandler, masterCopy, multiSend });\n\n saveContracts(networkId, {\n fallbackHandler: fallbackHandler.address,\n proxyFactory: proxyFactory.address,\n masterCopy: masterCopy.address,\n multiSend: multiSend.address,\n });\n }\n }, [networkId, saveContracts, signer]);\n\n const deploySafe = React.useCallback(async () => {\n if (signer) {\n setSafeDeploying(true);\n\n try {\n const safeContract = getSafeContract(contracts.masterCopy, signer);\n const proxyFactory = getProxyFactoryContract(contracts.proxyFactory, signer);\n\n const owners = [account];\n const setupData = safeContract.interface.encodeFunctionData('setup', [\n owners,\n 1,\n ZERO_ADDRESS,\n EMPTY_DATA,\n contracts.fallbackHandler,\n ZERO_ADDRESS,\n 0,\n ZERO_ADDRESS,\n ]);\n\n const tx = await proxyFactory\n .createProxyWithNonce(contracts.masterCopy, setupData, Date.now())\n .then((tx) => tx.wait(1));\n const safeAddr = tx.events?.[0]?.args?.[0];\n\n if (safeAddr) {\n history.push(`/safes/${safeAddr}`);\n }\n } catch (err) {\n console.error(err);\n } finally {\n setSafeDeploying(false);\n }\n }\n }, [account, contracts, signer, history]);\n\n return (\n \n \n \n Welcome to Gnosis Safe Multisig Developer Interface.\n \n \n Developer Interface is an interface without dependencies on Gnosis infrastructure, where you can deploy Safe\n Contracts on any network. Here is how to get started:\n \n \n \n \n \n \n \n {providerLoaded ? '✔' : 1}\n \n Connect a wallet\n \n \n Gnosis Safe Multisig supports a wide range of wallets that you can choose to be one of the authentication\n factors.\n \n \n \n \n \n \n \n \n {contracts ? '✔' : 2}\n \n Deploy contracts\n \n \n Because the interface doesn't depend on Gnosis infrastructure, you need to deploy the master copy and\n proxy factory yourself.\n \n \n \n \n \n \n \n \n 3\n \n Create Safe\n \n \n Create\n \n \n \n \n \n );\n};\n\nexport { WelcomePage };\n","import { ethers } from 'ethers';\n\nconst getEthBalance = async (provider: ethers.providers.BaseProvider, address: string): Promise => {\n const balance = provider.getBalance(address);\n\n return balance;\n};\n\nexport { getEthBalance };\n","import React from 'react';\nimport { ethers } from 'ethers';\nimport { getEthBalance } from 'src/api/eth';\nimport { useProviderStore } from 'src/stores/provider';\n\nconst useEthBalance = (address: string, poll = false): ethers.BigNumber => {\n const [balance, setBalance] = React.useState(ethers.BigNumber.from(0));\n const signer = useProviderStore((state) => state.signer);\n\n React.useEffect(() => {\n let interval: NodeJS.Timeout;\n const loadBalance = async (signer: ethers.providers.JsonRpcSigner, address: string) => {\n const bal = await getEthBalance(signer.provider, address);\n\n // calling setBalance triggers a re-render\n if (!balance.eq(bal)) {\n setBalance(bal);\n }\n };\n\n if (signer) {\n loadBalance(signer, address);\n\n if (poll) {\n interval = setInterval(() => {\n loadBalance(signer, address);\n }, 2000);\n }\n }\n\n return () => {\n clearInterval(interval);\n };\n }, [signer, address, poll, balance]);\n\n return balance;\n};\n\nexport { useEthBalance };\n","import React from 'react';\nimport styled from 'styled-components';\nimport { secondaryBackground, xs } from 'src/styles/variables';\n\nconst Box = styled.p`\n background: ${secondaryBackground};\n padding: ${xs};\n border-radius: 5px;\n width: fit-content;\n\n span {\n font-weight: bold;\n }\n`;\n\ntype Props = {\n balance: string;\n symbol?: string;\n};\n\nconst BalanceBox = ({ balance, symbol = 'ETH' }: Props): React.ReactElement => (\n \n Balance:{' '}\n \n {balance} {symbol}\n \n \n);\n\nexport { BalanceBox };\n","export default __webpack_public_path__ + \"static/media/copy.18fe083f.svg\";","import React from 'react';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport CopyIcon from './copy.svg';\n\nimport { Img } from 'src/components/Layout/Img';\nimport { xs } from 'src/styles/variables';\nimport { copyToClipboard } from 'src/utils/clipboard';\n\nconst useStyles = makeStyles({\n container: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'pointer',\n margin: `0 ${xs}`,\n borderRadius: '50%',\n transition: 'background-color .2s ease-in-out',\n '&:hover': {\n backgroundColor: '#F0EFEE',\n },\n },\n increasedPopperZindex: {\n zIndex: 2001,\n },\n});\n\ninterface CopyBtnProps {\n className?: string;\n content: string;\n increaseZIndex?: boolean;\n}\n\nconst CopyBtn = ({ className = '', content, increaseZIndex = false }: CopyBtnProps): React.ReactElement => {\n const [clicked, setClicked] = React.useState(false);\n const classes = useStyles();\n const customClasses = increaseZIndex ? { popper: classes.increasedPopperZindex } : {};\n\n return (\n {\n // this is fired before tooltip is closed\n // added setTimeout so the user doesn't see the text changing/jumping\n setTimeout(() => {\n if (clicked) {\n setClicked(false);\n }\n }, 300);\n }}\n placement=\"top\"\n title={clicked ? 'Copied' : 'Copy to clipboard'}\n >\n
\n {\n event.stopPropagation();\n copyToClipboard(content);\n setClicked(true);\n }}\n src={CopyIcon}\n />\n
\n \n );\n};\n\nexport { CopyBtn };\n","const copyToClipboard = (text: string): void => {\n const range = document.createRange();\n range.selectNodeContents(document.body);\n document?.getSelection()?.addRange(range);\n\n function listener(e: ClipboardEvent) {\n e.clipboardData?.setData('text/plain', text);\n e.preventDefault();\n }\n document.addEventListener('copy', listener);\n document.execCommand('copy');\n document.removeEventListener('copy', listener);\n\n document?.getSelection()?.removeAllRanges();\n};\n\nexport { copyToClipboard };\n","import React from 'react';\nimport { ethers } from 'ethers';\nimport styled from 'styled-components';\nimport Grid from '@material-ui/core/Grid';\nimport { Identicon } from 'src/components/Identicon';\nimport { textShortener } from 'src/utils/strings';\nimport { useEthBalance } from 'src/hooks/useEthBalance';\nimport { BalanceBox } from '../BalanceBox';\nimport { CopyBtn } from '../CopyBtn';\n\ntype Props = {\n network: string;\n safeAddress: string;\n};\n\nconst Container = styled.div`\n display: flex;\n align-items: center;\n flex-direction: column;\n\n & > * {\n margin-top: 0.5rem;\n }\n`;\n\nconst SafeHeader = ({ network, safeAddress }: Props): React.ReactElement => {\n const etherBalance = useEthBalance(safeAddress, true);\n\n return (\n \n

{network}

\n \n \n

{textShortener(safeAddress, 6, 4)}

\n \n
\n \n
\n );\n};\n\nexport { SafeHeader };\n","export default __webpack_public_path__ + \"static/media/apps.e0e38444.svg\";","import React from 'react';\nimport { useParams, NavLink, NavLinkProps, useRouteMatch } from 'react-router-dom';\nimport styled from 'styled-components';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { ETHEREUM_NETWORK_TO_ID } from 'src/api/provider';\nimport { useProviderStore } from 'src/stores/provider';\nimport { upperFirst } from 'src/utils/strings';\nimport { connected, headerHeight, sm } from 'src/styles/variables';\nimport { SafeHeader } from './SafeHeader';\nimport AppsIcon from './apps.svg';\n\nconst SidebarContainer = styled.aside`\n width: 200px;\n height: calc(100vh - ${headerHeight});\n background-color: white;\n border-right: ${(props) => `2px solid ${props.theme.colors.separator}`};\n padding: ${sm};\n\n display: flex;\n flex-direction: column;\n`;\n\nconst Line = styled.hr`\n width: 100%;\n background-color: ${(props) => props.theme.colors.separator};\n height: 2px;\n border: none;\n`;\n\ninterface ListItemLinkProps {\n icon?: React.ReactElement;\n primary: string;\n to: string;\n}\n\n// https://material-ui.com/ru/guides/composition/#list\nconst ListItemLink = (props: ListItemLinkProps): React.ReactElement => {\n const { icon, primary, to } = props;\n\n const renderLink = React.useMemo(\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n React.forwardRef>((itemProps, ref) => (\n \n )),\n [to],\n );\n\n return (\n
  • \n \n {icon && {icon}}\n \n \n
  • \n );\n};\n\nconst Sidebar = (): React.ReactElement => {\n const networkId = useProviderStore((state) => state.networkId);\n const params = useParams<{ safeAddress: string }>();\n const { url } = useRouteMatch();\n\n return (\n \n \n \n \n }\n />\n \n \n );\n};\n\nexport { Sidebar };\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst fetchJSON = (url: RequestInfo, opts?: RequestInit): Promise => fetch(url, opts).then((resp) => resp.json());\n\nexport { fetchJSON };\n","import { EMPTY_DATA } from 'src/utils/strings';\n\nconst getPreValidatedSignature = (from: string, startStr: string = EMPTY_DATA): string => {\n return `${startStr}000000000000000000000000${from.replace(\n EMPTY_DATA,\n '',\n )}000000000000000000000000000000000000000000000000000000000000000001`;\n};\n\nexport { getPreValidatedSignature };\n","import { ethers } from 'ethers';\nimport { getSafeContract } from './safeContracts';\n\nconst getSafeNonce = async (signer: ethers.providers.JsonRpcSigner, safeAddress: string): Promise => {\n const safe = getSafeContract(safeAddress, signer);\n const nonce = await safe.nonce();\n\n return nonce;\n};\n\nexport { getSafeNonce };\n","import { ZERO_ADDRESS } from 'src/utils/strings';\nimport { SignedProposedTx } from './../types/transaction';\nimport { Transaction } from '@gnosis.pm/safe-apps-sdk';\nimport { ethers } from 'ethers';\nimport { getSafeContract, getMultiSendContract } from 'src/api/safeContracts';\nimport { ProposedTx, CreateTransactionArgs } from 'src/types/transaction';\nimport { getPreValidatedSignature } from './signatures';\nimport { getSafeNonce } from './safe';\n\nconst CALL = 0;\nconst DELEGATE_CALL = 1;\n\nconst executeTransaction = async (\n signer: ethers.providers.JsonRpcSigner,\n safeAddress: string,\n { baseGas, data, gasPrice, gasToken, operation, refundReceiver, safeTxGas, to, valueInWei, sigs }: SignedProposedTx,\n): Promise => {\n const safeInstance = getSafeContract(safeAddress, signer);\n const execution = await safeInstance.execTransaction(\n to,\n valueInWei,\n data,\n operation,\n safeTxGas,\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n sigs,\n );\n\n return execution;\n};\n\nconst getTransactionHash = async (\n signer: ethers.providers.JsonRpcSigner,\n safeAddress: string,\n {\n baseGas,\n data,\n gasPrice,\n gasToken,\n nonce,\n operation,\n refundReceiver,\n safeTxGas,\n to,\n valueInWei,\n }: ProposedTx & { nonce: ethers.BigNumberish },\n): Promise => {\n const safeInstance = getSafeContract(safeAddress, signer);\n\n const txHash = await safeInstance.getTransactionHash(\n to,\n valueInWei,\n data,\n operation,\n safeTxGas,\n baseGas,\n gasPrice,\n gasToken,\n refundReceiver,\n nonce,\n );\n\n return txHash;\n};\n\nconst createTransaction = async (\n signer: ethers.providers.JsonRpcSigner,\n safeAddress: string,\n sender: string,\n {\n baseGas = 0,\n data,\n gasPrice = 0,\n gasToken = ZERO_ADDRESS,\n operation = CALL,\n refundReceiver = ZERO_ADDRESS,\n safeTxGas = 0,\n to,\n valueInWei,\n }: CreateTransactionArgs,\n): Promise<{ safeTxHash: string; tx: ethers.ContractTransaction }> => {\n const senderSignature = getPreValidatedSignature(sender);\n const safeNonce = await getSafeNonce(signer, safeAddress);\n\n const tx = {\n baseGas,\n data,\n gasPrice,\n gasToken,\n operation,\n refundReceiver,\n safeTxGas,\n nonce: safeNonce,\n to,\n valueInWei,\n sigs: senderSignature,\n };\n\n const safeTxHash = await getTransactionHash(signer, safeAddress, tx);\n const executedTx = await executeTransaction(signer, safeAddress, tx);\n\n return { safeTxHash, tx: executedTx };\n};\n\nconst encodeMultiSendCall = (\n signer: ethers.providers.JsonRpcSigner,\n multiSendAddress: string,\n txs: Transaction[],\n): string => {\n const multiSend = getMultiSendContract(multiSendAddress, signer);\n\n const joinedTxs = txs\n .map((tx) => {\n const data = ethers.utils.arrayify(tx.data);\n const encoded = ethers.utils.solidityPack(\n ['uint8', 'address', 'uint256', 'uint256', 'bytes'],\n [0, tx.to, tx.value, data.length, data],\n );\n return encoded.slice(2);\n })\n .join('');\n\n const encodedMultiSendCallData = multiSend.interface.encodeFunctionData('multiSend', [`0x${joinedTxs}`]);\n\n return encodedMultiSendCallData;\n};\n\nexport { CALL, DELEGATE_CALL, encodeMultiSendCall, getTransactionHash, createTransaction };\n","import React from 'react';\nimport MuiModal, { ModalProps } from '@material-ui/core/Modal';\nimport Backdrop from '@material-ui/core/Backdrop';\nimport { useSpring, animated } from 'react-spring';\n\ninterface FadeProps {\n children?: React.ReactElement;\n in: boolean;\n onEnter?: () => void;\n onExited?: () => void;\n}\n\nconst Fade = React.forwardRef(function Fade(props, ref) {\n const { in: open, children, onEnter, onExited, ...other } = props;\n const style = useSpring({\n from: { opacity: 0 },\n to: { opacity: open ? 1 : 0 },\n onStart: () => {\n if (open && onEnter) {\n onEnter();\n }\n },\n onRest: () => {\n if (!open && onExited) {\n onExited();\n }\n },\n });\n\n return (\n \n {children}\n \n );\n});\n\nconst Modal = ({ children, open, ...props }: ModalProps): React.ReactElement => (\n \n {children}\n \n);\n\nexport { Modal };\n","export default __webpack_public_path__ + \"static/media/arrow-down.055702ca.svg\";","import React from 'react';\nimport styled from 'styled-components';\n\nimport ArrowDown from './arrow-down.svg';\n\nimport { md, sm, border } from 'src/styles/variables';\n\nconst Wrapper = styled.div<{ noMargin: boolean }>`\n display: flex;\n align-items: center;\n margin: ${(props) => (props.noMargin ? 0 : `${md} 0`)};\n\n img {\n margin: 0 ${sm};\n }\n\n hr {\n width: 100%;\n min-height: 2px;\n height: 2px;\n background-color: ${border};\n margin: 0;\n }\n`;\n\ntype Props = {\n withArrow?: boolean;\n noMargin?: boolean;\n};\n\nconst DividerLine = ({ withArrow, noMargin = false }: Props): React.ReactElement => (\n \n {withArrow && \"Arrow}\n
    \n
    \n);\n\nexport { DividerLine };\n","export default __webpack_public_path__ + \"static/media/icon-code.8e767ee3.svg\";","export default __webpack_public_path__ + \"static/media/icon-arrow.e72eb472.svg\";","import React from 'react';\nimport styled from 'styled-components';\nimport Typography from '@material-ui/core/Typography';\nimport IconButton from '@material-ui/core/IconButton';\nimport { ModalProps } from '@material-ui/core/Modal';\nimport CloseIcon from '@material-ui/icons/Close';\n\nconst AppNameContainer = styled.div`\n display: flex;\n align-items: center;\n padding: 0.3rem 1rem;\n\n img:first-child,\n button:first-child {\n margin-right: 0.5rem;\n }\n\n h2 {\n font-weight: 400;\n margin-right: auto;\n }\n`;\n\ntype Props = {\n icon?: React.ReactNode;\n heading: string;\n} & Pick;\n\nconst ModalHeader = ({ icon, heading, onClose }: Props): React.ReactElement => (\n \n {icon}\n \n {heading}\n \n {\n onClose?.(e, 'escapeKeyDown');\n }}\n >\n \n \n \n);\n\n// const ModalHeading = ({ app, onClose }: Props): React.ReactElement => (\n// \n// {`${app.name}\n// \n// {app.name}\n// \n// {\n// onClose?.(e, 'escapeKeyDown');\n// }}\n// >\n// \n// \n// \n// );\n\nexport { ModalHeader };\n","import Grid from '@material-ui/core/Grid';\nimport styled from 'styled-components';\nimport { ethers } from 'ethers';\nimport { BalanceBox } from 'src/components/BalanceBox';\nimport { Identicon } from 'src/components/Identicon';\nimport { CopyBtn } from 'src/components/CopyBtn';\n\ntype Props = {\n safeAddress: string;\n ethBalanceWei: ethers.BigNumberish;\n};\n\nconst SafeContainer = styled.div`\n display: flex;\n align-items: center;\n\n & > img {\n margin-right: 0.5rem;\n }\n\n p + p {\n margin-top: 0.5rem;\n }\n`;\n\nconst SafeDetails = ({ safeAddress, ethBalanceWei }: Props): React.ReactElement => (\n \n \n \n \n

    {safeAddress}

    \n \n
    \n \n
    \n
    \n);\n\nexport { SafeDetails };\n","import Typography from '@material-ui/core/Typography';\nimport Grid from '@material-ui/core/Grid';\nimport { makeStyles, createStyles } from '@material-ui/core/styles';\nimport { ethers } from 'ethers';\nimport { CopyBtn } from 'src/components/CopyBtn';\nimport { Identicon } from 'src/components/Identicon';\nimport { sm, md, xs, disabled } from 'src/styles/variables';\n\ntype Props = {\n txRecipient: string;\n txData: string;\n txValue: string;\n};\n\nconst useStyles = makeStyles(() =>\n createStyles({\n txInfoHeading: {\n color: disabled,\n marginBottom: xs,\n '&:not(:first-child)': {\n marginTop: md,\n },\n },\n identicon: {\n marginRight: sm,\n },\n }),\n);\n\nconst TransactionDetails = ({ txData, txRecipient, txValue }: Props): React.ReactElement => {\n const classes = useStyles();\n\n return (\n
    \n \n Recipient\n \n \n \n

    {txRecipient}

    \n \n
    \n \n Value\n \n

    {txValue} ETH

    \n \n Data (hex encoded)\n \n \n

    {ethers.utils.arrayify(txData).length} bytes

    \n \n
    \n
    \n );\n};\n\nexport { TransactionDetails };\n","import React from 'react';\nimport styled from 'styled-components';\nimport { ethers } from 'ethers';\nimport { SendTransactionParams, Transaction } from '@gnosis.pm/safe-apps-sdk';\nimport { makeStyles, Theme, createStyles } from '@material-ui/core/styles';\nimport Backdrop from '@material-ui/core/Backdrop';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { ModalProps } from '@material-ui/core/Modal';\nimport { Button, IconButton } from '@material-ui/core';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\nimport { createTransaction } from 'src/api/transactions';\nimport { Modal } from 'src/components/Modal';\nimport { SafeApp } from 'src/types/apps';\nimport { useEthBalance } from 'src/hooks/useEthBalance';\nimport { DividerLine } from 'src/components/DividerLine';\nimport { encodeMultiSendCall, CALL, DELEGATE_CALL } from 'src/api/transactions';\nimport { useContractsStore } from 'src/stores/contracts';\nimport { useProviderStore } from 'src/stores/provider';\nimport { md, lg, border, sm } from 'src/styles/variables';\nimport { Img } from 'src/components/Layout/Img';\nimport CodeIcon from 'src/assets/icons/icon-code.svg';\nimport ArrowIcon from 'src/assets/icons/icon-arrow.svg';\nimport { ModalHeader } from './ModalHeader';\nimport { SafeDetails } from './SafeDetails';\nimport { TransactionDetails } from './TransactionDetails';\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n modal: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n paper: {\n borderRadius: 8,\n backgroundColor: theme.palette.background.paper,\n boxShadow: theme.shadows[5],\n width: 500,\n },\n transactionBtnContainer: {\n width: '100%',\n borderTop: `${border} 2px solid`,\n padding: `${md} ${lg}`,\n '& > h6': {\n marginRight: 'auto',\n },\n },\n }),\n);\n\nconst Content = styled.div`\n padding: ${md} ${lg};\n`;\n\nconst ButtonContainer = styled.div`\n display: flex;\n width: 100%;\n justify-content: space-around;\n\n padding: 1rem 0;\n`;\n\ntype Props = Omit & {\n txs: Transaction[];\n app: SafeApp;\n params?: SendTransactionParams;\n safeAddress: string;\n onUserConfirm?: (safeTxHash: string) => void;\n onUserReject?: () => void;\n};\n\nconst TransactionModal = ({\n open,\n onClose,\n app,\n safeAddress,\n txs,\n params,\n onUserConfirm,\n onUserReject,\n}: Props): React.ReactElement => {\n const classes = useStyles();\n const ethBalance = useEthBalance(safeAddress, true);\n const isMultiSend = txs.length > 1;\n const [signer, networkId, userAddress] = useProviderStore((state) => [\n state.signer as ethers.providers.JsonRpcSigner,\n state.networkId,\n state.account,\n ]);\n const multiSendAddress = useContractsStore((state) => state.contracts[networkId].multiSend);\n const [openedTransaction, setOpenedTransaction] = React.useState(null);\n\n const txRecipient = React.useMemo(\n () => (isMultiSend ? multiSendAddress : txs[0]?.to),\n [txs, isMultiSend, multiSendAddress],\n );\n const txData = React.useMemo(\n () => (isMultiSend ? encodeMultiSendCall(signer, multiSendAddress, txs) : txs[0]?.data),\n [txs, isMultiSend, signer, multiSendAddress],\n );\n const txValue = React.useMemo(\n () => (isMultiSend ? '0' : ethers.BigNumber.from(txs[0]?.value || 0).toString()),\n [txs, isMultiSend],\n );\n const operation = isMultiSend ? DELEGATE_CALL : CALL;\n\n if (!txRecipient || !txData || !txValue) {\n return
    ;\n }\n\n let header = (\n }\n heading={app.name}\n onClose={onClose}\n />\n );\n let content = (\n <>\n \n \n \n \n \n {txs.length > 1 &&\n txs.map((tx, index) => (\n setOpenedTransaction(tx)}\n onKeyDown={(e) => {\n if (e.key === ' ' || e.key === 'Enter' || e.key === 'Spacebar') {\n setOpenedTransaction(tx);\n }\n }}\n tabIndex={0}\n >\n \"Code\n Transaction {index}\n \"Arrow\n \n ))}\n \n \n {\n onClose?.(e, 'escapeKeyDown');\n\n onUserReject?.();\n }}\n variant=\"contained\"\n color=\"secondary\"\n >\n Cancel\n \n {\n try {\n const { safeTxHash } = await createTransaction(signer, safeAddress, userAddress, {\n to: txRecipient,\n data: txData,\n valueInWei: txValue,\n operation,\n safeTxGas: params?.safeTxGas ?? 0,\n });\n\n onClose?.(e, 'escapeKeyDown');\n onUserConfirm?.(safeTxHash);\n } catch (err) {\n onClose?.(e, 'escapeKeyDown');\n onUserReject?.();\n }\n }}\n variant=\"contained\"\n color=\"primary\"\n >\n Confirm\n \n \n \n );\n\n if (openedTransaction) {\n header = (\n setOpenedTransaction(null)}>\n \n \n }\n heading=\"Transaction\"\n onClose={onClose}\n />\n );\n content = (\n \n \n \n );\n }\n\n return (\n \n
    \n {header}\n \n {content}\n
    \n \n );\n};\n\nexport { TransactionModal };\n","import { MutableRefObject, useEffect, useState } from 'react';\nimport {\n getSDKVersion,\n SDKMessageEvent,\n MethodToResponse,\n Methods,\n ErrorResponse,\n MessageFormatter,\n METHODS,\n RequestId,\n} from '@gnosis.pm/safe-apps-sdk';\nimport { SafeApp } from 'src/types/apps';\n\ntype MessageHandler = (\n msg: SDKMessageEvent,\n) => void | MethodToResponse[Methods] | ErrorResponse | Promise;\n\nclass AppCommunicator {\n private iframeRef: MutableRefObject;\n private handlers = new Map();\n private app: SafeApp;\n\n constructor(iframeRef: MutableRefObject, app: SafeApp) {\n this.iframeRef = iframeRef;\n this.app = app;\n\n window.addEventListener('message', this.handleIncomingMessage);\n }\n\n on = (method: Methods, handler: MessageHandler): void => {\n this.handlers.set(method, handler);\n };\n\n private isValidMessage = (msg: SDKMessageEvent): boolean => {\n // @ts-expect-error .parent doesn't exist on some possible types\n const sentFromIframe = msg.source.parent === window.parent;\n const knownOrigin = this.app.url.includes(msg.origin);\n const knownMethod = Object.values(METHODS).includes(msg.data.method);\n\n return knownOrigin && sentFromIframe && knownMethod;\n };\n\n private canHandleMessage = (msg: SDKMessageEvent): boolean => {\n return Boolean(this.handlers.get(msg.data.method));\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n send = (data: any, requestId: RequestId, error = false): void => {\n const sdkVersion = getSDKVersion();\n const msg = error\n ? MessageFormatter.makeErrorResponse(requestId, data, sdkVersion)\n : MessageFormatter.makeResponse(requestId, data, sdkVersion);\n\n this.iframeRef.current?.contentWindow?.postMessage(msg, this.app.url);\n };\n\n handleIncomingMessage = async (msg: SDKMessageEvent): Promise => {\n const validMessage = this.isValidMessage(msg);\n const hasHandler = this.canHandleMessage(msg);\n\n if (validMessage && hasHandler) {\n const handler = this.handlers.get(msg.data.method);\n try {\n // @ts-expect-error Handler existence is checked in this.canHandleMessage\n const response = await handler(msg);\n\n // If response is not returned, it means the response will be send somewhere else\n if (typeof response !== 'undefined') {\n this.send(response, msg.data.id);\n }\n } catch (err) {\n console.log({ err });\n this.send(err.message, msg.data.id, true);\n }\n }\n };\n\n clear = (): void => {\n window.removeEventListener('message', this.handleIncomingMessage);\n };\n}\n\nconst useAppCommunicator = (\n iframeRef: MutableRefObject,\n app?: SafeApp,\n): AppCommunicator | undefined => {\n const [communicator, setCommunicator] = useState(undefined);\n useEffect(() => {\n let communicatorInstance: AppCommunicator | null = null;\n const initCommunicator = (iframeRef: MutableRefObject, app: SafeApp) => {\n communicatorInstance = new AppCommunicator(iframeRef, app);\n setCommunicator(communicatorInstance);\n };\n\n if (app) {\n initCommunicator(iframeRef as MutableRefObject, app);\n }\n\n return () => {\n communicatorInstance?.clear();\n };\n }, [app, iframeRef]);\n\n return communicator;\n};\n\nexport { useAppCommunicator };\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useRouteMatch } from 'react-router';\nimport {\n RequestId,\n RPCPayload,\n Transaction,\n SendTransactionsArgs,\n SendTransactionParams,\n} from '@gnosis.pm/safe-apps-sdk';\nimport { useProviderStore } from 'src/stores/provider';\nimport { TransactionModal } from 'src/components/pages/safes/apps/TransactionModal';\nimport { ETHEREUM_NETWORK_TO_ID } from 'src/api/provider';\nimport { SafeApp } from 'src/types/apps';\nimport { useAppCommunicator } from './communicator';\n\nconst SIframe = styled.iframe`\n border: none;\n width: 100%;\n height: 100%;\n`;\n\ntype ProposedTxs = {\n transactions: Transaction[];\n requestId: RequestId;\n params: SendTransactionParams;\n};\n\nconst AppIframe = ({ url, app }: { url: string; app: SafeApp }): React.ReactElement => {\n const iframeRef = React.useRef(null);\n const communicator = useAppCommunicator(iframeRef, app);\n const [proposedTxs, setProposedTxs] = React.useState(null);\n const [networkId, provider] = useProviderStore((state) => [state.networkId, state.provider]);\n const {\n params: { safeAddress },\n } = useRouteMatch<{ safeAddress: string }>();\n\n React.useEffect(() => {\n communicator?.on('getSafeInfo', () => ({\n safeAddress,\n network: ETHEREUM_NETWORK_TO_ID[networkId],\n }));\n\n communicator?.on('sendTransactions', (msg) => {\n const params = msg.data.params as SendTransactionsArgs;\n\n setProposedTxs({\n transactions: params.txs,\n params: params.params || { safeTxGas: 0 },\n requestId: msg.data.id,\n });\n });\n\n communicator?.on('rpcCall', async (msg) => {\n const params = msg.data.params as RPCPayload;\n\n try {\n if (provider) {\n const response = await provider.send(params.call, params.params);\n\n return response;\n }\n\n throw new Error('Provider unavailable');\n } catch (err) {\n return err;\n }\n });\n }, [communicator, safeAddress, networkId, provider]);\n\n return (\n <>\n ;\n setProposedTxs(null)}\n app={app}\n safeAddress={safeAddress}\n onUserConfirm={(safeTxHash) => communicator?.send({ safeTxHash }, proposedTxs?.requestId || '')}\n onUserReject={() => communicator?.send('Transaction rejected by user', proposedTxs?.requestId || '', true)}\n />\n \n );\n};\n\nexport { AppIframe };\n","import React from 'react';\nimport styled from 'styled-components';\nimport TextField from '@material-ui/core/TextField';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport { Typography } from '@material-ui/core';\n\nimport { md, sm } from 'src/styles/variables';\nimport { isValidURL, removeTrailingSlash } from 'src/utils/strings';\nimport { fetchJSON } from 'src/utils/fetch';\nimport { SafeApp } from 'src/types/apps';\nimport { AppIframe } from 'src/components/pages/safes/apps/AppIframe';\nimport { AppState, isAppManifestValid } from './utils';\n\nconst Content = styled.div`\n padding: ${md} ${sm};\n display: flex;\n flex-direction: column;\n height: 100%;\n`;\n\nconst AppFrame = styled(Card)`\n margin-top: 10px;\n flex-grow: 1;\n`;\n\nconst FrameContentCentered = styled(CardContent)`\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n flex-direction: column;\n`;\n\nconst FrameMessage = ({ state }: { state: AppState }): React.ReactElement | null => {\n if (state === AppState.loaded) {\n return null;\n }\n\n return (\n \n {state === AppState.notAsked && Enter Safe App URL ⬆️}\n {state === AppState.invalidUrl && ❌ Invalid URL}\n {state === AppState.invalidManifest && ❌ Invalid App Manifest}\n \n );\n};\n\nconst Apps = (): React.ReactElement => {\n const [appUrl, setAppUrl] = React.useState('');\n const [appState, setAppState] = React.useState(AppState.notAsked);\n const [safeApp, setSafeApp] = React.useState(null);\n\n React.useEffect(() => {\n if (appUrl === '' && (appState === AppState.invalidUrl || appState === AppState.invalidManifest)) {\n setAppState(AppState.notAsked);\n }\n }, [appState, appUrl]);\n\n const onUrlSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (isValidURL(appUrl)) {\n const url = removeTrailingSlash(appUrl);\n try {\n const manifest = await fetchJSON(`${url}/manifest.json`);\n\n if (!isAppManifestValid(manifest)) {\n setAppState(AppState.invalidManifest);\n return;\n }\n\n setAppState(AppState.loaded);\n setSafeApp({ ...manifest, url });\n } catch (err) {\n console.error(err);\n setAppState(AppState.failed);\n }\n } else {\n setAppState(AppState.invalidUrl);\n }\n };\n\n return (\n \n \n \n
    \n setAppUrl(e.target.value)}\n />\n \n
    \n
    \n \n \n {appState === AppState.loaded && safeApp && }\n \n
    \n );\n};\n\nexport default Apps;\n","import { Redirect, Route, Switch, useRouteMatch } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Sidebar } from 'src/components/Sidebar';\nimport Apps from './apps';\n\nconst PageContainer = styled.div`\n display: flex;\n`;\n\nconst Content = styled.main`\n flex-grow: 1;\n`;\n\nconst SafePage = (): React.ReactElement => {\n const { path, url } = useRouteMatch();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport { SafePage };\n","import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom';\nimport Header from 'src/components/Header';\nimport { WelcomePage } from './pages/Welcome';\nimport { SafePage } from './pages/safes';\n\nfunction App(): React.ReactElement {\n return (\n \n
    \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default App;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { ThemeProvider as StyledThemeProvider } from 'styled-components';\nimport { ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles';\nimport { theme as muiTheme } from 'src/styles/mui';\nimport { theme as styledTheme } from 'src/styles/styled-theme';\nimport GlobalStyle from 'src/styles/global';\nimport reportWebVitals from './reportWebVitals';\nimport App from './App';\nimport { getFromLocalStorage } from './utils/localStorage';\nimport { useProviderStore } from './stores/provider';\n\nif (getFromLocalStorage('WEB3_CONNECT_CACHED_PROVIDER')) {\n useProviderStore.getState().connectProvider();\n}\n\nReactDOM.render(\n \n \n \n \n \n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals(console.log);\n","const theme = {\n colors: {\n primary: '#008C73',\n primaryLight: '#A1D2CA',\n primaryHover: '#005546',\n\n secondary: '#001428',\n secondaryLight: '#B2B5B2',\n secondaryHover: '#5D6D74',\n\n error: '#DB3A3D',\n errorHover: '#C31717',\n\n text: '#001428',\n icon: '#B2B5B2',\n placeHolder: '#5D6D74',\n inputField: '#F0EFEE',\n\n separator: '#E8E7E6',\n rinkeby: '#E8673C',\n pendingTagHover: '#FBE5C5',\n tag: '#D4D5D3',\n background: '#F7F5F5',\n white: '#ffffff',\n warning: '#FFC05F',\n\n disabled: {\n opacity: 0.5,\n },\n overlay: {\n opacity: 0.75,\n color: '#E8E7E6',\n },\n shadow: {\n blur: '18px',\n opacity: 0.75,\n color: '#28363D',\n },\n },\n};\n\nexport type Theme = typeof theme;\nexport type ThemeColors = keyof Theme['colors'];\n\nexport { theme };\n"],"sourceRoot":""} \ No newline at end of file diff --git a/packages/safe-apps-onboard/.gitignore b/packages/safe-apps-onboard/.gitignore deleted file mode 100644 index 8a77bdf9..00000000 --- a/packages/safe-apps-onboard/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -node_modules -dist -.DS_Store -.idea -.vscode -lerna-debug.log -yalc.lock \ No newline at end of file diff --git a/packages/safe-apps-onboard/dist/index.d.ts b/packages/safe-apps-onboard/dist/index.d.ts new file mode 100644 index 00000000..6a25bd1e --- /dev/null +++ b/packages/safe-apps-onboard/dist/index.d.ts @@ -0,0 +1,3 @@ +import { Initialization, API } from 'bnc-onboard/dist/src/interfaces'; +export declare const Onboard: (options: Initialization) => API; +export default Onboard; diff --git a/packages/safe-apps-onboard/dist/index.js b/packages/safe-apps-onboard/dist/index.js new file mode 100644 index 00000000..21af8441 --- /dev/null +++ b/packages/safe-apps-onboard/dist/index.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Onboard = void 0; +const wrapper_1 = require("./wrapper"); +const Onboard = (options) => { + return new wrapper_1.OnboardWrapper(options); +}; +exports.Onboard = Onboard; +exports.default = exports.Onboard; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/packages/safe-apps-onboard/dist/index.js.map b/packages/safe-apps-onboard/dist/index.js.map new file mode 100644 index 00000000..29e1baca --- /dev/null +++ b/packages/safe-apps-onboard/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uCAA2C;AAGpC,MAAM,OAAO,GAAG,CAAC,OAAuB,EAAO,EAAE;IACtD,OAAO,IAAI,wBAAc,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB;AAEF,kBAAe,eAAO,CAAC"} \ No newline at end of file diff --git a/packages/safe-apps-onboard/dist/wrapper.d.ts b/packages/safe-apps-onboard/dist/wrapper.d.ts new file mode 100644 index 00000000..8d2ac340 --- /dev/null +++ b/packages/safe-apps-onboard/dist/wrapper.d.ts @@ -0,0 +1,19 @@ +import { SafeInfo } from '@gnosis.pm/safe-apps-sdk'; +import { Initialization, API, ConfigOptions, UserState } from 'bnc-onboard/dist/src/interfaces'; +export declare class OnboardWrapper implements API { + private sdk; + private onboardApi; + private subscriptions?; + private safe; + private state; + constructor(options: Initialization); + connectedSafe(timeout?: number): Promise; + checkSafeApp(): Promise; + reset(): void; + walletSelect(autoSelectWallet?: string): Promise; + walletCheck(): Promise; + walletReset(): void; + accountSelect(): Promise; + config(options: ConfigOptions): void; + getState(): UserState; +} diff --git a/packages/safe-apps-onboard/dist/wrapper.js b/packages/safe-apps-onboard/dist/wrapper.js new file mode 100644 index 00000000..1dae42d9 --- /dev/null +++ b/packages/safe-apps-onboard/dist/wrapper.js @@ -0,0 +1,91 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OnboardWrapper = void 0; +const safe_apps_sdk_1 = __importDefault(require("@gnosis.pm/safe-apps-sdk")); +const safe_apps_provider_1 = require("@gnosis.pm/safe-apps-provider"); +const bnc_onboard_1 = __importDefault(require("bnc-onboard")); +class OnboardWrapper { + constructor(options) { + this.sdk = new safe_apps_sdk_1.default(); + this.onboardApi = bnc_onboard_1.default(options); + this.subscriptions = options.subscriptions; + this.checkSafeApp().catch(console.log); + } + async connectedSafe(timeout) { + if (!this.safe) + this.safe = await Promise.race([ + this.sdk.getSafeInfo(), + new Promise((resolve) => setTimeout(resolve, timeout || 100)), + ]); + return this.safe; + } + checkSafeApp() { + return this.connectedSafe().then((safe) => { + if (!safe) + return; + if (!this.state) { + const provider = new safe_apps_provider_1.SafeAppProvider(safe, this.sdk); + this.state = { + address: safe.safeAddress, + network: provider.chainId, + appNetworkId: provider.chainId, + balance: '0', + mobileDevice: false, + wallet: { + name: 'Gnosis Safe', + provider, + type: 'sdk', + }, + }; + } + const subscriptions = this.subscriptions; + if (subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.wallet) + subscriptions.wallet(this.state.wallet); + if (subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.address) + subscriptions.address(safe.safeAddress); + if (subscriptions === null || subscriptions === void 0 ? void 0 : subscriptions.network) + subscriptions.network(this.state.wallet.provider.chainId); + }); + } + reset() { + var _a; + this.state = undefined; + if ((_a = this.subscriptions) === null || _a === void 0 ? void 0 : _a.address) + this.subscriptions.address(''); + } + async walletSelect(autoSelectWallet) { + if ((await this.connectedSafe()) !== undefined) { + await this.checkSafeApp(); + return true; + } + return this.onboardApi.walletSelect(autoSelectWallet); + } + async walletCheck() { + if ((await this.connectedSafe()) !== undefined) { + return true; + } + return this.onboardApi.walletCheck(); + } + walletReset() { + this.reset(); + this.onboardApi.walletReset(); + } + async accountSelect() { + if ((await this.connectedSafe()) !== undefined) + return false; + return this.onboardApi.accountSelect(); + } + config(options) { + this.onboardApi.config(options); + } + getState() { + if (this.state) + return this.state; + return this.onboardApi.getState(); + } +} +exports.OnboardWrapper = OnboardWrapper; +//# sourceMappingURL=wrapper.js.map \ No newline at end of file diff --git a/packages/safe-apps-onboard/dist/wrapper.js.map b/packages/safe-apps-onboard/dist/wrapper.js.map new file mode 100644 index 00000000..ef21bfaf --- /dev/null +++ b/packages/safe-apps-onboard/dist/wrapper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../src/wrapper.ts"],"names":[],"mappings":";;;;;;AAAA,6EAAiE;AACjE,sEAAgE;AAChE,8DAAqC;AAGrC,MAAa,cAAc;IAMzB,YAAY,OAAuB;QAL3B,QAAG,GAAG,IAAI,uBAAW,EAAE,CAAC;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I,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;IAED,MAAM,CAAC,OAAsB;QAC3B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;CACF;AAvFD,wCAuFC"} \ No newline at end of file diff --git a/packages/safe-apps-react-sdk/dist/index.js b/packages/safe-apps-react-sdk/dist/index.js index d1658dc5..269916c9 100644 --- a/packages/safe-apps-react-sdk/dist/index.js +++ b/packages/safe-apps-react-sdk/dist/index.js @@ -18,7 +18,7 @@ const react_1 = require("react"); const safe_apps_sdk_1 = __importDefault(require("@gnosis.pm/safe-apps-sdk")); const SafeContext = react_1.createContext(undefined); const SafeProvider = ({ loader = null, opts, children }) => { - const [sdk] = react_1.useState(new safe_apps_sdk_1.default(opts)); + const [sdk] = react_1.useState(() => new safe_apps_sdk_1.default(opts)); const [connected, setConnected] = react_1.useState(false); const [safe, setSafe] = react_1.useState({ safeAddress: '', network: 'RINKEBY' }); const contextValue = react_1.useMemo(() => ({ sdk, connected, safe }), [sdk, connected, safe]); diff --git a/packages/safe-apps-react-sdk/dist/index.js.map b/packages/safe-apps-react-sdk/dist/index.js.map index a9f53af5..db31b0a4 100644 --- a/packages/safe-apps-react-sdk/dist/index.js.map +++ b/packages/safe-apps-react-sdk/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iCAA8F;AAC9F,6EAAkF;AAQlF,MAAM,WAAW,GAAG,qBAAa,CAAkC,SAAS,CAAC,CAAC;AAOvE,MAAM,YAAY,GAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAA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AG,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC;gBAEzC,IAAI,CAAC,MAAM,EAAE;oBACX,OAAO;iBACR;gBACD,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAClB,YAAY,CAAC,IAAI,CAAC,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE;oBACX,OAAO;iBACR;gBACD,YAAY,CAAC,KAAK,CAAC,CAAC;aACrB;QACH,CAAC,CAAA,CAAC;QAEF,aAAa,EAAE,CAAC;QAEhB,OAAO,GAAG,EAAE;YACV,MAAM,GAAG,KAAK,CAAC;QACjB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,IAAI,CAAC,SAAS,IAAI,MAAM,EAAE;QACxB,OAAO,MAAM,CAAC;KACf;IAED,OAAO,kBAAC,WAAW,CAAC,QAAQ,kBAAC,KAAK,EAAE,YAAY,gBAAG,QAAQ,YAAwB,CAAC;AACtF,CAAC,CAAC;AArCW,QAAA,YAAY,gBAqCvB;AAEK,MAAM,cAAc,GAAG,GAAwB,EAAE;IACtD,MAAM,KAAK,GAAG,kBAAU,CAAC,WAAW,CAAC,CAAC;IAEtC,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;KAC/D;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB;AAEF,kBAAe,oBAAY,CAAC"} \ No newline at end of file diff --git a/packages/safe-apps-react-sdk/dist/sdk.d.ts b/packages/safe-apps-react-sdk/dist/sdk.d.ts deleted file mode 100644 index 9da0cf8b..00000000 --- a/packages/safe-apps-react-sdk/dist/sdk.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import SafeAppsSDK from '@gnosis.pm/safe-apps-sdk'; -declare const safeAppsSDK: SafeAppsSDK; -export { safeAppsSDK }; diff --git a/packages/safe-apps-react-sdk/dist/sdk.js b/packages/safe-apps-react-sdk/dist/sdk.js deleted file mode 100644 index 528147ff..00000000 --- a/packages/safe-apps-react-sdk/dist/sdk.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.safeAppsSDK = void 0; -const safe_apps_sdk_1 = __importDefault(require("@gnosis.pm/safe-apps-sdk")); -const safeAppsSDK = new safe_apps_sdk_1.default(); -exports.safeAppsSDK = safeAppsSDK; -//# sourceMappingURL=sdk.js.map \ No newline at end of file diff --git a/packages/safe-apps-react-sdk/dist/sdk.js.map b/packages/safe-apps-react-sdk/dist/sdk.js.map deleted file mode 100644 index 81f89f06..00000000 --- a/packages/safe-apps-react-sdk/dist/sdk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.tsx"],"names":[],"mappings":";;;;;;AAAA,6EAAmD;AAEnD,MAAM,WAAW,GAAG,IAAI,uBAAW,EAAE,CAAC;AAE7B,kCAAW"} \ No newline at end of file diff --git a/packages/safe-apps-react-sdk/src/index.tsx b/packages/safe-apps-react-sdk/src/index.tsx index bc44a840..c11954fe 100644 --- a/packages/safe-apps-react-sdk/src/index.tsx +++ b/packages/safe-apps-react-sdk/src/index.tsx @@ -15,7 +15,7 @@ interface Props { } export const SafeProvider: React.FC = ({ loader = null, opts, children }) => { - const [sdk] = useState(new SafeAppsSDK(opts)); + const [sdk] = useState(() => new SafeAppsSDK(opts)); const [connected, setConnected] = useState(false); const [safe, setSafe] = useState({ safeAddress: '', network: 'RINKEBY' }); const contextValue = useMemo(() => ({ sdk, connected, safe }), [sdk, connected, safe]); diff --git a/packages/safe-apps-react-sdk/src/sdk.tsx b/packages/safe-apps-react-sdk/src/sdk.tsx deleted file mode 100644 index ed33f865..00000000 --- a/packages/safe-apps-react-sdk/src/sdk.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import SafeAppsSDK from '@gnosis.pm/safe-apps-sdk'; - -const safeAppsSDK = new SafeAppsSDK(); - -export { safeAppsSDK }; diff --git a/packages/safe-apps-sdk/README.md b/packages/safe-apps-sdk/README.md index 65a45a26..29b739c1 100644 --- a/packages/safe-apps-sdk/README.md +++ b/packages/safe-apps-sdk/README.md @@ -44,7 +44,7 @@ And for Linux: Apps built with the Safe Apps SDK are meant to be run in an iframe inside the Safe Web UI. This library exposes a class as a default export. It accepts an optional options object: `whitelistedDomains` - Array of regular expressions for origins you want to accept messages from. If not passed, accepts -messages from any origin (default). +`debug` - Boolean. If enabled, it will log outgoing/incoming messages. ```js import SafeAppsSDK from '@gnosis.pm/safe-apps-sdk'; diff --git a/packages/safe-apps-sdk/dist/src/communication/index.d.ts b/packages/safe-apps-sdk/dist/src/communication/index.d.ts index 4ccc1285..ba528fa4 100644 --- a/packages/safe-apps-sdk/dist/src/communication/index.d.ts +++ b/packages/safe-apps-sdk/dist/src/communication/index.d.ts @@ -2,7 +2,8 @@ import { Communicator, Response } from '../types'; declare class PostMessageCommunicator implements Communicator { private readonly allowedOrigins; private callbacks; - constructor(allowedOrigins?: RegExp[] | null); + private debugMode; + constructor(allowedOrigins?: RegExp[] | null, debugMode?: boolean); private isValidMessage; private logIncomingMessage; private onParentMessage; diff --git a/packages/safe-apps-sdk/dist/src/communication/index.js b/packages/safe-apps-sdk/dist/src/communication/index.js index bfb09e2b..f8fa1a21 100644 --- a/packages/safe-apps-sdk/dist/src/communication/index.js +++ b/packages/safe-apps-sdk/dist/src/communication/index.js @@ -16,9 +16,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); const semver_1 = __importDefault(require("semver")); const messageFormatter_1 = require("./messageFormatter"); class PostMessageCommunicator { - constructor(allowedOrigins = null) { + constructor(allowedOrigins = null, debugMode = false) { this.allowedOrigins = null; this.callbacks = new Map(); + this.debugMode = false; this.isValidMessage = ({ origin, data, source }) => { const emptyOrMalformed = !data; const sentFromParentEl = source === window.parent; @@ -34,7 +35,7 @@ class PostMessageCommunicator { }; this.onParentMessage = (msg) => { if (this.isValidMessage(msg)) { - this.logIncomingMessage(msg); + this.debugMode && this.logIncomingMessage(msg); this.handleIncomingMessage(msg.data); } }; @@ -59,6 +60,7 @@ class PostMessageCommunicator { }); }; this.allowedOrigins = allowedOrigins; + this.debugMode = debugMode; window.addEventListener('message', this.onParentMessage); } } diff --git a/packages/safe-apps-sdk/dist/src/communication/index.js.map b/packages/safe-apps-sdk/dist/src/communication/index.js.map index 23c9b9a6..6d1ce8ad 100644 --- a/packages/safe-apps-sdk/dist/src/communication/index.js.map +++ b/packages/safe-apps-sdk/dist/src/communication/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/communication/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAA4B;AAE5B,yDAAsD;AAKtD,MAAM,uBAAuB;IAI3B,YAAY,iBAAkC,IAAI;QAHjC,mBAAc,GAAoB,IAAI,CAAC;QAChD,cAAS,GAAG,IAAI,GAAG,EAAoB,CAAC;QAQxC,mBAAc,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAyB,EAAW,EAAE;YACpF,MAAM,gBAAgB,GAAG,CAAC,IAAI,CAAC;YAC/B,MAAM,gBAAgB,GAAG,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC;YAClD,MAAM,iBAAiB,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,gBAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YAC1G,IAAI,WAAW,GAAG,IAAI,CAAC;YACvB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE;gBACtC,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM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AAE,EAAE;gBAC7B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,QAAqB,EAAE,EAAE;oBACvD,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACpB,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QApDA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAC3D,CAAC;CAkDF;AAED,kBAAe,uBAAuB,CAAC;AACvC,4CAA0B"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/communication/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAA4B;AAE5B,yDAAsD;AAKtD,MAAM,uBAAuB;IAK3B,YAAY,iBAAkC,IAAI,EAAE,SAAS,GAAG,KAAK;QAJpD,mBAAc,GAAoB,IAAI,CAAC;QAChD,cAAS,GAAG,IAAI,GAAG,EAAoB,CAAC;QACxC,cAAS,GAAG,KAAK,CAAC;QASlB,mBAAc,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAyB,EAAW,EAAE;YACpF,MAAM,gBAAgB,GAAG,CAAC,IAAI,CAAC;YAC/B,MAAM,gBAAgB,GAAG,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC;YAClD,MAAM,iBAAiB,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,gBAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YAC1G,IAAI,WAAW,GAAG,IAAI,CAAC;YACvB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE;gBACtC,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE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AAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC7B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,QAAqB,EAAE,EAAE;oBACvD,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACpB,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QArDA,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;IAC3D,CAAC;CAkDF;AAED,kBAAe,uBAAuB,CAAC;AACvC,4CAA0B"} \ No newline at end of file diff --git a/packages/safe-apps-sdk/dist/src/sdk.d.ts b/packages/safe-apps-sdk/dist/src/sdk.d.ts index e2b2ff97..4569d6c6 100644 --- a/packages/safe-apps-sdk/dist/src/sdk.d.ts +++ b/packages/safe-apps-sdk/dist/src/sdk.d.ts @@ -3,6 +3,7 @@ import { TXs } from './txs'; import { Eth } from './eth'; export declare type Opts = { whitelistedDomains?: RegExp[]; + debug?: boolean; }; declare class SafeAppsSDK { private readonly communicator; diff --git a/packages/safe-apps-sdk/dist/src/sdk.js b/packages/safe-apps-sdk/dist/src/sdk.js index f97b308c..6809491f 100644 --- a/packages/safe-apps-sdk/dist/src/sdk.js +++ b/packages/safe-apps-sdk/dist/src/sdk.js @@ -12,8 +12,8 @@ class SafeAppsSDK { if (typeof window === 'undefined') { throw new Error('Error initializing the sdk: window is undefined'); } - const { whitelistedDomains = null } = opts; - this.communicator = new communication_2.default(whitelistedDomains); + const { whitelistedDomains = null, debug = false } = opts; + this.communicator = new communication_2.default(whitelistedDomains, debug); this.eth = new eth_1.Eth(this.communicator); this.txs = new txs_1.TXs(this.communicator); this.bootstrap(); diff --git a/packages/safe-apps-sdk/dist/src/sdk.js.map b/packages/safe-apps-sdk/dist/src/sdk.js.map index e587b328..6719ae19 100644 --- a/packages/safe-apps-sdk/dist/src/sdk.js.map +++ b/packages/safe-apps-sdk/dist/src/sdk.js.map @@ -1 +1 @@ -{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":";;;;;AAAA,mDAA0C;AAE1C,oEAAoD;AACpD,+BAA4B;AAC5B,+BAA4B;AAM5B,MAAM,WAAW;IAKf,YAAY,OAAa,EAAE;QACzB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACpE;QAED,MAAM,EAAE,kBAAkB,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QAE3C,IAAI,CAAC,YAAY,GAAG,IAAI,uBAAqB,CAAC,kBAAkB,CAAC,CAAC;QAClE,IAAI,CAAC,GAAG,GAAG,IAAI,SAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,IAAI,CAAC,GAAG,GAAG,IAAI,SAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAEO,KAAK,CAAC,SAAS;QACrB,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QAEjD,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC;IAEO,KAAK,CAAC,UAAU;QACtB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAmC,uBAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAE/G,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACjC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,QAAQ,GAAG,MAAM,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AE/G,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACjC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAqC,uBAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAElH,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACjC;QAED,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF;AAED,kBAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/packages/safe-apps-sdk/src/communication/index.ts b/packages/safe-apps-sdk/src/communication/index.ts index 91cb3be8..ca9bff88 100644 --- a/packages/safe-apps-sdk/src/communication/index.ts +++ b/packages/safe-apps-sdk/src/communication/index.ts @@ -8,9 +8,11 @@ type Callback = (response: any) => void; class PostMessageCommunicator implements Communicator { private readonly allowedOrigins: RegExp[] | null = null; private callbacks = new Map(); + private debugMode = false; - constructor(allowedOrigins: RegExp[] | null = null) { + constructor(allowedOrigins: RegExp[] | null = null, debugMode = false) { this.allowedOrigins = allowedOrigins; + this.debugMode = debugMode; window.addEventListener('message', this.onParentMessage); } @@ -33,7 +35,7 @@ class PostMessageCommunicator implements Communicator { private onParentMessage = (msg: InterfaceMessageEvent): void => { if (this.isValidMessage(msg)) { - this.logIncomingMessage(msg); + this.debugMode && this.logIncomingMessage(msg); this.handleIncomingMessage(msg.data); } }; diff --git a/packages/safe-apps-sdk/src/sdk.ts b/packages/safe-apps-sdk/src/sdk.ts index 718c4013..aa7ba80b 100644 --- a/packages/safe-apps-sdk/src/sdk.ts +++ b/packages/safe-apps-sdk/src/sdk.ts @@ -6,6 +6,7 @@ import { Eth } from './eth'; export type Opts = { whitelistedDomains?: RegExp[]; + debug?: boolean; }; class SafeAppsSDK { @@ -18,9 +19,9 @@ class SafeAppsSDK { throw new Error('Error initializing the sdk: window is undefined'); } - const { whitelistedDomains = null } = opts; + const { whitelistedDomains = null, debug = false } = opts; - this.communicator = new InterfaceCommunicator(whitelistedDomains); + this.communicator = new InterfaceCommunicator(whitelistedDomains, debug); this.eth = new Eth(this.communicator); this.txs = new TXs(this.communicator); this.bootstrap();