text: (this["webpackJsonpsafe-react"]=this["webpackJsonpsafe-react"]||[]).push([[51],{1526:function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n,r=a(41),i=a(27),c=a(0),s=a(25),o=a(1545),d=a(1563),l=a(21),u=a(1564),j=a(1567),b=a(1568),f=a(23),O=a(337),h=a(13),m=a(1558),g=a(1535),x=a(1551),_=a(2),p=s.default.div(n||(n=Object(i.a)(["\n  padding: 0 "," ",";\n"])),h.lg,h.md),v=function(e){var t=e.children,a=e.operation,n=e.txData,i=e.txValue,s=void 0===i?"0":i,h=e.txTo,v=e.txType,S=e.onSubmit,C=e.onBack,E=e.submitText,N=e.isConfirmDisabled,T=Object(c.useState)("0"),k=Object(r.a)(T,2),y=k[0],w=k[1],I=Object(c.useState)(),A=Object(r.a)(I,2),H=A[0],G=A[1],L=Object(c.useState)(),M=Object(r.a)(L,2),D=M[0],F=M[1],B=Object(c.useState)(),R=Object(r.a)(B,2),P=R[0],U=R[1],X=Object(c.useState)(),V=Object(r.a)(X,2),Y=V[0],W=V[1],z=Object(c.useState)(!0),Z=Object(r.a)(z,2),K=Z[0],q=Z[1],J=Object(l.l)(),Q=Object(g.e)(v),$=Object(o.b)({txData:n,txRecipient:h||J,txType:v,txAmount:s,safeTxGas:y,manualGasPrice:H,manualMaxPrioFee:D,manualGasLimit:P,manualSafeNonce:Y,operation:a}),ee=$.gasCostFormatted,te=$.gasPriceFormatted,ae=$.gasMaxPrioFeeFormatted,ne=$.gasLimit,re=$.gasEstimation,ie=$.txEstimationExecutionStatus,ce=$.isCreation,se=$.isOffChainSignature,oe=Object(b.a)(ie),de=Object(r.a)(oe,2),le=de[0],ue=de[1],je=Object(x.a)(void 0,Y),be=K&&je,fe=function(e){var t=te,a=e.ethGasPrice,n=ne,r=e.ethGasLimit,i=ae,c=e.ethMaxPrioFee,s=re,o=e.safeTxGas,d=e.safeNonce;if(t!==a&&G(a),i!==c&&F(c),n!==r&&U(r),o&&s!==o&&w(o),d){var l=parseInt(d,10);W(l)}};return Object(_.jsx)(d.a,{isOffChainSignature:se,isExecution:be,ethGasLimit:ne,ethGasPrice:te,ethMaxPrioFee:ae,safeTxGas:re,closeEditModalCallback:fe,children:function(e,a){return Object(_.jsxs)(_.Fragment,{children:[t,Object(_.jsxs)(p,{children:[!Q&&je&&Object(_.jsx)(j.a,{onChange:q}),!Q&&Object(_.jsx)(m.a,{txParameters:e,onEdit:a,isTransactionCreation:ce,isTransactionExecution:be,isOffChainSignature:se})]}),!Q&&Object(_.jsx)(u.a,{gasCostFormatted:ee,isCreation:ce,isExecution:be,safeNonce:e.safeNonce,txEstimationExecutionStatus:ie}),Object(_.jsx)(O.b.Footer,{withoutBorder:!Q&&le!==O.a.LOADING,children:Object(_.jsx)(O.b.Footer.Buttons,{cancelButtonProps:{onClick:C||fe,text:"Back"},confirmButtonProps:{onClick:function(){return function(e){if(ue(O.a.LOADING),!J)return ue(O.a.READY),void Object(f.c)(f.b._802);S(e,!be)}(e)},status:le,disabled:N,text:ie===o.a.LOADING?"Estimating":E,testId:"submit-tx-btn"}})})]})}})}},1560:function(e,t,a){"use strict";var n=a(10),r=a(60),i=a(158),c=a.n(i),s=a(0),o=a(1569),d=a.n(o),l=a(75),u=["align","children","className","color","margin","tag","testId","truncate"],j=c.a.bind(d.a);t.a=function(e){var t=e.align,a=e.children,i=e.className,c=void 0===i?"":i,o=e.color,d=e.margin,b=e.tag,f=e.testId,O=e.truncate,h=Object(r.a)(e,u),m=j(c,"heading",t,b,d?Object(l.a)(d,"margin"):void 0,o,{truncate:O});return s.createElement(b,Object(n.a)(Object(n.a)({},h),{},{className:m,"data-testid":f||""}),a)}},1569:function(e,t,a){e.exports={heading:"Heading_heading__3Wz9P",h1:"Heading_h1__MXfCA",h2:"Heading_h2__3X6Ts",h3:"Heading_h3__1k2fD",h4:"Heading_h4__1YCmR",center:"Heading_center__28MHY",right:"Heading_right__1fQM1",truncate:"Heading_truncate__2Lq93",marginSm:"Heading_marginSm__13YwX",marginMd:"Heading_marginMd__2AnZN",marginLg:"Heading_marginLg__2ZfEq",marginXl:"Heading_marginXl__3RHt7",soft:"Heading_soft__2Zu43",medium:"Heading_medium__2X8Z-",dark:"Heading_dark__Ds2QB",fancy:"Heading_fancy__1Wx6l",warning:"Heading_warning__2lrZC",primary:"Heading_primary__2hOk2",secondary:"Heading_secondary__37lKs",disabled:"Heading_disabled__30DjG",error:"Heading_error__t5ujr",white:"Heading_white__2gkIK"}},1651:function(e,t,a){"use strict";var n=a(10),r=a(60),i=a(158),c=a.n(i),s=a(0),o=a(114),d=a(1652),l=a.n(d),u=a(75),j=a(2),b=["children","className","color","innerRef","padding","to"],f=c.a.bind(l.a),O=function(e){var t=e.children,a=e.className,i=e.color,c=e.innerRef,s=e.padding,d=e.to,O=Object(r.a)(e,b),h=/^\/(?!\/)/.test(d),m=f(l.a.link,i||"regular",s?Object(u.a)(s,"padding"):void 0,a),g=h?o.a:"a",x={};return h&&(x.innerRef=c),Object(j.jsx)(g,Object(n.a)(Object(n.a)(Object(n.a)({className:m,href:h?null:d,to:h?d:null},x),O),{},{children:t}))},h=s.forwardRef((function(e,t){return Object(j.jsx)(O,Object(n.a)(Object(n.a)({},e),{},{innerRef:t}))}));t.a=h},1652:function(e,t,a){e.exports={link:"Link_link__-dKdJ",regular:"Link_regular__12Aj2",white:"Link_white__1aYKn",paddingXs:"Link_paddingXs__7H_x4",paddingSm:"Link_paddingSm__4lbTG",paddingMd:"Link_paddingMd__3l9V9"}},2945:function(e,t,a){"use strict";a.r(t),a.d(t,"SAFE_NAME_INPUT_TEST_ID",(function(){return se})),a.d(t,"SAFE_NAME_SUBMIT_BTN_TEST_ID",(function(){return oe})),a.d(t,"SAFE_NAME_UPDATE_SAFE_BTN_TEST_ID",(function(){return de}));var n,r=a(1),i=a.n(r),c=a(16),s=a(41),o=a(27),d=a(28),l=a(412),u=a(0),j=a(39),b=a(25),f=a(539),O=a(13),h=Object(f.a)({formContainer:{padding:O.lg},root:{display:"flex",maxWidth:"480px"},saveBtn:{fontWeight:O.boldFont,marginRight:O.sm},controlsRow:{borderTop:"2px solid ".concat(O.border),padding:O.lg,marginTop:O.sm}}),m=a(337),g=a(1517),x=a(1532),_=a(1523),p=a(560),v=a(148),S=a(293),C=a(127),E=a(1560),N=a(85),T=a(109),k=a(342),y=a(132),w=a(112),I=a(86),A=a(44),H=a(62),G=a(36),L=a(26),M=a(1651),D=a(116),F=a.n(D),B=a(101),R=a(594),P=a(94),U=function(e,t){var a=Object(B.j)(),n=Object(B.d)(e,t).methods.changeMasterCopy(a).encodeABI(),r=function(e){var t=F()(L.i,">=1.1.0"),a=Object(B.c)(),n=Object(B.d)(e,L.i);return t?n.methods.setFallbackHandler(a).encodeABI():P.a}(e),i=[{to:e,value:"0",data:n},{to:e,value:"0",data:r}];return Object(R.a)(i)},X=a(562),V=a(561),Y=a(1526),W=Object(l.a)(Object(f.a)({modalContent:{padding:"".concat(O.md," ").concat(O.lg)}})),z=a(2),Z=function(e){var t=e.onClose,a=e.safeAddress,n=e.safeCurrentVersion,r=W(),i=Object(j.d)(),c=Object(u.useState)(P.a),o=Object(s.a)(c,2),d=o[0],l=o[1];Object(u.useEffect)((function(){var e=U(a,n);l(e)}),[a,n]);return Object(z.jsxs)(Y.a,{txData:d,txTo:Object(B.g)(),operation:G.Operation.DELEGATE,onSubmit:function(e,n){i(Object(X.c)({safeAddress:a,to:Object(B.g)(),valueInWei:"0",txData:d,txNonce:e.safeNonce,safeTxGas:e.safeTxGas,ethParameters:e,notifiedTransaction:"STANDARD_TX",operation:G.Operation.DELEGATE,delayExecution:n})),t()},onBack:t,submitText:"Update Safe",children:[Object(z.jsx)(V.a,{onClose:t,title:"Update safe version"}),Object(z.jsx)(v.a,{className:r.modalContent,children:Object(z.jsxs)(T.a,{children:[Object(z.jsx)(N.a,{noMargin:!0,children:"Update now to take advantage of new features and the highest security standards available."}),Object(z.jsxs)(N.a,{children:["To check details about updates added by this smart contract version please visit"," ",Object(z.jsx)(M.a,{target:"_blank",to:"https://github.com/gnosis/safe-contracts/releases/tag/v".concat(L.i),children:"latest Gnosis Safe contracts changelog"})]}),Object(z.jsx)(N.a,{noMargin:!0,children:"You will need to confirm this update just like any other transaction. This means other owners will have to confirm the update in case more than one confirmation is required for this Safe."}),Object(z.jsxs)(N.a,{children:[Object(z.jsx)("b",{children:"Warning"}),": this upgrade will invalidate all unexecuted transactions. This means you will be unable to access or execute them after the upgrade. Please make sure to execute any remaining transactions before upgrading."]})]})})]})},K=a(243),q=a(200),J=a(78),Q=a(189),$=a(20);!function(e){e.GNOSIS="Gnosis",e.CIRCLES="Circles"}(n||(n={}));var ee,te,ae,ne=function(e){var t=e.version.toLowerCase().includes(n.CIRCLES.toLowerCase()),a=e.version.indexOf("-");return{address:e.address,version:t?e.version.substring(0,a):e.version,deployer:t?n.CIRCLES:n.GNOSIS,deployerRepoUrl:t?"https://github.com/CirclesUBI/safe-contracts/releases":"https://github.com/gnosis/safe-contracts/releases"}},re=function(){var e=Object(c.a)(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(G.getMasterCopies)(L.e,Object($.b)());case 3:return t=e.sent,e.abrupt("return",t.map(ne));case 7:e.prev=7,e.t0=e.catch(0),console.error("Fetching data from master-copies errored",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),ie=a(273),ce=a(57),se="safe-name-input",oe="change-safe-name-btn",de="update-safe-name-btn",le=Object(l.a)(h),ue=Object(b.default)(d.Link)(ee||(ee=Object(o.a)(["\n  margin: 12px 0 0 0;\n"]))),je=Object(b.default)(d.Icon)(te||(te=Object(o.a)(["\n  position: relative;\n  top: 3px;\n  left: 6px;\n"]))),be=Object(b.default)(N.a)(ae||(ae=Object(o.a)(["\n  margin-bottom: 0;\n"])));t.default=function(){var e,t=le(),a=Object(j.e)(K.b),r=Object(j.e)(J.k),o=Object(j.e)(ce.a),l=Object(j.e)(J.a),b=l.address,f=l.needsUpdate,O=l.currentVersion,h=l.chainId,G=void 0===h?o:h,L=null===(e=Object(j.e)(J.o)[b])||void 0===e?void 0:e.name,M=Object(j.d)(),D=Object(Q.g)().trackEvent,F=Object(u.useState)(!1),R=Object(s.a)(F,2),P=R[0],U=R[1],X=Object(u.useState)(),V=Object(s.a)(X,2),Y=V[0],W=V[1],$=function(){U((function(e){return!e}))},ee=function(){U(!0)};return Object(u.useEffect)((function(){D(Q.c.DETAILS)}),[D]),Object(u.useEffect)((function(){var e=function(){var e=Object(c.a)(i.a.mark((function e(){var t,a,n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,re();case 2:return t=e.sent,e.next=5,Object(B.e)(b);case 5:a=e.sent,n=null===t||void 0===t?void 0:t.find((function(e){return Object(A.f)(e.address,a)})),W(n);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();b&&e()}),[b]),Object(z.jsx)(x.a,{onSubmit:function(e){M(Object(y.b)(Object(k.b)({address:b,name:e.safeName,chainId:o}))),M(Object(q.b)({address:b,loadedViaUrl:!1}));var t=Object(I.d)(H.a.SAFE_NAME_CHANGE_TX);M(Object(w.b)(Object(I.c)(t.afterExecution.noMoreConfirmationsNeeded)))},children:function(){return Object(z.jsxs)(z.Fragment,{children:[Object(z.jsxs)(v.a,{className:t.formContainer,children:[Object(z.jsx)(E.a,{tag:"h2",children:"Contract Version"}),Object(z.jsx)(T.a,{align:"end",grow:!0,children:Object(z.jsxs)(ue,{rel:"noreferrer noopener",target:"_blank",href:null===Y||void 0===Y?void 0:Y.deployerRepoUrl,children:[Object(z.jsxs)(d.Text,{size:"xl",as:"span",color:"primary",children:[Y?Y.deployer===n.GNOSIS?O:"".concat(O,"-").concat(Y.deployer):"",Y&&Y.deployer===n.GNOSIS&&f?" (there's a newer version: ".concat(r,")"):""]}),Object(z.jsx)(je,{size:"sm",type:"externalLink",color:"primary"})]})}),f&&a?Object(z.jsx)(T.a,{align:"end",grow:!0,children:Object(z.jsx)(N.a,{children:Object(z.jsx)(S.a,{className:t.saveBtn,color:"primary",onClick:ee,size:"small",testId:de,variant:"contained",children:"Update Safe"})})}):null]}),Object(z.jsxs)(v.a,{className:t.formContainer,children:[Object(z.jsx)(E.a,{tag:"h2",children:"Blockchain Network"}),Object(z.jsx)(be,{children:Object(z.jsx)(ie.a,{chainId:G})})]}),null!=L&&Object(z.jsxs)(v.a,{className:t.formContainer,children:[Object(z.jsx)(E.a,{tag:"h2",children:"Modify Safe Name"}),Object(z.jsx)(N.a,{children:"You can change the name of this Safe. This name is only stored locally and never shared with Gnosis or any third parties."}),Object(z.jsx)(v.a,{className:t.root,children:Object(z.jsx)(g.a,{component:_.a,defaultValue:L,name:"safeName",placeholder:"Safe name*",testId:se,text:"Safe name*",type:"text",validate:Object(p.d)(p.p,p.r)})})]}),Object(z.jsx)(T.a,{align:"end",className:t.controlsRow,grow:!0,children:Object(z.jsx)(C.a,{end:"xs",children:Object(z.jsx)(S.a,{className:t.saveBtn,color:"primary",size:"small",testId:oe,type:"submit",variant:"contained",children:"Save"})})}),Object(z.jsx)(m.c,{description:"Update Safe",handleClose:$,open:P,title:"Update Safe",children:Object(z.jsx)(Z,{onClose:$,safeAddress:b,safeCurrentVersion:O})})]})}})}}}]);
  //# sourceMappingURL=51.0e4712f4.chunk.js.map