text: (this["webpackJsonpcl-vault"]=this["webpackJsonpcl-vault"]||[]).push([[57],{1671:function(e,t,a){"use strict";var n=a(11),i=a(12),r=a(7),c=a(6),s=a(9),o=a(10),d=a(0),l=a(2),j=["children"],b=function(e){Object(s.a)(a,e);var t=Object(o.a)(a);function a(){return Object(r.a)(this,a),t.apply(this,arguments)}return Object(c.a)(a,[{key:"render",value:function(){var e=this.props,t=e.children,a=Object(i.a)(e,j);return Object(l.jsx)("b",Object(n.a)(Object(n.a)({},a),{},{children:t}))}}]),a}(d.PureComponent);t.a=b},1682:function(e,t,a){"use strict";var n=a(11),i=a(12),r=a(567),c=a(570),s=a(579),o=a(577),d=a(2),l=["name","onChange","value"],j=["classes","disableError","formControlProps","input","label","meta","renderValue"],b={minWidth:"100%"};t.a=function(e){var t=e.classes,a=e.disableError,u=e.formControlProps,h=e.input,O=h.name,g=h.onChange,m=h.value,f=Object(i.a)(h,l),x=e.label,_=e.meta,v=e.renderValue,C=Object(i.a)(e,j),p=(_.submitError&&!_.dirtySinceLastSubmit||_.error)&&_.touched&&!a,E=Object(n.a)(Object(n.a)({},f),{},{name:O});return Object(d.jsxs)(r.a,Object(n.a)(Object(n.a)({},u),{},{error:p,style:b,children:[Object(d.jsx)(s.a,{htmlFor:O,children:x}),Object(d.jsx)(o.a,Object(n.a)({classes:t,inputProps:E,onChange:g,renderValue:v,value:m},C)),p&&Object(d.jsx)(c.a,{children:_.error||_.submitError})]}))}},1690:function(e,t,a){"use strict";var n=a(11),i=a(12),r=a(122),c=a.n(r),s=a(0),o=a(1699),d=a.n(o),l=a(71),j=["align","children","className","color","margin","tag","testId","truncate"],b=c.a.bind(d.a);t.a=function(e){var t=e.align,a=e.children,r=e.className,c=void 0===r?"":r,o=e.color,d=e.margin,u=e.tag,h=e.testId,O=e.truncate,g=Object(i.a)(e,j),m=b(c,"heading",t,u,d?Object(l.a)(d,"margin"):void 0,o,{truncate:O});return s.createElement(u,Object(n.a)(Object(n.a)({},g),{},{className:m,"data-testid":h||""}),a)}},1699: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"}},3395:function(e,t,a){"use strict";a.r(t);var n=a(29),i=a(444),r=a(0),c=a(34),s=a(359),o=a(149),d=a(1671),l=a(306),j=a(1690),b=a(86),u=a(121),h=a(253),O=a(77),g=a(196),m=a(11),f=a(65),x=a(646),_=a(1647),v=a(1660),C=a(1682),p=a(595),E=a(104),H=a(176),S=a(1652),w=a(1668),N=a(106),G=a(1672),y=a(1661),T=a(1667),P=a(1665),L=a(480),A=a(66),k=a(566),F=a(14),R=Object(i.a)(Object(k.a)({modalContent:{padding:"".concat(F.md," ").concat(F.lg)},ownersText:{marginLeft:F.sm},inputRow:{position:"relative"}})),I=a(2),B=function(e){var t=e.onClose,a=e.ownersCount,i=void 0===a?0:a,d=e.safeAddress,l=e.threshold,j=void 0===l?1:l,h=R(),g=Object(c.d)(),k=Object(c.e)(O.c),F=Object(r.useState)(""),B=Object(n.a)(F,2),D=B[0],q=B[1],M=Object(r.useState)("0"),X=Object(n.a)(M,2),z=X[0],W=X[1],Z=Object(r.useState)(),V=Object(n.a)(Z,2),Y=V[0],J=V[1],K=Object(r.useState)(),Q=Object(n.a)(K,2),U=Q[0],$=Q[1],ee=Object(r.useState)(j),te=Object(n.a)(ee,2),ae=te[0],ne=te[1],ie=Object(r.useState)(!0),re=Object(n.a)(ie,2),ce=re[0],se=re[1],oe=Object(y.b)({txData:D,txRecipient:d,safeTxGas:z,manualGasPrice:Y,manualGasLimit:U}),de=oe.gasCostFormatted,le=oe.txEstimationExecutionStatus,je=oe.isCreation,be=oe.isExecution,ue=oe.isOffChainSignature,he=oe.gasLimit,Oe=oe.gasPriceFormatted,ge=oe.gasEstimation,me=Object(G.a)(le),fe=Object(n.a)(me,1)[0];Object(r.useEffect)((function(){var e=!0;return function(){var t=Object(N.d)(d,k).methods.changeThreshold(ae).encodeABI();e&&q(t)}(),function(){e=!1}}),[d,k,ae]);var xe=function(e){var t=e.target,a=parseInt(t.value);se(a===ae||a===j),ne(a)},_e=function(e){var a=e.txParameters;g(Object(L.b)({safeAddress:d,to:d,valueInWei:"0",txData:D,txNonce:a.safeNonce,safeTxGas:a.safeTxGas,ethParameters:a,notifiedTransaction:A.a.SETTINGS_CHANGE_TX})),t()};return Object(I.jsx)(w.a,{isOffChainSignature:ue,isExecution:be,ethGasLimit:he,ethGasPrice:Oe,safeTxGas:ge,closeEditModalCallback:function(e){var t=Oe,a=e.ethGasPrice,n=ge,i=e.safeTxGas;a&&t!==a&&J(e.ethGasPrice),e.ethGasLimit&&he!==e.ethGasLimit&&$(e.ethGasLimit),i&&n!==i&&W(i)},children:function(e,a){return Object(I.jsxs)(I.Fragment,{children:[Object(I.jsx)(S.a,{onClose:t,title:"Change threshold"}),Object(I.jsx)(H.a,{}),Object(I.jsx)(v.a,{initialValues:{threshold:ae.toString(),txParameters:e},onSubmit:_e,children:function(){return Object(I.jsxs)(I.Fragment,{children:[Object(I.jsxs)(o.a,{className:h.modalContent,children:[Object(I.jsx)(u.a,{children:Object(I.jsx)(b.a,{weight:"bolder",children:"Any transaction requires the confirmation of:"})}),Object(I.jsxs)(u.a,{align:"center",className:h.inputRow,margin:"xl",children:[Object(I.jsx)(E.a,{xs:2,children:Object(I.jsx)(_.a,{"data-testid":"threshold-select-input",name:"threshold",onChange:xe,render:function(e){return Object(I.jsx)(I.Fragment,{children:Object(I.jsx)(C.a,Object(m.a)(Object(m.a)({},e),{},{disableError:!0,children:Object(f.a)(Array(Number(i))).map((function(e,t){return Object(I.jsx)(x.a,{value:"".concat(t+1),children:t+1},t)}))}))})},validate:Object(p.d)(p.p,p.o,Object(p.i)(1),Object(p.e)(j))})}),Object(I.jsx)(E.a,{xs:10,children:Object(I.jsx)(b.a,{className:h.ownersText,color:"primary",noMargin:!0,size:"lg",children:"out of ".concat(i," owner(s)")})})]}),Object(I.jsx)(P.a,{txParameters:e,onEdit:a,isTransactionCreation:je,isTransactionExecution:be,isOffChainSignature:ue})]}),le!==y.a.LOADING&&Object(I.jsx)(T.a,{gasCostFormatted:de,isCreation:je,isExecution:be,isOffChainSignature:ue,safeNonce:e.safeNonce,txEstimationExecutionStatus:le}),Object(I.jsx)(s.b.Footer,{withoutBorder:fe!==s.a.LOADING,children:Object(I.jsx)(s.b.Footer.Buttons,{cancelButtonProps:{onClick:t},confirmButtonProps:{disabled:ce,status:fe,text:le===y.a.LOADING?"Estimating":void 0}})})]})}})]})}})},D=Object(k.a)({ownersText:{color:F.secondaryText,"& b":{color:F.fontColor}},container:{padding:F.lg},buttonRow:{padding:F.lg,position:"absolute",left:0,bottom:0,boxSizing:"border-box",width:"100%",justifyContent:"flex-end",borderTop:"2px solid ".concat(F.border)},modifyBtn:{height:F.xl,fontSize:F.smallFontSize}}),q=Object(i.a)(D);t.default=function(){var e,t=q(),a=Object(r.useState)(!1),i=Object(n.a)(a,2),m=i[0],f=i[1],x=null!==(e=Object(c.e)(O.a))&&void 0!==e?e:{},_=x.address,v=void 0===_?"":_,C=x.owners,p=x.threshold,E=void 0===p?1:p,H=Object(c.e)(h.b),S=function(){f((function(e){return!e}))},w=Object(g.g)().trackEvent;return Object(r.useEffect)((function(){w(g.c.OWNERS)}),[w]),Object(I.jsxs)(I.Fragment,{children:[Object(I.jsxs)(o.a,{className:t.container,children:[Object(I.jsx)(j.a,{tag:"h2",children:"Required Confirmations"}),Object(I.jsx)(b.a,{children:"Any transaction requires the confirmation of:"}),Object(I.jsxs)(b.a,{className:t.ownersText,size:"lg",children:[Object(I.jsx)(d.a,{children:E})," out of ",Object(I.jsx)(d.a,{children:(null===C||void 0===C?void 0:C.length)||0})," owners"]}),C&&C.length>1&&H&&Object(I.jsx)(u.a,{className:t.buttonRow,children:Object(I.jsx)(l.a,{className:t.modifyBtn,color:"primary",minWidth:120,onClick:S,variant:"contained",children:"Change"})})]}),Object(I.jsx)(s.c,{description:"Change Required Confirmations Form",handleClose:S,open:m,title:"Change Required Confirmations",children:Object(I.jsx)(B,{onClose:S,ownersCount:null===C||void 0===C?void 0:C.length,safeAddress:v,threshold:E})})]})}}}]);
  //# sourceMappingURL=57.c21cd2d6.chunk.js.map