From 251f30b772a024ea5b834bb9f596b3ca01a9ac23 Mon Sep 17 00:00:00 2001 From: icfor Date: Wed, 6 Mar 2024 16:19:11 +0000 Subject: [PATCH] deploy: 530d13f2ad10bb1ba832b1746613f8676bbdd2d4 --- 404.html | 2 +- .../chunks/{4-fbe661fc5df9349d.js => 4-f9ab361db4f4f038.js} | 0 _next/static/chunks/503-311c908eac1df4f6.js | 1 + _next/static/chunks/503-59dce0c9fc83ff1c.js | 1 - _next/static/chunks/816-cac8172353521c02.js | 1 + _next/static/chunks/816-eb86ba1609f525f6.js | 1 - ...ayout-60929d98c5cc30c3.js => layout-f8bb99b6df23ac99.js} | 0 _next/static/chunks/app/page-5762d3667c36ba9b.js | 1 + _next/static/chunks/app/page-dfd1efb6ea25b0e8.js | 1 - _next/static/chunks/app/validator/page-0427cf30f4309eb5.js | 1 - _next/static/chunks/app/validator/page-e77375662743b728.js | 1 + .../_buildManifest.js | 0 .../_ssgManifest.js | 0 index.html | 2 +- index.txt | 6 +++--- validator.html | 2 +- validator.txt | 6 +++--- 17 files changed, 13 insertions(+), 13 deletions(-) rename _next/static/chunks/{4-fbe661fc5df9349d.js => 4-f9ab361db4f4f038.js} (100%) create mode 100644 _next/static/chunks/503-311c908eac1df4f6.js delete mode 100644 _next/static/chunks/503-59dce0c9fc83ff1c.js create mode 100644 _next/static/chunks/816-cac8172353521c02.js delete mode 100644 _next/static/chunks/816-eb86ba1609f525f6.js rename _next/static/chunks/app/{layout-60929d98c5cc30c3.js => layout-f8bb99b6df23ac99.js} (100%) create mode 100644 _next/static/chunks/app/page-5762d3667c36ba9b.js delete mode 100644 _next/static/chunks/app/page-dfd1efb6ea25b0e8.js delete mode 100644 _next/static/chunks/app/validator/page-0427cf30f4309eb5.js create mode 100644 _next/static/chunks/app/validator/page-e77375662743b728.js rename _next/static/{pAOZFmz65xxHkmymOSIHX => vKS50s-SqSS05fQWU-TXS}/_buildManifest.js (100%) rename _next/static/{pAOZFmz65xxHkmymOSIHX => vKS50s-SqSS05fQWU-TXS}/_ssgManifest.js (100%) diff --git a/404.html b/404.html index b5b5701..2454bfc 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404: This page could not be found.

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.

404

This page could not be found.

\ No newline at end of file diff --git a/_next/static/chunks/4-fbe661fc5df9349d.js b/_next/static/chunks/4-f9ab361db4f4f038.js similarity index 100% rename from _next/static/chunks/4-fbe661fc5df9349d.js rename to _next/static/chunks/4-f9ab361db4f4f038.js diff --git a/_next/static/chunks/503-311c908eac1df4f6.js b/_next/static/chunks/503-311c908eac1df4f6.js new file mode 100644 index 0000000..28c4901 --- /dev/null +++ b/_next/static/chunks/503-311c908eac1df4f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[503],{143:function(e,t,s){s.d(t,{N:function(){return r}});var n=s(3827),l=s(77658);let r=e=>{let{children:t,onSort:s,sort:r,sorting:i}=e,a=(i||[]).concat(["none"]),c=r?a.indexOf(r):-1;return(0,n.jsx)("div",{className:"text-[14px] font-normal leading-[14px] tracking-wider",children:(0,n.jsxs)("span",{className:"relative",children:[t," ",!!s&&!!r&&(0,n.jsx)("button",{className:"absolute right-[-16px] top-[6px] cursor-pointer",dangerouslySetInnerHTML:{__html:l.Sf},onClick:()=>{if(!s)return;let e=(1+a.indexOf(r))%a.length,t=a[e];null==s||s(t)},style:{rotate:0===c?"180deg":1===c?"0deg":"90deg"}})]})})}},80148:function(e,t,s){s.d(t,{B:function(){return l}});var n=s(22840);let l=(e,t,s)=>typeof e!=typeof t?0:"string"==typeof e?s?e.localeCompare(t):t.localeCompare(e):"number"==typeof e?Number.isNaN(e)||Number.isNaN(t)?0:s?e-t:t-e:e instanceof n.Z&&t instanceof n.Z?s?e.minus(t).toNumber():t.minus(e).toNumber():0},26605:function(e,t,s){var n=s(3827),l=s(30298);t.Z=e=>{let{address:t}=e;if(!t)return null;let s=[t.slice(0,5),t.slice(t.length-5)].join("...");return(0,n.jsx)("button",{className:"cursor-pointer text-left text-[12px] font-normal leading-[20px] text-typo-200",onClick:()=>{navigator.clipboard.writeText(t),(0,l.Am)("Copied to clipboard",{type:"info"})},children:s})}},62948:function(e,t,s){s.d(t,{S6:function(){return g},sv:function(){return N}});var n=s(3827),l=s(64090),r=s(98909),i=s(143),a=s(80148),c=s(88197),d=s(80469),o=s(62986),u=s(39730),x=s(89056),m=s(66803),h=s(77658),p=s(19807),j=s(67497),f=s(26605),v=s(48074);let g=e=>{let t=(0,u.jv)(e,null),s=(0,u.U2)(e,null);return(0,m.UO)(t)||(0,m.UO)(s)},N=e=>{let{isShowingDetails:t,setIsShowingDetails:s}=e;return(0,n.jsxs)("button",{className:"text-primary-500 flex flex-row items-center gap-2",onClick:()=>{s(!t)},children:[t?"Hide details":"Show details",(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:h.cx},style:{transform:"rotate(".concat(t?"0deg":"180deg",")")}})]})},b={gap:"16px",gridTemplateColumns:"60px 1.5fr repeat(4, 1fr)"},y="grid w-full items-center justify-between gap-2 p-2 mb-[24px] last:mb-[0px] bg-black rounded-[8px]",w="w-full overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100 px-[16px]",k=()=>(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:h.GI}}),S=(0,l.memo)(e=>{let{delegation:t,disabled:s,index:i,staking:a,validator:d}=e,{validatorAddress:u}=t;(0,l.useEffect)(()=>{u&&(0,c.Dr)(u,a)},[u,a]);let m=(0,x.P)(null==d?void 0:d.description.identity);return(0,n.jsxs)("div",{className:y,style:b,children:[(0,n.jsx)("div",{className:"flex items-center justify-start",children:(0,n.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:m,style:{height:50,width:50}})}),(0,n.jsx)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,n.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:(null==d?void 0:d.description.moniker)||""}),(0,n.jsx)(f.Z,{address:(null==d?void 0:d.operatorAddress)||""})]})}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(t.balance)})}),(0,n.jsx)("div",{className:"text-right",children:d?(0,j.i)(d.commission.commissionRates.rate,0):""}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(t.rewards)})}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-end gap-[8px]",children:[(0,n.jsx)(r.hp,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"delegate"}))},children:"Delegate"}),(0,n.jsx)(r.Rk,{Trigger:k,id:"delegation-".concat(i),children:(0,n.jsxs)("div",{className:"flex flex-col gap-[12px] rounded-[8px] bg-bg-600 py-[4px]",children:[(0,n.jsx)(r.ZP,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{delegations:[t]},type:"rewards"}))},children:"Claim rewards"}),(0,n.jsx)(r.ZP,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"undelegate"}))},variant:"danger",children:"Undelegate"})]})})]})]})}),C=e=>{let{disabled:t,stakingRef:s,unbonding:i,validator:a}=e,{account:d,client:o,staking:u}=s,m=(0,x.P)(null==a?void 0:a.description.identity),h=i.validator;return(0,l.useEffect)(()=>{h&&(0,c.Dr)(h,u)},[h,u]),(0,n.jsxs)("div",{className:y,style:b,children:[(0,n.jsx)("div",{className:"flex items-center justify-start",children:(0,n.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:m,style:{height:50,width:50}})}),(0,n.jsx)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,n.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:(null==a?void 0:a.description.moniker)||""}),(0,n.jsx)(f.Z,{address:(null==a?void 0:a.operatorAddress)||""})]})}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(i.balance)})}),(0,n.jsx)("div",{className:"text-right",children:"Unbonding"}),(0,n.jsx)("div",{className:"text-right",children:(0,j.ts)(i.completionTime)}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(r.hp,{disabled:t,onClick:()=>{if(!o)return;let e={delegator:d.bech32Address||"",validator:i.validator};(0,p.rf)(e,o)},variant:"danger",children:"Cancel Unstake"})})]})},E=i.N,Z=i.N,I="grid w-full items-center justify-between gap-2 p-4 uppercase";t.ZP=(0,l.memo)(()=>{let e=(0,d.n)(),{staking:t}=e,[s,r]=(0,l.useState)("none"),[i,c]=(0,l.useState)("none"),o=(0,u.mM)(t.state),{delegations:x,unbondings:m}=t.state,h=!!(null==x?void 0:x.items.length),p=!!(null==m?void 0:m.items.length);return h||p?(0,n.jsxs)("div",{className:"flex h-full flex-1 flex-col items-end gap-[16px]",children:[h&&(()=>{let e=x.items.slice().sort((e,t)=>{switch(s){case"staked-asc":case"staked-desc":return(0,a.B)(e.balance.amount,t.balance.amount,"staked-asc"===s);case"rewards-asc":case"rewards-desc":return(0,a.B)(e.rewards.amount,t.rewards.amount,"rewards-asc"===s);case"commission-asc":case"commission-desc":{let n=o[e.validatorAddress],l=o[t.validatorAddress];return(0,a.B)(Number(null==n?void 0:n.commission.commissionRates.rate),Number(null==l?void 0:l.commission.commissionRates.rate),"commission-asc"===s)}default:return 0}});return(0,n.jsxs)("div",{className:w,children:[(0,n.jsxs)("div",{className:I,style:b,children:[(0,n.jsx)("div",{}),(0,n.jsx)(E,{children:"Delegations"}),(0,n.jsx)(E,{onSort:r,sort:s,sorting:["staked-asc","staked-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,n.jsx)(E,{onSort:r,sort:s,sorting:["commission-asc","commission-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Commission"})}),(0,n.jsx)(E,{onSort:r,sort:s,sorting:["rewards-asc","rewards-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Rewards"})})]}),e.map((e,s)=>(0,n.jsx)(S,{delegation:e,index:s,staking:t,validator:o[e.validatorAddress]},s))]})})(),p&&(()=>{let t=m.items.slice().sort((e,t)=>{switch(i){case"amount-asc":case"amount-desc":return(0,a.B)(Number(e.balance.amount),Number(t.balance.amount),"amount-asc"===i);case"completion-asc":case"completion-desc":return(0,a.B)(e.completionTime,t.completionTime,"completion-asc"===i);default:return 0}});return(0,n.jsxs)("div",{className:w,children:[(0,n.jsxs)("div",{className:I,style:b,children:[(0,n.jsx)("div",{}),(0,n.jsx)(Z,{children:"Unstakings"}),(0,n.jsx)(Z,{onSort:c,sort:i,sorting:["staked-asc","staked-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,n.jsx)(Z,{children:(0,n.jsx)("div",{className:"text-right",children:"Status"})}),(0,n.jsx)(Z,{onSort:c,sort:i,sorting:["date-asc","date-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Completion Time"})})]}),t.map((t,s)=>(0,n.jsx)(C,{stakingRef:e,unbonding:t,validator:o[t.validator]},s))]})})()]}):null})},42498:function(e,t,s){s.d(t,{I:function(){return l},i:function(){return r}});var n=s(3827);let l=()=>(0,n.jsx)("div",{className:"h-[1px] w-full bg-bg-400"}),r=()=>(0,n.jsx)("div",{className:"h-full w-[1px] bg-bg-400"})},71860:function(e,t,s){s.d(t,{Z:function(){return S}});var n=s(3827),l=s(64090),r=s(30298),i=s(98909),a=s(98245),c=s.n(a),d=s(77658);c().setAppElement(document.body);var o=e=>{let{children:t,...s}=e;return(0,l.useEffect)(()=>{if(s.isOpen){let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[s.isOpen]),(0,n.jsx)(c(),{...s,style:{content:{background:"rgba(0,0,0,0.8)",border:"none",borderRadius:"48px",bottom:"auto",boxShadow:"0px 0px 50px 0px #FFFFFF40",left:"50%",padding:"45px",right:"auto",top:"50%",transform:"translate(-50%, -50%)"},overlay:{backgroundColor:"rgba(0, 0, 0, 0.5)"}},children:(0,n.jsxs)("div",{className:"relative w-full",children:[(0,n.jsx)("button",{className:"absolute right-[-16px] top-[-16px] w-[36px] cursor-pointer",dangerouslySetInnerHTML:{__html:d.kC},onClick:s.onRequestClose}),t]})})},u=s(88197),x=s(80469),m=s(62986);let h=async(e,t)=>{let{client:s,staking:n}=e,{modal:l}=n.state,{delegations:i}=(null==l?void 0:l.content)||{};s&&(null==i?void 0:i.length)&&i.reduce(async(t,n)=>{await t;let l={delegator:e.account.bech32Address,validator:n.validatorAddress};return(0,u.sT)(l,s,e.staking)},Promise.resolve()).then(()=>{t("completed")}).catch(()=>{(0,r.Am)("There was an unexpected error claiming your rewards. Please try again later.",{type:"error"})})};var p=(0,l.memo)(()=>{let e=(0,x.n)(),[t,s]=(0,l.useState)("loading"),r=(0,l.useRef)(!1),{staking:a}=e,{modal:c}=a.state,d=(null==c?void 0:c.type)==="rewards";if((0,l.useEffect)(()=>{d&&!r.current&&(r.current=!0,h(e,s))},[d,e]),!d)return null;let u="loading"===t?(0,n.jsxs)("div",{className:"w-full text-center",children:[(0,n.jsx)("div",{className:"mb-[16px] uppercase",children:(0,n.jsx)(i.ls,{children:"CLAIMING"})}),(0,n.jsx)("div",{className:"mb-[16px] text-typo-100",children:"Wait until your rewards are withdrawn."}),(0,n.jsx)(i.zx,{isLoading:!0})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px] uppercase",children:(0,n.jsx)(i.ls,{children:"Success!"})}),(0,n.jsx)("div",{className:"mb-[16px] text-typo-100",children:"You have claimed your staking rewards successfully."})]}),(0,n.jsx)(i.zx,{onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]});return(0,n.jsx)(o,{isOpen:d,onRequestClose:()=>{"loading"!==t&&e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:u})})}),j=s(22840),f=s(39730),v=s(66803),g=s(9016),N=s(67497);let b="input";var y=()=>{let e=(0,x.n)(),{client:t}=e,[s,a]=(0,l.useState)(b),[c,d]=(0,l.useState)(!1),[h,p]=(0,l.useState)(""),[y,w]=(0,l.useState)(""),[k,S]=(0,l.useState)({amount:void 0,memo:void 0}),{account:C,staking:E}=e,{modal:Z}=E.state,I=(null==Z?void 0:Z.type)==="delegate";if((0,l.useEffect)(()=>()=>{a(b),S({}),p(""),w("")},[I]),!I)return null;let{validator:A}=null==Z?void 0:Z.content;if(!A)return null;let F=new j.Z(h),O=F.isNaN()?"":F.times(g.Ex),z=Object.values(k).some(e=>!!e),B=(0,f.ap)(E.state);return(0,n.jsx)(o,{isOpen:I,onRequestClose:()=>{c||e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:(()=>{let l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-[32px] mt-[32px] flex w-full flex-col items-center justify-center gap-[12px]",children:[(0,n.jsx)(i.Bz,{children:"Staked Amount (XION)"}),(0,n.jsx)(i.XJ,{children:F.toString()}),O&&(0,n.jsxs)(i.Bz,{children:["$",(0,N.HS)(O)]})]}),!!y&&(0,n.jsx)("div",{className:"mb-[32px] text-center italic",children:(0,n.jsx)("div",{children:y})})]});if("completed"===s)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"SUCCESS!"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["You have successfully staked on"," ",A.description.moniker,". Thank you for contributing in securing the XION network."]})]}),l(),(0,n.jsx)(i.zx,{disabled:c,onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]});if("review"===s)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"REVIEW"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["Get ready to stake your XION token with"," ",A.description.moniker,". Press 'Confirm' to proceed."]})]}),l(),(0,n.jsx)(i.zx,{isLoading:c,onClick:()=>{if(!t)return;d(!0);let e={delegator:C.bech32Address,validator:A.operatorAddress};(0,u._5)(e,(0,v.Jp)(F),y,t,E).then(e=>(a("completed"),e())).catch(()=>{(0,r.Am)("Staking error",{type:"error"})}).finally(()=>{d(!1)})},children:"CONFIRM"})]});let o=()=>{if(!O||!B||F.isNaN()||F.gt(B))return S({...k,amount:"Invalid amount"}),!0};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"text-center uppercase",children:(0,n.jsxs)(i.ls,{children:["Delegate To ",A.description.moniker]})}),B&&(()=>{let e=B.times(g.Ex);return(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-col items-center justify-center gap-[12px] uppercase",children:[(0,n.jsx)(i.Bz,{children:"Available for delegation (XION)"}),(0,n.jsx)(i.XJ,{children:(0,N.HS)(B)}),(0,n.jsxs)(i.Bz,{children:["$",(0,N.HS)(e)]})]})})(),(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-row justify-between",children:[(0,n.jsx)("div",{children:"Amount"}),!!O&&(0,n.jsxs)(i.Bz,{children:["= $",(0,N.HS)(O)]})]}),(0,n.jsxs)("form",{onSubmit:e=>{null==e||e.stopPropagation(),null==e||e.preventDefault(),!o()&&(!t||z||F.lt(0)||a("review"))},children:[(0,n.jsxs)("div",{className:"mt-[8px]",children:[(0,n.jsx)(i.Wz,{disabled:c,error:!!k.amount,onBlur:()=>{o()},onChange:e=>{k.amount&&S({...k,amount:void 0}),p(e.target.value)},value:h}),k.amount&&(0,n.jsx)("div",{children:(0,n.jsx)(i.Xq,{children:k.amount})})]}),(0,n.jsx)("div",{className:"mt-[40px] w-full",children:(0,n.jsx)(i.sr,{disabled:c,onChange:e=>{w(e.target.value)},placeholder:"Memo (Optional)",value:y})}),(0,n.jsx)("div",{className:"mt-[48px] w-full",children:(0,n.jsx)(i.zx,{disabled:c||z,type:"submit",children:"DELEGATE NOW"})})]})]})})()})})};let w="input";var k=()=>{let e=(0,x.n)(),{client:t}=e,[s,a]=(0,l.useState)(w),[c,d]=(0,l.useState)(!1),[h,p]=(0,l.useState)({amount:void 0,memo:void 0}),[b,y]=(0,l.useState)(""),[k,S]=(0,l.useState)(""),{account:C,staking:E}=e,{modal:Z}=E.state,I=(null==Z?void 0:Z.type)==="undelegate";if((0,l.useEffect)(()=>()=>{a(w),y(""),p({}),S("")},[I]),!I)return null;let{validator:A}=null==Z?void 0:Z.content;if(!A)return null;let F=new j.Z(b),O=F.isNaN()?"":F.times(g.Ex),z=(0,f.U2)(E.state,A.operatorAddress),B=()=>{if(!O||!z||F.lte(0)||F.gt(new j.Z(z.amount)))return p({...h,amount:"Invalid amount"}),!0},R=e=>{null==e||e.stopPropagation(),null==e||e.preventDefault(),!B()&&t&&F.gt(0)&&a("review")};return(0,n.jsx)(o,{isOpen:I,onRequestClose:()=>{c||e.staking.dispatch((0,m.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:(()=>{let l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-[32px] mt-[32px] flex w-full flex-col items-center justify-center gap-[12px]",children:[(0,n.jsx)(i.Bz,{children:"Unstaking Amount (XION)"}),(0,n.jsx)(i.XJ,{children:(0,N.HS)(F)}),(0,n.jsx)(i.Bz,{children:(0,N.H_)((0,v.Jp)(F))})]}),!!k&&(0,n.jsx)("div",{className:"mb-[32px] text-center italic",children:(0,n.jsx)("div",{children:k})})]});return"completed"===s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"SUCCESS!"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["You have successfully unstaked from"," ",A.description.moniker,". It takes ",g.Mx," ","days to complete the unstaking process"]})]}),l(),(0,n.jsx)(i.zx,{disabled:c,onClick:()=>{e.staking.dispatch((0,m.ZG)(null))},children:"CLOSE"})]}):"review"===s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(i.ls,{children:"REVIEW"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["Unstaking your XION Token means you'll stop earning rewards. Remember, it takes ",g.Mx," days to complete the unstaking process."]})]}),l(),(0,n.jsx)(i.zx,{isLoading:c,onClick:()=>{if(!t)return;d(!0);let e={delegator:C.bech32Address,validator:A.operatorAddress};(0,u.xu)(e,(0,v.Jp)(F),k,t,E).then(e=>(a("completed"),e())).catch(()=>{(0,r.Am)("Staking error",{type:"error"})}).finally(()=>{d(!1)})},children:"CONFIRM"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"text-center uppercase",children:(0,n.jsxs)(i.ls,{children:["Unstake From ",A.description.moniker]})}),z&&(()=>{let e=new j.Z(z.amount).times(g.Ex);return(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-col items-center justify-center gap-[12px] uppercase",children:[(0,n.jsx)(i.Bz,{children:"Available amount (XION)"}),(0,n.jsx)(i.XJ,{children:(0,N.HS)(new j.Z(z.amount))}),(0,n.jsxs)(i.Bz,{children:["$",(0,N.HS)(e)]})]})})(),(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-row justify-between",children:[(0,n.jsx)("div",{children:"Amount"}),!!O&&(0,n.jsxs)(i.Bz,{children:["=$",(0,N.HS)(O)]})]}),(0,n.jsxs)("form",{onSubmit:R,children:[(0,n.jsxs)("div",{className:"mt-[8px]",children:[(0,n.jsx)(i.Wz,{disabled:c,onBlur:()=>{B()},onChange:e=>{h.amount&&p({...h,amount:void 0}),y(e.target.value)},value:b}),h.amount&&(0,n.jsx)("div",{children:(0,n.jsx)(i.Xq,{children:h.amount})})]}),(0,n.jsx)("div",{className:"mt-[40px] w-full",children:(0,n.jsx)(i.sr,{disabled:c,onChange:e=>{S(e.target.value)},placeholder:"Memo (Optional)",value:k})}),(0,n.jsx)("div",{className:"mt-[48px] w-full",children:(0,n.jsx)(i.zx,{disabled:c,type:"submit",children:"Unstake Now"})})]})]})})()})})},S=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y,{}),(0,n.jsx)(k,{}),(0,n.jsx)(p,{})]})},48074:function(e,t,s){var n=s(3827);t.Z=e=>{let{text:t}=e,[s,l]=t.split(" ");return(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{children:s})," ",(0,n.jsx)("span",{className:"text-typo-200",children:l})]})}},89056:function(e,t,s){s.d(t,{P:function(){return a}});var n=s(64090),l=s(9016);let r={},i={getIdentityLogo:e=>{if(r[e])return r[e];let t=fetch("https://keybase.io/_/api/1.0/user/lookup.json?key_suffix=".concat(e)).then(e=>e.json()).then(e=>{var t,s,n,l;return(null==e?void 0:null===(l=e.them)||void 0===l?void 0:null===(n=l[0])||void 0===n?void 0:null===(s=n.pictures)||void 0===s?void 0:null===(t=s.primary)||void 0===t?void 0:t.url)||null}).catch(()=>null);return r[e]=t,t}},a=e=>{let[t,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(async()=>{e&&s(await i.getIdentityLogo(e))})()},[e]),t||l.c1}},67497:function(e,t,s){s.d(t,{Em:function(){return i},HS:function(){return c},H_:function(){return o},PV:function(){return x},gg:function(){return a},i:function(){return d},ts:function(){return u}});var n=s(22840),l=s(66803),r=s(9016);let i=(e,t)=>{let s=(0,l.bI)(e),r=new n.Z(s.amount);if(r.eq(0))return"".concat(r.toFormat()," ").concat(s.denom);if(r.lt(1e-4))return"<".concat(1e-4," ").concat(s.denom);if(t){let e=Intl.NumberFormat("en",{notation:"compact"});return"".concat(e.format(r.toNumber())," ").concat(s.denom)}return"".concat(r.toFormat(4)," ").concat(s.denom)},a=e=>{if("number"!=typeof e||Number.isNaN(e))return null;let t=e<1e-4?"<0.1":(100*e).toFixed(1);return"".concat(t,"%")},c=e=>Intl.NumberFormat("en",{notation:"compact"}).format(e.toNumber()),d=(e,t)=>{let s=new n.Z(e).div(new n.Z(10).pow(18)).toNumber();return"".concat((100*s).toFixed(t),"%")},o=(e,t)=>{let s=(0,l.bI)(e||(0,l.IB)()),i=new n.Z(e?s.amount:0).times(r.Ex);return i.eq(0)?"$0":!t&&i.lt(.01)?"<$0.01":"$".concat(t?c(i):i.toFormat(2))},u=e=>{let t=1e3*e,s=Math.floor((t-Date.now())/864e5),n=new Date(t).toLocaleString("default",{month:"short"}),l=new Date(t).getDate(),r=new Date(t).getFullYear();return"in ".concat(s," day").concat(1===s?"":"s",", ").concat(n," ").concat(l," ").concat(r)},x=e=>e?"".concat(e.times(100).toFixed(2),"%"):"-"}}]); \ No newline at end of file diff --git a/_next/static/chunks/503-59dce0c9fc83ff1c.js b/_next/static/chunks/503-59dce0c9fc83ff1c.js deleted file mode 100644 index b0d5534..0000000 --- a/_next/static/chunks/503-59dce0c9fc83ff1c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[503],{143:function(e,t,s){s.d(t,{N:function(){return r}});var n=s(3827),l=s(77658);let r=e=>{let{children:t,onSort:s,sort:r,sorting:i}=e,a=(i||[]).concat(["none"]),c=r?a.indexOf(r):-1;return(0,n.jsx)("div",{className:"text-[14px] font-normal leading-[14px] tracking-wider",children:(0,n.jsxs)("span",{className:"relative",children:[t," ",!!s&&!!r&&(0,n.jsx)("button",{className:"absolute right-[-16px] top-[6px] cursor-pointer",dangerouslySetInnerHTML:{__html:l.Sf},onClick:()=>{if(!s)return;let e=(1+a.indexOf(r))%a.length,t=a[e];null==s||s(t)},style:{rotate:0===c?"180deg":1===c?"0deg":"90deg"}})]})})}},80148:function(e,t,s){s.d(t,{B:function(){return l}});var n=s(22840);let l=(e,t,s)=>typeof e!=typeof t?0:"string"==typeof e?s?e.localeCompare(t):t.localeCompare(e):"number"==typeof e?Number.isNaN(e)||Number.isNaN(t)?0:s?e-t:t-e:e instanceof n.Z&&t instanceof n.Z?s?e.minus(t).toNumber():t.minus(e).toNumber():0},26605:function(e,t,s){var n=s(3827),l=s(30298);t.Z=e=>{let{address:t}=e;if(!t)return null;let s=[t.slice(0,5),t.slice(t.length-5)].join("...");return(0,n.jsx)("button",{className:"cursor-pointer text-left text-[12px] font-normal leading-[20px] text-typo-200",onClick:()=>{navigator.clipboard.writeText(t),(0,l.Am)("Copied to clipboard",{type:"info"})},children:s})}},62948:function(e,t,s){s.d(t,{S6:function(){return g},sv:function(){return N}});var n=s(3827),l=s(64090),r=s(98909),i=s(143),a=s(80148),c=s(88197),d=s(80469),o=s(62986),u=s(39730),x=s(89056),m=s(66803),p=s(77658),h=s(19807),j=s(67497),f=s(26605),v=s(48074);let g=e=>{let t=(0,u.jv)(e,null),s=(0,u.U2)(e,null);return(0,m.UO)(t)||(0,m.UO)(s)},N=e=>{let{isShowingDetails:t,setIsShowingDetails:s}=e;return(0,n.jsxs)("button",{className:"text-primary-500 flex flex-row items-center gap-2",onClick:()=>{s(!t)},children:[t?"Hide details":"Show details",(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:p.cx},style:{transform:"rotate(".concat(t?"0deg":"180deg",")")}})]})},b={gap:"16px",gridTemplateColumns:"60px 1.5fr repeat(4, 1fr)"},y="grid w-full items-center justify-between gap-2 p-2 mb-[24px] last:mb-[0px] bg-black rounded-[8px]",w="w-full overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100 px-[16px]",k=()=>(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:p.GI}}),S=(0,l.memo)(e=>{let{delegation:t,disabled:s,index:i,staking:a,validator:d}=e,{validatorAddress:u}=t;(0,l.useEffect)(()=>{u&&(0,c.Dr)(u,a)},[u,a]);let m=(0,x.P)(null==d?void 0:d.description.identity);return(0,n.jsxs)("div",{className:y,style:b,children:[(0,n.jsx)("div",{className:"flex items-center justify-start",children:(0,n.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:m,style:{height:50,width:50}})}),(0,n.jsx)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,n.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:(null==d?void 0:d.description.moniker)||""}),(0,n.jsx)(f.Z,{address:(null==d?void 0:d.operatorAddress)||""})]})}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(t.balance)})}),(0,n.jsx)("div",{className:"text-right",children:d?(0,j.i)(d.commission.commissionRates.rate,0):""}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(t.rewards)})}),(0,n.jsxs)("div",{className:"flex flex-row items-center justify-end gap-[8px]",children:[(0,n.jsx)(r.hp,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"delegate"}))},children:"Delegate"}),(0,n.jsx)(r.Rk,{Trigger:k,id:"delegation-".concat(i),children:(0,n.jsxs)("div",{className:"flex flex-col gap-[12px] rounded-[8px] bg-bg-600 py-[4px]",children:[(0,n.jsx)(r.ZP,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"rewards"}))},children:"Claim rewards"}),(0,n.jsx)(r.ZP,{disabled:s,onClick:()=>{d&&a.dispatch((0,o.ZG)({content:{validator:d},type:"undelegate"}))},variant:"danger",children:"Undelegate"})]})})]})]})}),C=e=>{let{disabled:t,stakingRef:s,unbonding:i,validator:a}=e,{client:d,staking:o}=s,u=(0,x.P)(null==a?void 0:a.description.identity),m=i.validator;return(0,l.useEffect)(()=>{m&&(0,c.Dr)(m,o)},[m,o]),(0,n.jsxs)("div",{className:y,style:b,children:[(0,n.jsx)("div",{className:"flex items-center justify-start",children:(0,n.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:u,style:{height:50,width:50}})}),(0,n.jsx)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:(0,n.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,n.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:(null==a?void 0:a.description.moniker)||""}),(0,n.jsx)(f.Z,{address:(null==a?void 0:a.operatorAddress)||""})]})}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(v.Z,{text:(0,j.Em)(i.balance)})}),(0,n.jsx)("div",{className:"text-right",children:"Unbonding"}),(0,n.jsx)("div",{className:"text-right",children:(0,j.ts)(i.completionTime)}),(0,n.jsx)("div",{className:"text-right",children:(0,n.jsx)(r.hp,{disabled:t,onClick:()=>{var e;if(!d)return;let t={delegator:(null===(e=o.state.tokens)||void 0===e?void 0:e.denom)||"",validator:i.validator};(0,h.rf)(t,d)},variant:"danger",children:"Cancel Unstake"})})]})},Z=i.N,E=i.N,I="grid w-full items-center justify-between gap-2 p-4 uppercase";t.ZP=(0,l.memo)(()=>{let e=(0,d.n)(),{staking:t}=e,[s,r]=(0,l.useState)("none"),[i,c]=(0,l.useState)("none"),o=(0,u.mM)(t.state),{delegations:x,unbondings:m}=t.state,p=!!(null==x?void 0:x.items.length),h=!!(null==m?void 0:m.items.length);return p||h?(0,n.jsxs)("div",{className:"flex h-full flex-1 flex-col items-end gap-[16px]",children:[p&&(()=>{let e=x.items.slice().sort((e,t)=>{switch(s){case"staked-asc":case"staked-desc":return(0,a.B)(e.balance.amount,t.balance.amount,"staked-asc"===s);case"rewards-asc":case"rewards-desc":return(0,a.B)(e.rewards.amount,t.rewards.amount,"rewards-asc"===s);case"commission-asc":case"commission-desc":{let n=o[e.validatorAddress],l=o[t.validatorAddress];return(0,a.B)(Number(null==n?void 0:n.commission.commissionRates.rate),Number(null==l?void 0:l.commission.commissionRates.rate),"commission-asc"===s)}default:return 0}});return(0,n.jsxs)("div",{className:w,children:[(0,n.jsxs)("div",{className:I,style:b,children:[(0,n.jsx)("div",{}),(0,n.jsx)(Z,{children:"Delegations"}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["staked-asc","staked-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["commission-asc","commission-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Commission"})}),(0,n.jsx)(Z,{onSort:r,sort:s,sorting:["rewards-asc","rewards-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Rewards"})})]}),e.map((e,s)=>(0,n.jsx)(S,{delegation:e,index:s,staking:t,validator:o[e.validatorAddress]},s))]})})(),h&&(()=>{let t=m.items.slice().sort((e,t)=>{switch(i){case"amount-asc":case"amount-desc":return(0,a.B)(Number(e.balance.amount),Number(t.balance.amount),"amount-asc"===i);case"completion-asc":case"completion-desc":return(0,a.B)(e.completionTime,t.completionTime,"completion-asc"===i);default:return 0}});return(0,n.jsxs)("div",{className:w,children:[(0,n.jsxs)("div",{className:I,style:b,children:[(0,n.jsx)("div",{}),(0,n.jsx)(E,{children:"Unstakings"}),(0,n.jsx)(E,{onSort:c,sort:i,sorting:["staked-asc","staked-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,n.jsx)(E,{children:(0,n.jsx)("div",{className:"text-right",children:"Status"})}),(0,n.jsx)(E,{onSort:c,sort:i,sorting:["date-asc","date-desc"],children:(0,n.jsx)("div",{className:"text-right",children:"Completion Time"})})]}),t.map((t,s)=>(0,n.jsx)(C,{stakingRef:e,unbonding:t,validator:o[t.validator]},s))]})})()]}):null})},42498:function(e,t,s){s.d(t,{I:function(){return l},i:function(){return r}});var n=s(3827);let l=()=>(0,n.jsx)("div",{className:"h-[1px] w-full bg-bg-400"}),r=()=>(0,n.jsx)("div",{className:"h-full w-[1px] bg-bg-400"})},71860:function(e,t,s){s.d(t,{Z:function(){return S}});var n=s(3827),l=s(64090),r=s(98909),i=s(98245),a=s.n(i),c=s(77658);a().setAppElement(document.body);var d=e=>{let{children:t,...s}=e;return(0,l.useEffect)(()=>{if(s.isOpen){let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[s.isOpen]),(0,n.jsx)(a(),{...s,style:{content:{background:"rgba(0,0,0,0.8)",border:"none",borderRadius:"48px",bottom:"auto",boxShadow:"0px 0px 50px 0px #FFFFFF40",left:"50%",padding:"45px",right:"auto",top:"50%",transform:"translate(-50%, -50%)"},overlay:{backgroundColor:"rgba(0, 0, 0, 0.5)"}},children:(0,n.jsxs)("div",{className:"relative w-full",children:[(0,n.jsx)("button",{className:"absolute right-[-16px] top-[-16px] w-[36px] cursor-pointer",dangerouslySetInnerHTML:{__html:c.kC},onClick:s.onRequestClose}),t]})})},o=s(88197),u=s(80469),x=s(62986);let m=async(e,t)=>{let{client:s,staking:n}=e,{modal:l}=n.state,r=null==l?void 0:l.content.validator.operatorAddress;if(!s||!r)return;let i={delegator:e.account.bech32Address,validator:r};(0,o.sT)(i,s,e.staking).finally(()=>{t("completed")})};var p=(0,l.memo)(()=>{let e=(0,u.n)(),[t,s]=(0,l.useState)("loading"),i=(0,l.useRef)(!1),{staking:a}=e,{modal:c}=a.state,o=(null==c?void 0:c.type)==="rewards";if((0,l.useEffect)(()=>{o&&!i.current&&(i.current=!0,m(e,s))},[o,e]),!o)return null;let p="loading"===t?(0,n.jsxs)("div",{className:"w-full text-center",children:[(0,n.jsx)("div",{className:"mb-[16px] uppercase",children:(0,n.jsx)(r.ls,{children:"CLAIMING"})}),(0,n.jsx)("div",{className:"mb-[16px] text-typo-100",children:"Wait until your rewards are withdrawn."}),(0,n.jsx)(r.zx,{isLoading:!0})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px] uppercase",children:(0,n.jsx)(r.ls,{children:"Success!"})}),(0,n.jsx)("div",{className:"mb-[16px] text-typo-100",children:"You have claimed your staking rewards successfully."})]}),(0,n.jsx)(r.zx,{onClick:()=>{e.staking.dispatch((0,x.ZG)(null))},children:"CLOSE"})]});return(0,n.jsx)(d,{isOpen:o,onRequestClose:()=>{"loading"!==t&&e.staking.dispatch((0,x.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:p})})}),h=s(22840),j=s(30298),f=s(39730),v=s(66803),g=s(9016),N=s(67497);let b="input";var y=()=>{let e=(0,u.n)(),{client:t}=e,[s,i]=(0,l.useState)(b),[a,c]=(0,l.useState)(!1),[m,p]=(0,l.useState)(""),[y,w]=(0,l.useState)(""),[k,S]=(0,l.useState)({amount:void 0,memo:void 0}),{account:C,staking:Z}=e,{modal:E}=Z.state,I=(null==E?void 0:E.type)==="delegate";if((0,l.useEffect)(()=>()=>{i(b),S({}),p(""),w("")},[I]),!I)return null;let{validator:F}=null==E?void 0:E.content,A=new h.Z(m),O=A.isNaN()?"":A.times(g.Ex),z=Object.values(k).some(e=>!!e),B=(0,f.ap)(Z.state);return(0,n.jsx)(d,{isOpen:I,onRequestClose:()=>{a||e.staking.dispatch((0,x.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:(()=>{let l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-[32px] mt-[32px] flex w-full flex-col items-center justify-center gap-[12px]",children:[(0,n.jsx)(r.Bz,{children:"Staked Amount (XION)"}),(0,n.jsx)(r.XJ,{children:A.toString()}),O&&(0,n.jsxs)(r.Bz,{children:["$",(0,N.HS)(O)]})]}),!!y&&(0,n.jsx)("div",{className:"mb-[32px] text-center italic",children:(0,n.jsx)("div",{children:y})})]});if("completed"===s)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(r.ls,{children:"SUCCESS!"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["You have successfully staked on"," ",F.description.moniker,". Thank you for contributing in securing the XION network."]})]}),l(),(0,n.jsx)(r.zx,{disabled:a,onClick:()=>{e.staking.dispatch((0,x.ZG)(null))},children:"CLOSE"})]});if("review"===s)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(r.ls,{children:"REVIEW"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["Get ready to stake your XION token with"," ",F.description.moniker,". Press 'Confirm' to proceed."]})]}),l(),(0,n.jsx)(r.zx,{isLoading:a,onClick:()=>{if(!t)return;c(!0);let e={delegator:C.bech32Address,validator:F.operatorAddress};(0,o._5)(e,(0,v.Jp)(A),y,t,Z).then(e=>(i("completed"),e())).catch(()=>{(0,j.Am)("Staking error",{type:"error"})}).finally(()=>{c(!1)})},children:"CONFIRM"})]});let d=()=>!O||!B||A.isNaN()||A.gt(B);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"text-center uppercase",children:(0,n.jsxs)(r.ls,{children:["Delegate To ",F.description.moniker]})}),B&&(()=>{let e=B.times(g.Ex);return(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-col items-center justify-center gap-[12px] uppercase",children:[(0,n.jsx)(r.Bz,{children:"Available for delegation (XION)"}),(0,n.jsx)(r.XJ,{children:(0,N.HS)(B)}),(0,n.jsxs)(r.Bz,{children:["$",(0,N.HS)(e)]})]})})(),(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-row justify-between",children:[(0,n.jsx)("div",{children:"Amount"}),!!O&&(0,n.jsxs)(r.Bz,{children:["= $",(0,N.HS)(O)]})]}),(0,n.jsxs)("form",{onSubmit:e=>{null==e||e.stopPropagation(),null==e||e.preventDefault(),!t||z||d()||A.lt(0)||i("review")},children:[(0,n.jsxs)("div",{className:"mt-[8px]",children:[(0,n.jsx)(r.Wz,{disabled:a,error:!!k.amount,onBlur:()=>{d()&&S({...k,amount:"Invalid amount"})},onChange:e=>{k.amount&&S({...k,amount:void 0}),p(e.target.value)},value:m}),k.amount&&(0,n.jsx)("div",{children:(0,n.jsx)(r.Xq,{children:k.amount})})]}),(0,n.jsx)("div",{className:"mt-[40px] w-full",children:(0,n.jsx)(r.sr,{disabled:a,onChange:e=>{w(e.target.value)},placeholder:"Memo (Optional)",value:y})}),(0,n.jsx)("div",{className:"mt-[48px] w-full",children:(0,n.jsx)(r.zx,{disabled:a||z,type:"submit",children:"Delegate Now"})})]})]})})()})})};let w="input";var k=()=>{let e=(0,u.n)(),{client:t}=e,[s,i]=(0,l.useState)(w),[a,c]=(0,l.useState)(!1),[m,p]=(0,l.useState)(""),[b,y]=(0,l.useState)(""),{account:k,staking:S}=e,{modal:C}=S.state,Z=(null==C?void 0:C.type)==="undelegate";if((0,l.useEffect)(()=>()=>{i(w),p(""),y("")},[Z]),!Z)return null;let{validator:E}=null==C?void 0:C.content,I=new h.Z(m),F=I.isNaN()?"":I.times(g.Ex),A=(0,f.U2)(S.state,E.operatorAddress),O=e=>{null==e||e.stopPropagation(),null==e||e.preventDefault(),t&&I.gt(0)&&i("review")};return(0,n.jsx)(d,{isOpen:Z,onRequestClose:()=>{a||e.staking.dispatch((0,x.ZG)(null))},children:(0,n.jsx)("div",{className:"min-w-[390px]",children:(()=>{let l=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-[32px] mt-[32px] flex w-full flex-col items-center justify-center gap-[12px]",children:[(0,n.jsx)(r.Bz,{children:"Unstaking Amount (XION)"}),(0,n.jsx)(r.XJ,{children:(0,N.HS)(I)}),(0,n.jsx)(r.Bz,{children:(0,N.H_)((0,v.Jp)(I))})]}),!!b&&(0,n.jsx)("div",{className:"mb-[32px] text-center italic",children:(0,n.jsx)("div",{children:b})})]});return"completed"===s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(r.ls,{children:"SUCCESS!"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["You have successfully unstaked from"," ",E.description.moniker,". It takes ",g.Mx," ","days to complete the unstaking process"]})]}),l(),(0,n.jsx)(r.zx,{disabled:a,onClick:()=>{e.staking.dispatch((0,x.ZG)(null))},children:"CLOSE"})]}):"review"===s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"mb-[16px]",children:(0,n.jsx)(r.ls,{children:"REVIEW"})}),(0,n.jsxs)("div",{className:"text-typo-100",children:["Unstaking your XION Token means you'll stop earning rewards. Remember, it takes ",g.Mx," days to complete the unstaking process."]})]}),l(),(0,n.jsx)(r.zx,{isLoading:a,onClick:()=>{if(!t)return;c(!0);let e={delegator:k.bech32Address,validator:E.operatorAddress};(0,o.xu)(e,(0,v.Jp)(I),b,t,S).then(e=>(i("completed"),e())).catch(()=>{(0,j.Am)("Staking error",{type:"error"})}).finally(()=>{c(!1)})},children:"CONFIRM"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"text-center uppercase",children:(0,n.jsxs)(r.ls,{children:["Unstake From ",E.description.moniker]})}),A&&(()=>{let e=new h.Z(A.amount).times(g.Ex);return(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-col items-center justify-center gap-[12px] uppercase",children:[(0,n.jsx)(r.Bz,{children:"Available amount (XION)"}),(0,n.jsx)(r.XJ,{children:(0,N.HS)(new h.Z(A.amount))}),(0,n.jsxs)(r.Bz,{children:["$",(0,N.HS)(e)]})]})})(),(0,n.jsxs)("div",{className:"mt-[40px] flex w-full flex-row justify-between",children:[(0,n.jsx)("div",{children:"Amount"}),!!F&&(0,n.jsxs)(r.Bz,{children:["=$",(0,N.HS)(F)]})]}),(0,n.jsxs)("form",{onSubmit:O,children:[(0,n.jsx)("div",{className:"mt-[8px]",children:(0,n.jsx)(r.Wz,{disabled:a,onChange:e=>{p(e.target.value)},value:m})}),(0,n.jsx)("div",{className:"mt-[40px] w-full",children:(0,n.jsx)(r.sr,{disabled:a,onChange:e=>{y(e.target.value)},placeholder:"Memo (Optional)",value:b})}),(0,n.jsx)("div",{className:"mt-[48px] w-full",children:(0,n.jsx)(r.zx,{disabled:a,type:"submit",children:"Unstake Now"})})]})]})})()})})},S=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y,{}),(0,n.jsx)(k,{}),(0,n.jsx)(p,{})]})},48074:function(e,t,s){var n=s(3827);t.Z=e=>{let{text:t}=e,[s,l]=t.split(" ");return(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{children:s})," ",(0,n.jsx)("span",{className:"text-typo-200",children:l})]})}},89056:function(e,t,s){s.d(t,{P:function(){return a}});var n=s(64090),l=s(9016);let r={},i={getIdentityLogo:e=>{if(r[e])return r[e];let t=fetch("https://keybase.io/_/api/1.0/user/lookup.json?key_suffix=".concat(e)).then(e=>e.json()).then(e=>{var t,s,n,l;return(null==e?void 0:null===(l=e.them)||void 0===l?void 0:null===(n=l[0])||void 0===n?void 0:null===(s=n.pictures)||void 0===s?void 0:null===(t=s.primary)||void 0===t?void 0:t.url)||null}).catch(()=>null);return r[e]=t,t}},a=e=>{let[t,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(async()=>{e&&s(await i.getIdentityLogo(e))})()},[e]),t||l.c1}},67497:function(e,t,s){s.d(t,{Em:function(){return i},HS:function(){return c},H_:function(){return o},gg:function(){return a},i:function(){return d},ts:function(){return u}});var n=s(22840),l=s(66803),r=s(9016);let i=(e,t)=>{let s=(0,l.bI)(e),r=new n.Z(s.amount);if(r.eq(0))return"".concat(r.toFormat()," ").concat(s.denom);if(r.lt(1e-4))return"<".concat(1e-4," ").concat(s.denom);if(t){let e=Intl.NumberFormat("en",{notation:"compact"});return"".concat(e.format(r.toNumber())," ").concat(s.denom)}return"".concat(r.toFormat(4)," ").concat(s.denom)},a=e=>{if("number"!=typeof e||Number.isNaN(e))return null;let t=e<1e-4?"<0.1":(100*e).toFixed(1);return"".concat(t,"%")},c=e=>Intl.NumberFormat("en",{notation:"compact"}).format(e.toNumber()),d=(e,t)=>{let s=new n.Z(e).div(new n.Z(10).pow(18)).toNumber();return"".concat((100*s).toFixed(t),"%")},o=(e,t)=>{let s=(0,l.bI)(e||(0,l.IB)()),i=new n.Z(e?s.amount:0).times(r.Ex);return i.eq(0)?"$0":!t&&i.lt(.01)?"<$0.01":"$".concat(t?c(i):i.toFormat(2))},u=e=>{let t=1e3*e,s=Math.floor((t-Date.now())/864e5),n=new Date(t).toLocaleString("default",{month:"short"}),l=new Date(t).getDate(),r=new Date(t).getFullYear();return"in ".concat(s," day").concat(1===s?"":"s",", ").concat(n," ").concat(l," ").concat(r)}}}]); \ No newline at end of file diff --git a/_next/static/chunks/816-cac8172353521c02.js b/_next/static/chunks/816-cac8172353521c02.js new file mode 100644 index 0000000..b485b89 --- /dev/null +++ b/_next/static/chunks/816-cac8172353521c02.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[816],{46601:function(){},89214:function(){},42480:function(){},85568:function(){},69386:function(){},31616:function(){},20131:function(){},16026:function(){},33370:function(){},98909:function(t,e,n){"use strict";n.d(e,{Bz:function(){return m},Dx:function(){return g},M5:function(){return b},Mj:function(){return S},OL:function(){return v},Rk:function(){return O},Wz:function(){return y},XJ:function(){return f},Xq:function(){return N},ZP:function(){return x},hp:function(){return w},jr:function(){return h},ls:function(){return p},sr:function(){return _},zx:function(){return A}});var r=n(3827),a=n(20996),i=n(32283),o=n(8792),l=n(64090),s=n(30298),u=n(77658),d=n(6245),c=n(97573);let g=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-title",n].join(" "),children:e})},p=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-hero",n].join(" "),children:e})},f=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["heading2",n].join(" "),children:e})},m=t=>{let{children:e,className:n="",color:a="text-typo-150"}=t;return(0,r.jsx)("div",{className:["heading8",a,n].join(" "),children:e})},h=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-body-medium",n].join(" "),children:e})},v=t=>{let{children:e,href:n}=t;return(0,r.jsx)(o.default,{className:"text-left font-normal leading-[24px] underline",href:n,children:e})},w=t=>{let{className:e,variant:n,...a}=t;return(0,r.jsx)("button",{...a,className:["cursor-pointer rounded-full bg-bg-550 px-[8px] py-[4px] text-white hover:bg-bg-600 disabled:cursor-not-allowed disabled:bg-bg-600 disabled:text-typo-150","danger"===n?"[&]:text-danger":"",e].join(" ")})},x=t=>{let{className:e,variant:n,...a}=t;return(0,r.jsx)("button",{...a,className:["cursor-pointer rounded-full bg-transparent px-[8px] py-[4px] text-white disabled:cursor-not-allowed disabled:bg-bg-600 disabled:text-typo-150","danger"===n?"[&]:text-danger":"",e].join(" ")})},b=t=>{let{textToCopy:e}=t;return(0,r.jsx)("button",{className:"cursor-pointer",dangerouslySetInnerHTML:{__html:u.BR},onClick:()=>{navigator.clipboard.writeText(e),(0,s.Am)("Copied to clipboard",{type:"info"})}})},y=t=>{let{error:e,...n}=t;return(0,r.jsxs)("span",{className:"relative block",children:[(0,r.jsx)("input",{...n,className:["h-[96px] w-full rounded-[16px] border-[1px] bg-black p-[16px] pr-[140px] text-[48px] focus:outline-none",e?"border-danger":"border-white"].join(" ")}),(0,r.jsx)("span",{className:"absolute bottom-0 right-[12px] top-0 flex h-full items-center text-[48px] text-typo-300",children:"XION"})]})},N=t=>{let{children:e}=t;return(0,r.jsx)("div",{className:"text-danger",children:e})},_=t=>(0,r.jsx)("input",{...t,className:"h-[50px] w-full bg-black py-[8px] focus:outline-none",style:{border:"none",borderBottom:"1px solid white"}}),A=t=>{let{className:e,isLoading:n,variant:a,...i}=t;return(0,r.jsx)("button",{...i,className:["w-full rounded-[8px] px-[12px] py-[16px] text-black disabled:cursor-not-allowed","danger"===a?"text-danger disabled:text-typo-150 bg-[#D745061A]":"success"===a?"bg-success text-black disabled:bg-green-400":"bg-white text-black disabled:bg-bg-400",e||""].join(" "),disabled:n||i.disabled,children:n?(0,r.jsx)("span",{className:"flex items-center justify-center",children:(0,r.jsx)("span",{className:"animate-spin",dangerouslySetInnerHTML:{__html:u._m}})}):i.children})},O=t=>{let{children:e,className:n,id:o,modalClass:s,offset:u,placement:g,Trigger:p}=t,[f,m]=(0,l.useState)(null),{core:h}=(0,d.l)(),v=h.state.popupOpenId===o;return(0,r.jsxs)("div",{className:[n].join(" "),children:[(0,r.jsx)("button",{onClick:t=>{t.stopPropagation(),h.dispatch((0,c.h)(o))},ref:m,children:(0,r.jsx)(p,{id:o})}),v&&(0,r.jsx)(a.d,{onClickAway:()=>{v&&h.dispatch((0,c.h)(null))},children:(0,r.jsx)(i.G,{anchor:f,className:[s].join(" "),offset:u,open:v,placement:g,withTransition:!0,children:e})})]})},S=t=>(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"z-5 absolute bottom-[5px] left-0",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:u.yC}})}),(0,r.jsx)("input",{...t,className:"border-b-[1px] border-b-transparent bg-transparent pl-[24px] text-white outline-none hover:border-b-white focus:border-b-white"})]})},6245:function(t,e,n){"use strict";n.d(e,{l:function(){return i}});var r=n(64090),a=n(34417);let i=()=>{let t=(0,r.useRef)({}),e=(0,r.useContext)(a._);return t.current.state=e.state,t.current.dispatch=e.dispatch,{core:t.current}}},97573:function(t,e,n){"use strict";n.d(e,{I:function(){return a},h:function(){return r}});let r=t=>({content:t,type:"SET_POPUP_OPEN_ID"}),a=(t,e)=>{switch(e.type){case"SET_POPUP_OPEN_ID":return{...t,popupOpenId:e.content};case"SET_IS_LOADING_BLOCKING":return{...t,isLoadingBlocking:e.content};default:return t}}},34417:function(t,e,n){"use strict";n.d(e,{W:function(){return a},_:function(){return i}});var r=n(64090);let a={isLoadingBlocking:!1,popupOpenId:null},i=(0,r.createContext)({dispatch:()=>null,state:a})},88197:function(t,e,n){"use strict";n.d(e,{sT:function(){return A},wX:function(){return b},VZ:function(){return y},Dr:function(){return S},qp:function(){return O},_5:function(){return N},xu:function(){return _}});var r=n(22840),a=n(71694),i=n(66803);let o=null,l=async t=>o||(o=(await (0,a.C_)()).staking.validators(t).then(t=>(o=null,t))),s={},u=async t=>{let e=s[t];if(e)return e;let n=(await (0,a.C_)()).staking.validator(t).then(e=>(s[t]=void 0,e.validator));return s[t]=n,n},d=null,c=async()=>d||(d=(await (0,a.C_)()).staking.pool().then(t=>(d=null,t.pool))),g=async t=>{let e=await (0,a.N$)();return await e.getBalance(t,"uxion")},p=async t=>{let e=await (0,a.C_)();return await e.staking.delegatorDelegations(t)},f=async t=>{let e=await (0,a.C_)();return await e.staking.delegatorUnbondingDelegations(t)},m=async(t,e)=>{let n=await (0,a.C_)(),o=await n.distribution.delegationRewards(t,e);return(await Promise.all(o.rewards.map(async t=>{if(0==t.denom.indexOf("ibc/")){var e;let r=await n.ibc.transfer.denomTrace(t.denom.substring(4));t.denom=(null===(e=r.denomTrace)||void 0===e?void 0:e.baseDenom)||t.denom}return t}))).filter(t=>{var e;return(null===(e=t.denom)||void 0===e?void 0:e.toUpperCase())==="UXION"}).map(t=>({amount:new r.Z(t.amount).div(new r.Z(10).pow(18)).toString(),denom:t.denom})).map(t=>(0,i.bI)(t))},h=async()=>{let t=await (0,a.C_)(),e=await t.mint.params().catch(()=>null);return(null==e?void 0:e.inflationMax)||.2};var v=n(19807),w=n(62986),x=n(39730);let b=async t=>{try{t.dispatch((0,w.Kv)(!0));let[e,n,r,a,i]=await Promise.all([l("BOND_STATUS_BONDED"),l("BOND_STATUS_UNBONDED"),l("BOND_STATUS_UNBONDING"),h(),c()]);[[e,"bonded"],[n,"unbonded"],[r,"unbonding"]].forEach(e=>{var n,r;let[a,i]=e;t.dispatch((0,w.T2)({items:a.validators,nextKey:(null===(n=a.pagination)||void 0===n?void 0:n.nextKey)||null,total:(null===(r=a.pagination)||void 0===r?void 0:r.total)||null},!0,i))}),t.dispatch((0,w.DD)(i)),t.dispatch((0,w.Km)(a.toString())),t.dispatch((0,w.Kv)(!1))}catch(t){console.error("error fetching staking data:",t)}},y=async(t,e)=>{try{var n,r,a,o;e.dispatch((0,w.Kv)(!0));let[l,s,u]=await Promise.all([g(t),p(t).then(async e=>({items:await Promise.all(e.delegationResponses.map(async e=>({balance:e.balance,rewards:await m(t,e.delegation.validatorAddress).then(t=>(0,i.HJ)(t)),validatorAddress:e.delegation.validatorAddress}))),pagination:e.pagination})),f(t).then(t=>({items:t.unbondingResponses.reduce((t,e)=>(t.push(...e.entries.map(t=>({balance:{amount:t.balance,denom:"uxion"},completionTime:Number(t.completionTime.seconds),completionTimeNanos:t.completionTime.nanos,id:t.unbondingId.toString(),validator:e.validatorAddress}))),t),[]),pagination:t.pagination})).catch(()=>({items:[],pagination:null})).then(t=>({items:t.items,pagination:t.pagination}))]);e.dispatch((0,w.d0)(l)),e.dispatch((0,w.Qx)({items:s.items,nextKey:(null===(n=s.pagination)||void 0===n?void 0:n.nextKey)||null,total:(null===(r=s.pagination)||void 0===r?void 0:r.total)||null},!0)),e.dispatch((0,w.Kg)({items:u.items,nextKey:(null===(a=u.pagination)||void 0===a?void 0:a.nextKey)||null,total:(null===(o=u.pagination)||void 0===o?void 0:o.total)||null},!0)),e.dispatch((0,w.Kv)(!1))}catch(t){console.error("error fetching staking data:",t)}},N=async(t,e,n,r,a)=>(await (0,v.H0)(t,r,e,n),async()=>{await y(t.delegator,a)}),_=async(t,e,n,r,a)=>(await (0,v.vZ)(t,r,e,n),async()=>{await y(t.delegator,a)}),A=async(t,e,n)=>{await (0,v.YY)(t,e),await y(t.delegator,n)},O=async(t,e)=>{var n;if((null===(n=e.state.validatorDetails)||void 0===n?void 0:n.operatorAddress)===t)return e.state.validatorDetails;let r=(0,x.mM)(e.state)[t]||await u(t);return e.dispatch((0,w.gT)(r)),r},S=async(t,e)=>{let n=(0,x.mM)(e.state)[t];if(n)return n;let r=await u(t);return e.dispatch((0,w.N7)({[t]:r,...e.state.extraValidators})),r}},80469:function(t,e,n){"use strict";let r;n.d(e,{f:function(){return d},n:function(){return u}});var a=n(75615),i=n(64090),o=n(88197),l=n(62986),s=n(544);let u=()=>{let t=(0,i.useRef)({}),e=(0,i.useContext)(s.Y);t.current.state=e.state,t.current.dispatch=e.dispatch;let{data:n,isConnected:o}=(0,a.hT)(),l=null==n?void 0:n.bech32Address;return{account:n,address:l,client:o?r:void 0,isConnected:o,staking:t.current}},d=()=>{let{client:t}=(0,a.Hj)(),{address:e,isConnected:n,staking:s}=u();r=n?t:void 0,(0,i.useEffect)(()=>{(0,o.wX)(s)},[s]),(0,i.useEffect)(()=>{if(n&&e)return(0,o.VZ)(e,s),()=>{s.dispatch((0,l.kS)())}},[n,e,s])}},62986:function(t,e,n){"use strict";n.d(e,{DD:function(){return u},I6:function(){return v},Kg:function(){return l},Km:function(){return g},Kv:function(){return a},N7:function(){return p},Qx:function(){return o},T2:function(){return i},ZG:function(){return c},d0:function(){return r},gT:function(){return s},kS:function(){return d}});let r=t=>({content:t,type:"SET_TOKENS"}),a=t=>({content:t,type:"SET_IS_INFO_LOADING"}),i=(t,e,n)=>({content:t,reset:e,status:n,type:"ADD_VALIDATORS"}),o=(t,e)=>({content:t,reset:e,type:"ADD_DELEGATIONS"}),l=(t,e)=>({content:t,reset:e,type:"ADD_UNBONDINGS"}),s=t=>({content:t,type:"SET_VALIDATOR_DETAILS"}),u=t=>({content:t,type:"SET_POOL"}),d=()=>({content:null,type:"LOGOUT"}),c=t=>({content:t,type:"SET_MODAL"}),g=t=>({content:t,type:"SET_INFLATION"}),p=t=>({content:t,type:"SET_EXTRA_VALIDATORS"}),f=t=>{let e=new Set;return t.filter(t=>!e.has(t.operatorAddress)&&(e.add(t.operatorAddress),!0))},m=t=>{let e=new Set;return t.filter(t=>!e.has(t.validatorAddress)&&(e.add(t.validatorAddress),!0))},h=t=>{let e=new Set;return t.filter(t=>{let n=t.id;return!e.has(n)&&(e.add(n),!0)})},v=(t,e)=>{switch(e.type){case"SET_TOKENS":return{...t,tokens:e.content};case"ADD_VALIDATORS":{let n=!e.reset&&t.validators[e.status]||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=f(n.items.concat(e.content.items)),{...t,validators:{...t.validators,[e.status]:n}}}case"ADD_DELEGATIONS":{let n=!e.reset&&t.delegations||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=m(e.content.items.concat(n.items)),{...t,delegations:n}}case"ADD_UNBONDINGS":{let n=!e.reset&&t.unbondings||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=h(e.content.items.concat(n.items)),{...t,unbondings:n}}case"SET_IS_INFO_LOADING":return{...t,isInfoLoading:e.content};case"SET_VALIDATOR_DETAILS":return{...t,validatorDetails:e.content};case"SET_POOL":return{...t,pool:e.content};case"SET_MODAL":return{...t,modal:e.content};case"LOGOUT":return{...t,delegations:null,unbondings:null};case"SET_EXTRA_VALIDATORS":return{...t,extraValidators:e.content};case"SET_INFLATION":return{...t,inflation:e.content};default:return t}}},39730:function(t,e,n){"use strict";n.d(e,{Cn:function(){return l},Sg:function(){return d},U2:function(){return i},ap:function(){return s},jc:function(){return g},jv:function(){return o},mM:function(){return c},zq:function(){return u}});var r=n(22840),a=n(66803);let i=(t,e)=>{let{delegations:n}=t;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(t=>!e||t.validatorAddress===e).map(t=>t.balance);return(0,a.HJ)(r)},o=(t,e)=>{let{unbondings:n}=t;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(t=>!e||t.validator===e).map(t=>t.balance);return(0,a.HJ)(r)},l=(t,e)=>{let{delegations:n}=e;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(e=>!t||e.validatorAddress===t).map(t=>t.rewards);return(0,a.HJ)(r)},s=t=>{let{tokens:e}=t;return e?new r.Z((0,a.bI)(e).amount):null},u=(t,e)=>{var n;return!!(null===(n=e.delegations)||void 0===n?void 0:n.items.some(e=>e.validatorAddress===t))},d=(t,e)=>{let{pool:n}=e;return t&&"string"==typeof(null==n?void 0:n.bondedTokens)?new r.Z(t).div(new r.Z(n.bondedTokens)).toNumber():null},c=t=>Object.values(t.validators).map(t=>null==t?void 0:t.items).flat().reduce((t,e)=>e?{...t,[e.operatorAddress]:e}:t,t.extraValidators),g=t=>t.inflation?new r.Z(t.inflation):null},544:function(t,e,n){"use strict";n.d(e,{W:function(){return a},Y:function(){return i}});var r=n(64090);let a={delegations:null,extraValidators:{},inflation:null,isInfoLoading:!1,modal:null,pool:null,tokens:null,unbondings:null,validatorDetails:null,validators:{bonded:null,unbonded:null,unbonding:null}},i=(0,r.createContext)({dispatch:()=>null,state:a})},71694:function(t,e,n){"use strict";let r,a;n.d(e,{C_:function(){return u},N$:function(){return d},v4:function(){return c}});var i=n(18722),o=n(58015),l=n(43890),s=n(9016);let u=()=>(r||(r=(async()=>{let t=await l.Tendermint34Client.connect(s.Od);return o.QueryClient.withExtensions(t,o.setupStakingExtension,o.setupDistributionExtension,o.setupMintExtension,o.setupIbcExtension)})()),r),d=()=>(a||(a=(async()=>await o.StargateClient.connect(s.Od))()),a),c=async()=>{let t=localStorage.getItem("xion-authz-temp-account");if(!t)return;let e=await i.DirectSecp256k1HdWallet.deserialize(t,"abstraxion"),n=await e.getAccounts().then(t=>{var e;return null===(e=t[0])||void 0===e?void 0:e.address});return{client:await o.SigningStargateClient.connectWithSigner(s.Od,e),granteeAddress:n}}},66803:function(t,e,n){"use strict";n.d(e,{HJ:function(){return d},IB:function(){return i},Jp:function(){return o},UO:function(){return l},bI:function(){return a},bP:function(){return u},kw:function(){return s}});var r=n(22840);let a=t=>{var e,n,a;return(null===(e=t.denom)||void 0===e?void 0:e.toUpperCase())==="UXION"?{amount:new r.Z(t.amount).div(new r.Z(10).pow(6)).toString(),denom:"XION"}:(null===(n=t.denom)||void 0===n?void 0:n.toUpperCase())==="XION"?{amount:t.amount,denom:"XION"}:{...t,denom:null===(a=t.denom)||void 0===a?void 0:a.toUpperCase()}},i=()=>({amount:"0",denom:"XION"}),o=t=>({amount:t.toString(),denom:"XION"}),l=t=>t&&new r.Z(t.amount).gt(0),s=t=>({amount:t.div(new r.Z(10).pow(6)).toString(),denom:"XION"}),u=t=>({amount:t.times(new r.Z(10).pow(6)).toString(),denom:"UXION"}),d=t=>t.reduce((t,e)=>({amount:new r.Z(t.amount).plus(a(e).amount).toString(),denom:t.denom}),i())},9016:function(t,e,n){"use strict";n.d(e,{Ex:function(){return l},Jg:function(){return r},Mx:function(){return u},Od:function(){return i},T$:function(){return a},_H:function(){return d},c1:function(){return s},sb:function(){return o}});let r=!0,a=void 0,i="https://rpc.xion-testnet.forbole.com",o="/xion-staking",l=10,s="".concat(o,"/default-avatar.svg"),u=r?3:21,d=1e-4},77658:function(t,e,n){"use strict";n.d(e,{BR:function(){return a},GI:function(){return s},Sf:function(){return r},_m:function(){return u},cx:function(){return l},gU:function(){return i},kC:function(){return o},yC:function(){return d}});let r='',a='',i='',o='',l='',s='',u='',d=''},19807:function(t,e,n){"use strict";n.d(e,{rf:function(){return b},YY:function(){return w},sj:function(){return x},H0:function(){return h},vZ:function(){return v}});var r=n(22840),a=n(53856),i=n(62884),o=n(66803),l=n(9016),s=n(97481),u=n(71694);let d=async(t,e)=>{let{client:n,granteeAddress:r}=await (0,u.v4)()||{};if(!n||!r)return null;let a=[{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:s.MsgExec.fromPartial({grantee:r,msgs:t.map(t=>n.registry.encodeAsAny(t))})}];return await n.simulate(r,a,e).then(t=>Math.ceil(2*t).toString()).catch(t=>(console.log("debug: core/base.ts: Estimate error",t),null))},c=async t=>{let{address:e,amount:n=[{amount:"1000",denom:"uxion"}],gasLimit:r="400000",memo:a="",msgs:i}=t;return{amount:n,gas:await d(i,a).catch(()=>null)||r,granter:e}},g=t=>({amount:t.amount,denom:["UXION","XION"].includes(t.denom.toUpperCase())?t.denom.toLowerCase():t.denom}),p=t=>{if("UXION"===t.denom.toUpperCase())return g(t);if("XION"===t.denom.toUpperCase())return g((0,o.bP)(new r.Z(t.amount)));throw Error("Invalid coin denom")},f=t=>e=>{if(console.log("debug: base.ts: result",e),!e.events.find(e=>e.type===t))throw console.error(e),Error("Out of gas");return e},m=t=>{throw console.error(t),t},h=async(t,e,n,r)=>{let a=p(n),o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:i.MsgDelegate.fromPartial({amount:a,delegatorAddress:t.delegator,validatorAddress:t.validator})},l=await c({address:t.delegator,memo:r,msgs:[o]});return await e.signAndBroadcast(t.delegator,[o],l,r).then(f("delegate")).catch(m)},v=async(t,e,n,r)=>{let a=p(n),o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:i.MsgUndelegate.fromPartial({amount:a,delegatorAddress:t.delegator,validatorAddress:t.validator})},l=await c({address:t.delegator,memo:r,msgs:[o]});return await e.signAndBroadcast(t.delegator,[o],l,r).then(f("unbond")).catch(m)},w=async(t,e)=>{let n=[{typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:a.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t.delegator})}],r=await c({address:t.delegator,msgs:n});return await e.signAndBroadcast(t.delegator,n,r).then(f("withdraw_rewards")).catch(m)},x=t=>{let e=(0,o.bI)(t);return new r.Z(e.amount).gte(l._H)},b=async(t,e)=>{let n={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation",value:i.MsgCancelUnbondingDelegation.fromPartial({delegatorAddress:t.delegator,validatorAddress:t.validator})},r=await c({address:t.delegator,msgs:[n]});return await e.signAndBroadcast(t.delegator,[n],r,"").then(t=>(console.log("debug: tx.ts: cancelUnstake: result",t),t)).catch(m)}}}]); \ No newline at end of file diff --git a/_next/static/chunks/816-eb86ba1609f525f6.js b/_next/static/chunks/816-eb86ba1609f525f6.js deleted file mode 100644 index 4030627..0000000 --- a/_next/static/chunks/816-eb86ba1609f525f6.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[816],{46601:function(){},89214:function(){},42480:function(){},85568:function(){},69386:function(){},31616:function(){},20131:function(){},16026:function(){},33370:function(){},98909:function(t,e,n){"use strict";n.d(e,{Bz:function(){return m},Dx:function(){return g},M5:function(){return b},Mj:function(){return S},OL:function(){return v},Rk:function(){return O},Wz:function(){return y},XJ:function(){return f},Xq:function(){return A},ZP:function(){return x},hp:function(){return w},jr:function(){return h},ls:function(){return p},sr:function(){return N},zx:function(){return _}});var r=n(3827),a=n(20996),i=n(32283),o=n(8792),s=n(64090),l=n(30298),u=n(77658),d=n(6245),c=n(97573);let g=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-title",n].join(" "),children:e})},p=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-hero",n].join(" "),children:e})},f=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["heading2",n].join(" "),children:e})},m=t=>{let{children:e,className:n="",color:a="text-typo-150"}=t;return(0,r.jsx)("div",{className:["heading8",a,n].join(" "),children:e})},h=t=>{let{children:e,className:n=""}=t;return(0,r.jsx)("div",{className:["typo-body-medium",n].join(" "),children:e})},v=t=>{let{children:e,href:n}=t;return(0,r.jsx)(o.default,{className:"text-left font-normal leading-[24px] underline",href:n,children:e})},w=t=>{let{className:e,variant:n,...a}=t;return(0,r.jsx)("button",{...a,className:["cursor-pointer rounded-full bg-bg-550 px-[8px] py-[4px] text-white hover:bg-bg-600 disabled:cursor-not-allowed disabled:bg-bg-600 disabled:text-typo-150","danger"===n?"[&]:text-danger":"",e].join(" ")})},x=t=>{let{className:e,variant:n,...a}=t;return(0,r.jsx)("button",{...a,className:["cursor-pointer rounded-full bg-transparent px-[8px] py-[4px] text-white disabled:cursor-not-allowed disabled:bg-bg-600 disabled:text-typo-150","danger"===n?"[&]:text-danger":"",e].join(" ")})},b=t=>{let{textToCopy:e}=t;return(0,r.jsx)("button",{className:"cursor-pointer",dangerouslySetInnerHTML:{__html:u.BR},onClick:()=>{navigator.clipboard.writeText(e),(0,l.Am)("Copied to clipboard",{type:"info"})}})},y=t=>{let{error:e,...n}=t;return(0,r.jsxs)("span",{className:"relative block",children:[(0,r.jsx)("input",{...n,className:["h-[96px] w-full rounded-[16px] border-[1px] bg-black p-[16px] pr-[140px] text-[48px] focus:outline-none",e?"border-danger":"border-white"].join(" ")}),(0,r.jsx)("span",{className:"absolute bottom-0 right-[12px] top-0 flex h-full items-center text-[48px] text-typo-300",children:"XION"})]})},A=t=>{let{children:e}=t;return(0,r.jsx)("div",{className:"text-danger",children:e})},N=t=>(0,r.jsx)("input",{...t,className:"h-[50px] w-full bg-black py-[8px] focus:outline-none",style:{border:"none",borderBottom:"1px solid white"}}),_=t=>{let{className:e,isLoading:n,variant:a,...i}=t;return(0,r.jsx)("button",{...i,className:["w-full rounded-[8px] px-[12px] py-[16px] text-black disabled:cursor-not-allowed","danger"===a?"text-danger disabled:text-typo-150 bg-[#D745061A]":"success"===a?"bg-success text-black disabled:bg-green-400":"bg-white text-black disabled:bg-bg-400",e||""].join(" "),disabled:n||i.disabled,children:n?(0,r.jsx)("span",{className:"flex items-center justify-center",children:(0,r.jsx)("span",{className:"animate-spin",dangerouslySetInnerHTML:{__html:u._m}})}):i.children})},O=t=>{let{children:e,className:n,id:o,modalClass:l,offset:u,placement:g,Trigger:p}=t,[f,m]=(0,s.useState)(null),{core:h}=(0,d.l)(),v=h.state.popupOpenId===o;return(0,r.jsxs)("div",{className:[n].join(" "),children:[(0,r.jsx)("button",{onClick:t=>{t.stopPropagation(),h.dispatch((0,c.h)(o))},ref:m,children:(0,r.jsx)(p,{id:o})}),v&&(0,r.jsx)(a.d,{onClickAway:()=>{v&&h.dispatch((0,c.h)(null))},children:(0,r.jsx)(i.G,{anchor:f,className:[l].join(" "),offset:u,open:v,placement:g,withTransition:!0,children:e})})]})},S=t=>(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"z-5 absolute bottom-[5px] left-0",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:u.yC}})}),(0,r.jsx)("input",{...t,className:"border-b-[1px] border-b-transparent bg-transparent pl-[24px] text-white outline-none hover:border-b-white focus:border-b-white"})]})},6245:function(t,e,n){"use strict";n.d(e,{l:function(){return i}});var r=n(64090),a=n(34417);let i=()=>{let t=(0,r.useRef)({}),e=(0,r.useContext)(a._);return t.current.state=e.state,t.current.dispatch=e.dispatch,{core:t.current}}},97573:function(t,e,n){"use strict";n.d(e,{I:function(){return a},h:function(){return r}});let r=t=>({content:t,type:"SET_POPUP_OPEN_ID"}),a=(t,e)=>{switch(e.type){case"SET_POPUP_OPEN_ID":return{...t,popupOpenId:e.content};case"SET_IS_LOADING_BLOCKING":return{...t,isLoadingBlocking:e.content};default:return t}}},34417:function(t,e,n){"use strict";n.d(e,{W:function(){return a},_:function(){return i}});var r=n(64090);let a={isLoadingBlocking:!1,popupOpenId:null},i=(0,r.createContext)({dispatch:()=>null,state:a})},88197:function(t,e,n){"use strict";n.d(e,{sT:function(){return N},wX:function(){return x},VZ:function(){return b},Dr:function(){return O},qp:function(){return _},_5:function(){return y},xu:function(){return A}});var r=n(22840),a=n(71694),i=n(66803);let o=null,s=async t=>o||(o=(await (0,a.C_)()).staking.validators(t).then(t=>(o=null,t))),l={},u=async t=>{let e=l[t];if(e)return e;let n=(await (0,a.C_)()).staking.validator(t).then(e=>(l[t]=void 0,e.validator));return l[t]=n,n},d=null,c=async()=>d||(d=(await (0,a.C_)()).staking.pool().then(t=>(d=null,t.pool))),g=async t=>{let e=await (0,a.N$)();return await e.getBalance(t,"uxion")},p=async t=>{let e=await (0,a.C_)();return await e.staking.delegatorDelegations(t)},f=async t=>{let e=await (0,a.C_)();return await e.staking.delegatorUnbondingDelegations(t)},m=async(t,e)=>{let n=await (0,a.C_)(),o=await n.distribution.delegationRewards(t,e);return(await Promise.all(o.rewards.map(async t=>{if(0==t.denom.indexOf("ibc/")){var e;let r=await n.ibc.transfer.denomTrace(t.denom.substring(4));t.denom=(null===(e=r.denomTrace)||void 0===e?void 0:e.baseDenom)||t.denom}return t}))).filter(t=>{var e;return(null===(e=t.denom)||void 0===e?void 0:e.toUpperCase())==="UXION"}).map(t=>({amount:new r.Z(t.amount).div(new r.Z(10).pow(18)).toString(),denom:t.denom})).map(t=>(0,i.bI)(t))};var h=n(19807),v=n(62986),w=n(39730);let x=async t=>{try{t.dispatch((0,v.Kv)(!0));let[e,n,r,a]=await Promise.all([s("BOND_STATUS_BONDED"),s("BOND_STATUS_UNBONDED"),s("BOND_STATUS_UNBONDING"),c()]);[[e,"bonded"],[n,"unbonded"],[r,"unbonding"]].forEach(e=>{var n,r;let[a,i]=e;t.dispatch((0,v.T2)({items:a.validators,nextKey:(null===(n=a.pagination)||void 0===n?void 0:n.nextKey)||null,total:(null===(r=a.pagination)||void 0===r?void 0:r.total)||null},!0,i))}),t.dispatch((0,v.DD)(a)),t.dispatch((0,v.Kv)(!1))}catch(t){console.error("error fetching staking data:",t)}},b=async(t,e)=>{try{var n,r,a,o;e.dispatch((0,v.Kv)(!0));let[s,l,u]=await Promise.all([g(t),p(t).then(async e=>({items:await Promise.all(e.delegationResponses.map(async e=>({balance:e.balance,rewards:await m(t,e.delegation.validatorAddress).then(t=>(0,i.HJ)(t)),validatorAddress:e.delegation.validatorAddress}))),pagination:e.pagination})),f(t).then(t=>({items:t.unbondingResponses.reduce((t,e)=>(t.push(...e.entries.map(t=>({balance:{amount:t.balance,denom:"uxion"},completionTime:Number(t.completionTime.seconds),completionTimeNanos:t.completionTime.nanos,id:t.unbondingId.toString(),validator:e.validatorAddress}))),t),[]),pagination:t.pagination})).catch(()=>({items:[],pagination:null})).then(t=>({items:t.items,pagination:t.pagination}))]);e.dispatch((0,v.d0)(s)),e.dispatch((0,v.Qx)({items:l.items,nextKey:(null===(n=l.pagination)||void 0===n?void 0:n.nextKey)||null,total:(null===(r=l.pagination)||void 0===r?void 0:r.total)||null},!0)),e.dispatch((0,v.Kg)({items:u.items,nextKey:(null===(a=u.pagination)||void 0===a?void 0:a.nextKey)||null,total:(null===(o=u.pagination)||void 0===o?void 0:o.total)||null},!0)),e.dispatch((0,v.Kv)(!1))}catch(t){console.error("error fetching staking data:",t)}},y=async(t,e,n,r,a)=>(await (0,h.H0)(t,r,e,n),async()=>{await b(t.delegator,a)}),A=async(t,e,n,r,a)=>(await (0,h.vZ)(t,r,e,n),async()=>{await b(t.delegator,a)}),N=async(t,e,n)=>{await (0,h.YY)(t,e),await b(t.delegator,n)},_=async(t,e)=>{var n;if((null===(n=e.state.validatorDetails)||void 0===n?void 0:n.operatorAddress)===t)return e.state.validatorDetails;let r=(0,w.mM)(e.state)[t]||await u(t);return e.dispatch((0,v.gT)(r)),r},O=async(t,e)=>{let n=(0,w.mM)(e.state)[t];if(n)return n;let r=await u(t);return e.dispatch((0,v.N7)({[t]:r,...e.state.extraValidators})),r}},80469:function(t,e,n){"use strict";let r;n.d(e,{f:function(){return d},n:function(){return u}});var a=n(75615),i=n(64090),o=n(88197),s=n(62986),l=n(544);let u=()=>{let t=(0,i.useRef)({}),e=(0,i.useContext)(l.Y);t.current.state=e.state,t.current.dispatch=e.dispatch;let{data:n,isConnected:o}=(0,a.hT)(),s=null==n?void 0:n.bech32Address;return{account:n,address:s,client:o?r:void 0,isConnected:o,staking:t.current}},d=()=>{let{client:t}=(0,a.Hj)(),{address:e,isConnected:n,staking:l}=u();r=n?t:void 0,(0,i.useEffect)(()=>{(0,o.wX)(l)},[l]),(0,i.useEffect)(()=>{if(n&&e)return(0,o.VZ)(e,l),()=>{l.dispatch((0,s.kS)())}},[n,e,l])}},62986:function(t,e,n){"use strict";n.d(e,{DD:function(){return u},I6:function(){return h},Kg:function(){return s},Kv:function(){return a},N7:function(){return g},Qx:function(){return o},T2:function(){return i},ZG:function(){return c},d0:function(){return r},gT:function(){return l},kS:function(){return d}});let r=t=>({content:t,type:"SET_TOKENS"}),a=t=>({content:t,type:"SET_IS_INFO_LOADING"}),i=(t,e,n)=>({content:t,reset:e,status:n,type:"ADD_VALIDATORS"}),o=(t,e)=>({content:t,reset:e,type:"ADD_DELEGATIONS"}),s=(t,e)=>({content:t,reset:e,type:"ADD_UNBONDINGS"}),l=t=>({content:t,type:"SET_VALIDATOR_DETAILS"}),u=t=>({content:t,type:"SET_POOL"}),d=()=>({content:null,type:"LOGOUT"}),c=t=>({content:t,type:"SET_MODAL"}),g=t=>({content:t,type:"SET_EXTRA_VALIDATORS"}),p=t=>{let e=new Set;return t.filter(t=>!e.has(t.operatorAddress)&&(e.add(t.operatorAddress),!0))},f=t=>{let e=new Set;return t.filter(t=>!e.has(t.validatorAddress)&&(e.add(t.validatorAddress),!0))},m=t=>{let e=new Set;return t.filter(t=>{let n=t.id;return!e.has(n)&&(e.add(n),!0)})},h=(t,e)=>{switch(e.type){case"SET_TOKENS":return{...t,tokens:e.content};case"ADD_VALIDATORS":{let n=!e.reset&&t.validators[e.status]||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=p(n.items.concat(e.content.items)),{...t,validators:{...t.validators,[e.status]:n}}}case"ADD_DELEGATIONS":{let n=!e.reset&&t.delegations||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=f(e.content.items.concat(n.items)),{...t,delegations:n}}case"ADD_UNBONDINGS":{let n=!e.reset&&t.unbondings||{items:[],nextKey:null,total:null};return n.total=e.content.total,n.nextKey=e.content.nextKey,n.items=m(e.content.items.concat(n.items)),{...t,unbondings:n}}case"SET_IS_INFO_LOADING":return{...t,isInfoLoading:e.content};case"SET_VALIDATOR_DETAILS":return{...t,validatorDetails:e.content};case"SET_POOL":return{...t,pool:e.content};case"SET_MODAL":return{...t,modal:e.content};case"LOGOUT":return{...t,delegations:null,unbondings:null};case"SET_EXTRA_VALIDATORS":return{...t,extraValidators:e.content};default:return t}}},39730:function(t,e,n){"use strict";n.d(e,{Cn:function(){return s},Sg:function(){return d},U2:function(){return i},ap:function(){return l},jv:function(){return o},mM:function(){return c},zq:function(){return u}});var r=n(22840),a=n(66803);let i=(t,e)=>{let{delegations:n}=t;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(t=>!e||t.validatorAddress===e).map(t=>t.balance);return(0,a.HJ)(r)},o=(t,e)=>{let{unbondings:n}=t;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(t=>!e||t.validator===e).map(t=>t.balance);return(0,a.HJ)(r)},s=(t,e)=>{let{delegations:n}=e;if(!(null==n?void 0:n.items.length))return null;let r=n.items.filter(e=>!t||e.validatorAddress===t).map(t=>t.rewards);return(0,a.HJ)(r)},l=t=>{let{tokens:e}=t;return e?new r.Z((0,a.bI)(e).amount):null},u=(t,e)=>{var n;return!!(null===(n=e.delegations)||void 0===n?void 0:n.items.some(e=>e.validatorAddress===t))},d=(t,e)=>{let{pool:n}=e;return t&&"string"==typeof(null==n?void 0:n.bondedTokens)?new r.Z(t).div(new r.Z(n.bondedTokens)).toNumber():null},c=t=>Object.values(t.validators).map(t=>null==t?void 0:t.items).flat().reduce((t,e)=>e?{...t,[e.operatorAddress]:e}:t,t.extraValidators)},544:function(t,e,n){"use strict";n.d(e,{W:function(){return a},Y:function(){return i}});var r=n(64090);let a={delegations:null,extraValidators:{},isInfoLoading:!1,modal:null,pool:null,tokens:null,unbondings:null,validatorDetails:null,validators:{bonded:null,unbonded:null,unbonding:null}},i=(0,r.createContext)({dispatch:()=>null,state:a})},71694:function(t,e,n){"use strict";let r,a;n.d(e,{C_:function(){return u},N$:function(){return d},v4:function(){return c}});var i=n(18722),o=n(58015),s=n(43890),l=n(9016);let u=()=>(r||(r=(async()=>{let t=await s.Tendermint34Client.connect(l.Od);return o.QueryClient.withExtensions(t,o.setupStakingExtension,o.setupDistributionExtension,o.setupIbcExtension)})()),r),d=()=>(a||(a=(async()=>await o.StargateClient.connect(l.Od))()),a),c=async()=>{let t=localStorage.getItem("xion-authz-temp-account");if(!t)return;let e=await i.DirectSecp256k1HdWallet.deserialize(t,"abstraxion"),n=await e.getAccounts().then(t=>{var e;return null===(e=t[0])||void 0===e?void 0:e.address});return{client:await o.SigningStargateClient.connectWithSigner(l.Od,e),granteeAddress:n}}},66803:function(t,e,n){"use strict";n.d(e,{HJ:function(){return d},IB:function(){return i},Jp:function(){return o},UO:function(){return s},bI:function(){return a},bP:function(){return u},kw:function(){return l}});var r=n(22840);let a=t=>{var e,n,a;return(null===(e=t.denom)||void 0===e?void 0:e.toUpperCase())==="UXION"?{amount:new r.Z(t.amount).div(new r.Z(10).pow(6)).toString(),denom:"XION"}:(null===(n=t.denom)||void 0===n?void 0:n.toUpperCase())==="XION"?{amount:t.amount,denom:"XION"}:{...t,denom:null===(a=t.denom)||void 0===a?void 0:a.toUpperCase()}},i=()=>({amount:"0",denom:"XION"}),o=t=>({amount:t.toString(),denom:"XION"}),s=t=>t&&new r.Z(t.amount).gt(0),l=t=>({amount:t.div(new r.Z(10).pow(6)).toString(),denom:"XION"}),u=t=>({amount:t.times(new r.Z(10).pow(6)).toString(),denom:"UXION"}),d=t=>t.reduce((t,e)=>({amount:new r.Z(t.amount).plus(a(e).amount).toString(),denom:t.denom}),i())},9016:function(t,e,n){"use strict";n.d(e,{Ex:function(){return s},Jg:function(){return r},Mx:function(){return u},Od:function(){return i},T$:function(){return a},c1:function(){return l},sb:function(){return o}});let r=!0,a=void 0,i="https://rpc.xion-testnet.forbole.com",o="/xion-staking",s=10,l="".concat(o,"/default-avatar.svg"),u=r?3:21},77658:function(t,e,n){"use strict";n.d(e,{BR:function(){return a},GI:function(){return l},Sf:function(){return r},_m:function(){return u},cx:function(){return s},gU:function(){return i},kC:function(){return o},yC:function(){return d}});let r='',a='',i='',o='',s='',l='',u='',d=''},19807:function(t,e,n){"use strict";n.d(e,{rf:function(){return x},YY:function(){return v},sj:function(){return w},H0:function(){return m},vZ:function(){return h}});var r=n(22840),a=n(53856),i=n(62884),o=n(66803),s=n(97481),l=n(71694);let u=async(t,e)=>{let{client:n,granteeAddress:r}=await (0,l.v4)()||{};if(!n||!r)return null;let a=[{typeUrl:"/cosmos.authz.v1beta1.MsgExec",value:s.MsgExec.fromPartial({grantee:r,msgs:t.map(t=>n.registry.encodeAsAny(t))})}];return await n.simulate(r,a,e).then(t=>Math.ceil(2*t).toString()).catch(t=>(console.log("debug: core/base.ts: Estimate error",t),null))},d=async t=>{let{address:e,amount:n=[{amount:"1000",denom:"uxion"}],gasLimit:r="400000",memo:a="",msgs:i}=t;return{amount:n,gas:await u(i,a)||r,granter:e}},c=t=>({amount:t.amount,denom:["UXION","XION"].includes(t.denom.toUpperCase())?t.denom.toLowerCase():t.denom}),g=t=>{if("UXION"===t.denom.toUpperCase())return c(t);if("XION"===t.denom.toUpperCase())return c((0,o.bP)(new r.Z(t.amount)));throw Error("Invalid coin denom")},p=t=>e=>{if(console.log("debug: base.ts: result",e),!e.events.find(e=>e.type===t))throw console.error(e),Error("Out of gas");return e},f=t=>{throw console.error(t),t},m=async(t,e,n,r)=>{let a=g(n),o={typeUrl:"/cosmos.staking.v1beta1.MsgDelegate",value:i.MsgDelegate.fromPartial({amount:a,delegatorAddress:t.delegator,validatorAddress:t.validator})},s=await d({address:t.delegator,memo:r,msgs:[o]});return await e.signAndBroadcast(t.delegator,[o],s,r).then(p("delegate")).catch(f)},h=async(t,e,n,r)=>{let a=g(n),o={typeUrl:"/cosmos.staking.v1beta1.MsgUndelegate",value:i.MsgUndelegate.fromPartial({amount:a,delegatorAddress:t.delegator,validatorAddress:t.validator})},s=await d({address:t.delegator,memo:r,msgs:[o]});return await e.signAndBroadcast(t.delegator,[o],s,r).then(p("unbond")).catch(f)},v=async(t,e)=>{let n=[{typeUrl:"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",value:a.MsgWithdrawDelegatorReward.fromPartial({delegatorAddress:t.delegator,validatorAddress:t.validator})}],r=await d({address:t.delegator,msgs:n});return await e.signAndBroadcast(t.delegator,n,r).then(p("withdraw_rewards")).catch(f)},w=t=>{let e=(0,o.bI)(t);return new r.Z(e.amount).gte(1e-4)},x=async(t,e)=>{let n={typeUrl:"/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation",value:i.MsgCancelUnbondingDelegation.fromPartial({delegatorAddress:t.delegator,validatorAddress:t.validator})},r=await d({address:t.delegator,msgs:[n]});return await e.signAndBroadcast(t.delegator,[n],r).then(t=>(console.log("debug: tx.ts: cancelUnstake: result",t),t)).catch(f)}}}]); \ No newline at end of file diff --git a/_next/static/chunks/app/layout-60929d98c5cc30c3.js b/_next/static/chunks/app/layout-f8bb99b6df23ac99.js similarity index 100% rename from _next/static/chunks/app/layout-60929d98c5cc30c3.js rename to _next/static/chunks/app/layout-f8bb99b6df23ac99.js diff --git a/_next/static/chunks/app/page-5762d3667c36ba9b.js b/_next/static/chunks/app/page-5762d3667c36ba9b.js new file mode 100644 index 0000000..16a6ad5 --- /dev/null +++ b/_next/static/chunks/app/page-5762d3667c36ba9b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{67617:function(e,s,t){Promise.resolve().then(t.bind(t,64350))},64350:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return I}});var i=t(3827),n=t(64090),r=t(98909),a=t(80469),l=t(62948),c=t(71860),d=t(75615),o=t(62986),x=t(39730),m=t(66803),u=t(9016),j=t(19807),h=t(67497),p=t(42498);let g="absolute bottom-[24px] right-[10px] top-[24px]",v="relative flex h-full flex-col items-start gap-3 p-[24px]";var f=(0,n.memo)(()=>{let{isConnected:e}=(0,d.hT)(),{staking:s}=(0,a.n)(),[,t]=(0,d.dd)();if(!e)return(0,i.jsxs)("div",{className:"flex min-h-[212px] flex-col items-center justify-center gap-[32px] uppercase",style:{backgroundImage:"url(".concat(u.sb,"/overview-bg.png)"),borderRadius:24},children:[(0,i.jsx)(r.ls,{children:"Please Log In To View"}),(0,i.jsx)("div",{children:(0,i.jsx)(r.zx,{className:"min-w-[150px]",onClick:()=>{t(!0)},children:"Log In"})})]});let n=(0,x.U2)(s.state,null)||(0,m.IB)(),l=(0,x.Cn)(null,s.state)||(0,m.IB)(),c=(0,x.jc)(s.state),f=s.state.tokens||(0,m.IB)();return(0,i.jsxs)("div",{className:"grid min-h-[144px] flex-col items-center justify-center gap-[32px]",style:{backgroundImage:"url(".concat(u.sb,"/overview-bg.png)"),borderRadius:24,gridTemplateColumns:"1fr 1fr 1fr 1fr"},children:[(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Claimable Rewards"}),(0,i.jsxs)("div",{className:"flex flex-row items-center gap-4",children:[(0,i.jsx)(r.XJ,{children:(0,h.H_)(l)}),(0,j.sj)(l)&&(0,i.jsx)(r.hp,{onClick:()=>{var e;s.dispatch((0,o.ZG)({content:{delegations:(null===(e=s.state.delegations)||void 0===e?void 0:e.items)||[]},type:"rewards"}))},children:"Claim"})]}),(0,i.jsx)(r.jr,{children:(0,h.Em)(l)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"APR"}),(0,i.jsx)(r.XJ,{children:(0,h.PV)(c)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Delegated Amount"}),(0,i.jsx)(r.XJ,{children:(0,h.H_)(n)}),(0,i.jsx)(r.jr,{children:(0,h.Em)(n)}),(0,i.jsx)("div",{className:g,children:(0,i.jsx)(p.i,{})})]}),(0,i.jsxs)("div",{className:v,children:[(0,i.jsx)(r.Bz,{children:"Available For Delegation"}),(0,i.jsx)(r.XJ,{children:(0,h.H_)(f)}),(0,i.jsx)(r.jr,{children:(0,h.Em)(f)})]})]})}),N=t(22840),w=t(20534),b=t(143),k=t(80148),S=t(89056),y=t(26605),B=t(48074);let C={gap:"16px",gridTemplateColumns:"60px 1.5fr repeat(3, 1fr) 80px 80px"},D=e=>{let{disabled:s,onStake:t,staking:n,validator:a}=e,{identity:l}=a.description,c=(0,S.P)(l),d=(0,x.Sg)(null==a?void 0:a.tokens,n.state),o=(0,h.gg)(d);return(0,i.jsxs)("div",{className:"flex w-full flex-col items-center justify-between gap-2",children:[(0,i.jsxs)("div",{className:"grid w-full items-center justify-between gap-2 p-4",style:C,children:[(0,i.jsx)("div",{className:"flex items-center justify-start",children:(0,i.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:c,style:{height:50,width:50}})}),(0,i.jsxs)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,i.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:a.description.moniker}),(0,i.jsx)(y.Z,{address:a.operatorAddress})]}),(0,i.jsx)("div",{className:"flex min-w-max flex-col items-center justify-center",children:(0,x.zq)(a.operatorAddress,n.state)&&(0,i.jsx)("div",{className:"rounded-[2px] bg-successBg p-[2px] text-[11px] font-medium leading-[16px] tracking-normal text-success",children:"You staked"})})]}),(0,i.jsx)("div",{className:"text-right",children:(0,i.jsx)(B.Z,{text:(0,h.Em)((0,m.kw)(new N.Z(a.tokens)),!0)})}),(0,i.jsx)("div",{className:"text-right",children:(0,h.i)(a.commission.commissionRates.rate,2)}),d&&(0,i.jsx)("div",{className:"text-right",children:o}),(0,i.jsx)("div",{className:"text-right",children:(0,i.jsx)(r.OL,{href:"/validator?address=".concat(a.operatorAddress),children:"Details"})}),t&&(0,i.jsx)("div",{children:(0,i.jsx)(r.hp,{disabled:s,onClick:t,children:"Delegate"})})]}),(0,i.jsx)("div",{className:"box-content h-[1px] bg-bg-500",style:{width:"calc(100% - 48px)"}})]})},_=b.N;var A=(0,n.memo)(()=>{var e,s,t;let{isConnected:l,staking:c}=(0,a.n)(),[d,m]=(0,n.useState)("none"),[u,j]=(0,n.useState)("active"),[h,p]=(0,n.useState)(""),{validators:g}=c.state,v=("active"===u?(null===(e=g.bonded)||void 0===e?void 0:e.items)||[]:((null===(s=g.unbonded)||void 0===s?void 0:s.items)||[]).concat((null===(t=g.unbonding)||void 0===t?void 0:t.items)||[])).filter("active"===u?e=>e.status===w.BondStatus.BOND_STATUS_BONDED:e=>e.status===(w.BondStatus.BOND_STATUS_UNBONDED||w.BondStatus.BOND_STATUS_UNBONDING)).slice().sort((e,s)=>{if("none"===d)return 0;if(["voting-power-asc","voting-power-desc"].includes(d)){let t=(0,x.Sg)(e.tokens,c.state),i=(0,x.Sg)(s.tokens,c.state);return(0,k.B)(t,i,"voting-power-asc"===d)}if(["commission-asc","commission-desc"].includes(d)){let t=parseFloat(e.commission.commissionRates.rate),i=parseFloat(s.commission.commissionRates.rate);return(0,k.B)(t,i,"commission-asc"===d)}if(["name-asc","name-desc"].includes(d)){let t=e.description.moniker.toLowerCase(),i=s.description.moniker.toLowerCase();return(0,k.B)(t,i,"name-asc"===d)}if(["staked-asc","staked-desc"].includes(d)){let t=new N.Z(e.tokens),i=new N.Z(s.tokens);return(0,k.B)(t,i,"staked-asc"===d)}return 0}).filter(e=>{if(!h)return!0;let s=e.description.moniker.toLowerCase(),t=e.operatorAddress.toLowerCase();return s.includes(h.toLowerCase())||t.includes(h.toLowerCase())});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"grid grid-cols-3",children:[(0,i.jsxs)("div",{className:"flex w-full flex-row justify-start gap-[16px]",children:[(0,i.jsx)(r.Dx,{children:"Validators"}),(0,i.jsx)(r.Mj,{onChange:e=>p(e.target.value),value:h})]}),(0,i.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[40px]",children:[(0,i.jsx)("button",{onClick:()=>{j("active")},children:"Active"}),(0,i.jsx)("button",{onClick:()=>{j("inactive")},children:"Inactive"})]})]}),(0,i.jsxs)("div",{className:"min-h-[100px] overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100",children:[(0,i.jsxs)("div",{className:"grid w-full items-center justify-between gap-2 bg-bg-500 p-4 uppercase",style:C,children:[(0,i.jsx)("div",{}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["name-asc","name-desc"],children:"Validator"}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["staked-asc","staked-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["commission-asc","commission-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Commission"})}),(0,i.jsx)(_,{onSort:m,sort:d,sorting:["voting-power-asc","voting-power-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Voting Power"})})]}),v.map(e=>(0,i.jsx)(D,{disabled:!l,onStake:"active"===u?()=>{c.dispatch((0,o.ZG)({content:{validator:e},type:"delegate"}))}:null,staking:c,validator:e},e.operatorAddress))]})]})}),I=(0,n.memo)(function(){let{staking:e}=(0,a.n)(),[s,t]=(0,n.useState)(!1),d=(0,l.S6)(e.state);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"page-container flex flex-col gap-6 px-[24px] pb-[24px]",children:[(0,i.jsxs)("div",{className:"mt-[40px] flex flex-row justify-between text-left",children:[(0,i.jsx)(r.Dx,{children:"Your Staking Overview"}),d&&(0,i.jsx)(l.sv,{isShowingDetails:s,setIsShowingDetails:t})]}),(0,i.jsx)(f,{}),s&&d&&(0,i.jsx)(l.ZP,{}),(0,i.jsx)(A,{})]}),(0,i.jsx)(c.Z,{})]})})}},function(e){e.O(0,[350,218,147,228,933,4,245,816,503,971,69,744],function(){return e(e.s=67617)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/app/page-dfd1efb6ea25b0e8.js b/_next/static/chunks/app/page-dfd1efb6ea25b0e8.js deleted file mode 100644 index 232ff5a..0000000 --- a/_next/static/chunks/app/page-dfd1efb6ea25b0e8.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{67617:function(e,s,t){Promise.resolve().then(t.bind(t,64350))},64350:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return I}});var i=t(3827),n=t(64090),r=t(98909),l=t(80469),a=t(62948),c=t(71860),d=t(75615),o=t(39730),x=t(66803),m=t(9016),u=t(19807),j=t(67497),h=t(42498);let p="absolute bottom-[24px] right-[10px] top-[24px]",g="relative flex h-full flex-col items-start gap-3 p-[24px]";var v=(0,n.memo)(()=>{let{isConnected:e}=(0,d.hT)(),{staking:s}=(0,l.n)(),[,t]=(0,d.dd)();if(!e)return(0,i.jsxs)("div",{className:"flex min-h-[212px] flex-col items-center justify-center gap-[32px] uppercase",style:{backgroundImage:"url(".concat(m.sb,"/overview-bg.png)"),borderRadius:24},children:[(0,i.jsx)(r.ls,{children:"Please Log In To View"}),(0,i.jsx)("div",{children:(0,i.jsx)(r.zx,{className:"min-w-[150px]",onClick:()=>{t(!0)},children:"Log In"})})]});let n=(0,o.U2)(s.state,null)||(0,x.IB)(),a=(0,o.Cn)(null,s.state)||(0,x.IB)(),c=s.state.tokens||(0,x.IB)();return(0,i.jsxs)("div",{className:"grid min-h-[144px] flex-col items-center justify-center gap-[32px]",style:{backgroundImage:"url(".concat(m.sb,"/overview-bg.png)"),borderRadius:24,gridTemplateColumns:"1fr 1fr 1fr 1fr"},children:[(0,i.jsxs)("div",{className:g,children:[(0,i.jsx)(r.Bz,{children:"Claimable Rewards"}),(0,i.jsxs)("div",{className:"flex flex-row items-center gap-4",children:[(0,i.jsx)(r.XJ,{children:(0,j.H_)(a)}),(0,u.sj)(a)&&(0,i.jsx)(r.hp,{children:"Claim"})]}),(0,i.jsx)(r.jr,{children:(0,j.Em)(a)}),(0,i.jsx)("div",{className:p,children:(0,i.jsx)(h.i,{})})]}),(0,i.jsxs)("div",{className:g,children:[(0,i.jsx)(r.Bz,{children:"APR"}),(0,i.jsx)(r.XJ,{children:"15.57%"}),(0,i.jsx)("div",{className:p,children:(0,i.jsx)(h.i,{})})]}),(0,i.jsxs)("div",{className:g,children:[(0,i.jsx)(r.Bz,{children:"Delegated Amount"}),(0,i.jsx)(r.XJ,{children:(0,j.H_)(n)}),(0,i.jsx)(r.jr,{children:(0,j.Em)(n)}),(0,i.jsx)("div",{className:p,children:(0,i.jsx)(h.i,{})})]}),(0,i.jsxs)("div",{className:g,children:[(0,i.jsx)(r.Bz,{children:"Available For Delegation"}),(0,i.jsx)(r.XJ,{children:(0,j.H_)(c)}),(0,i.jsx)(r.jr,{children:(0,j.Em)(c)})]})]})}),f=t(22840),N=t(20534),w=t(143),b=t(80148),k=t(62986),S=t(89056),B=t(26605),y=t(48074);let C={gap:"16px",gridTemplateColumns:"60px 1.5fr repeat(3, 1fr) 80px 80px"},D=e=>{let{disabled:s,onStake:t,staking:n,validator:l}=e,{identity:a}=l.description,c=(0,S.P)(a),d=(0,o.Sg)(null==l?void 0:l.tokens,n.state),m=(0,j.gg)(d);return(0,i.jsxs)("div",{className:"flex w-full flex-col items-center justify-between gap-2",children:[(0,i.jsxs)("div",{className:"grid w-full items-center justify-between gap-2 p-4",style:C,children:[(0,i.jsx)("div",{className:"flex items-center justify-start",children:(0,i.jsx)("img",{alt:"Validator logo",className:"block w-[50px] rounded-full",src:c,style:{height:50,width:50}})}),(0,i.jsxs)("div",{className:"flex flex-1 flex-row justify-start gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col justify-start gap-2 text-left",children:[(0,i.jsx)("div",{className:"text-[14px] font-bold leading-[20px]",children:l.description.moniker}),(0,i.jsx)(B.Z,{address:l.operatorAddress})]}),(0,i.jsx)("div",{className:"flex min-w-max flex-col items-center justify-center",children:(0,o.zq)(l.operatorAddress,n.state)&&(0,i.jsx)("div",{className:"rounded-[2px] bg-successBg p-[2px] text-[11px] font-medium leading-[16px] tracking-normal text-success",children:"You staked"})})]}),(0,i.jsx)("div",{className:"text-right",children:(0,i.jsx)(y.Z,{text:(0,j.Em)((0,x.kw)(new f.Z(l.tokens)),!0)})}),(0,i.jsx)("div",{className:"text-right",children:(0,j.i)(l.commission.commissionRates.rate,2)}),d&&(0,i.jsx)("div",{className:"text-right",children:m}),(0,i.jsx)("div",{className:"text-right",children:(0,i.jsx)(r.OL,{href:"/validator?address=".concat(l.operatorAddress),children:"Details"})}),t&&(0,i.jsx)("div",{children:(0,i.jsx)(r.hp,{disabled:s,onClick:t,children:"Delegate"})})]}),(0,i.jsx)("div",{className:"box-content h-[1px] bg-bg-500",style:{width:"calc(100% - 48px)"}})]})},_=w.N;var A=(0,n.memo)(()=>{var e,s,t;let{isConnected:a,staking:c}=(0,l.n)(),[d,x]=(0,n.useState)("none"),[m,u]=(0,n.useState)("active"),[j,h]=(0,n.useState)(""),{validators:p}=c.state,g=("active"===m?(null===(e=p.bonded)||void 0===e?void 0:e.items)||[]:((null===(s=p.unbonded)||void 0===s?void 0:s.items)||[]).concat((null===(t=p.unbonding)||void 0===t?void 0:t.items)||[])).filter("active"===m?e=>e.status===N.BondStatus.BOND_STATUS_BONDED:e=>e.status===(N.BondStatus.BOND_STATUS_UNBONDED||N.BondStatus.BOND_STATUS_UNBONDING)).slice().sort((e,s)=>{if("none"===d)return 0;if(["voting-power-asc","voting-power-desc"].includes(d)){let t=(0,o.Sg)(e.tokens,c.state),i=(0,o.Sg)(s.tokens,c.state);return(0,b.B)(t,i,"voting-power-asc"===d)}if(["commission-asc","commission-desc"].includes(d)){let t=parseFloat(e.commission.commissionRates.rate),i=parseFloat(s.commission.commissionRates.rate);return(0,b.B)(t,i,"commission-asc"===d)}if(["name-asc","name-desc"].includes(d)){let t=e.description.moniker.toLowerCase(),i=s.description.moniker.toLowerCase();return(0,b.B)(t,i,"name-asc"===d)}if(["staked-asc","staked-desc"].includes(d)){let t=new f.Z(e.tokens),i=new f.Z(s.tokens);return(0,b.B)(t,i,"staked-asc"===d)}return 0}).filter(e=>{if(!j)return!0;let s=e.description.moniker.toLowerCase(),t=e.operatorAddress.toLowerCase();return s.includes(j.toLowerCase())||t.includes(j.toLowerCase())});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"grid grid-cols-3",children:[(0,i.jsxs)("div",{className:"flex w-full flex-row justify-start gap-[16px]",children:[(0,i.jsx)(r.Dx,{children:"Validators"}),(0,i.jsx)(r.Mj,{onChange:e=>h(e.target.value),value:j})]}),(0,i.jsxs)("div",{className:"flex flex-row items-center justify-center gap-[40px]",children:[(0,i.jsx)("button",{onClick:()=>{u("active")},children:"Active"}),(0,i.jsx)("button",{onClick:()=>{u("inactive")},children:"Inactive"})]})]}),(0,i.jsxs)("div",{className:"min-h-[100px] overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100",children:[(0,i.jsxs)("div",{className:"grid w-full items-center justify-between gap-2 bg-bg-500 p-4 uppercase",style:C,children:[(0,i.jsx)("div",{}),(0,i.jsx)(_,{onSort:x,sort:d,sorting:["name-asc","name-desc"],children:"Validator"}),(0,i.jsx)(_,{onSort:x,sort:d,sorting:["staked-asc","staked-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Staked Amount"})}),(0,i.jsx)(_,{onSort:x,sort:d,sorting:["commission-asc","commission-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Commission"})}),(0,i.jsx)(_,{onSort:x,sort:d,sorting:["voting-power-asc","voting-power-desc"],children:(0,i.jsx)("div",{className:"text-right",children:"Voting Power"})})]}),g.map(e=>(0,i.jsx)(D,{disabled:!a,onStake:"active"===m?()=>{c.dispatch((0,k.ZG)({content:{validator:e},type:"delegate"}))}:null,staking:c,validator:e},e.operatorAddress))]})]})}),I=(0,n.memo)(function(){let{staking:e}=(0,l.n)(),[s,t]=(0,n.useState)(!1),d=(0,a.S6)(e.state);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"page-container flex flex-col gap-6 px-[24px] pb-[24px]",children:[(0,i.jsxs)("div",{className:"mt-[40px] flex flex-row justify-between text-left",children:[(0,i.jsx)(r.Dx,{children:"Your Staking Overview"}),d&&(0,i.jsx)(a.sv,{isShowingDetails:s,setIsShowingDetails:t})]}),(0,i.jsx)(v,{}),s&&d&&(0,i.jsx)(a.ZP,{}),(0,i.jsx)(A,{})]}),(0,i.jsx)(c.Z,{})]})})}},function(e){e.O(0,[350,218,147,228,933,4,245,816,503,971,69,744],function(){return e(e.s=67617)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/app/validator/page-0427cf30f4309eb5.js b/_next/static/chunks/app/validator/page-0427cf30f4309eb5.js deleted file mode 100644 index cb89a96..0000000 --- a/_next/static/chunks/app/validator/page-0427cf30f4309eb5.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[276],{90858:function(e,s,i){Promise.resolve().then(i.bind(i,66355))},66355:function(e,s,i){"use strict";i.r(s),i.d(s,{default:function(){return B}});var t=i(3827),l=i(59115),a=i(22840),n=i(20534),d=i(8792),c=i(15313),r=i(64090),x=i(98909),o=i(6245),h=i(88197),m=i(80469),p=i(62986),j=i(39730),v=i(89056),g=i(66803),u=i(9016),N=i(67497),b=i(42498),f=i(71860),w=i(75615),k=i(62948);function z(){let e=(0,c.useSearchParams)().get("address"),s=(0,m.n)(),{core:i}=(0,o.l)(),[,l]=(0,w.dd)(),[n,d]=(0,r.useState)(!1),{isConnected:v,staking:u}=s,{isLoadingBlocking:f}=i.state,[z,B]=(0,r.useState)(null);if((0,r.useEffect)(()=>{(async()=>{e&&B(await (0,h.qp)(e,u))})()},[e,u]),!z)return(0,t.jsx)("div",{children:"Loading ..."});let S=(0,j.ap)(s.staking.state),y=(0,j.U2)(s.staking.state,null),C=(0,j.jv)(s.staking.state,null),_=(0,j.Cn)(z.operatorAddress,s.staking.state),X=(0,k.S6)(s.staking.state),D=v?(0,t.jsxs)("div",{className:"grid grid-cols-4 rounded-[24px] bg-bg-600 p-[24px]",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Bz,{children:"Claimable Rewards"}),(0,t.jsxs)("div",{className:"mb-[8px] mt-[12px] flex flex-row items-center gap-[8px]",children:[(0,t.jsx)(x.XJ,{children:(0,N.H_)(_)}),_&&(null==_?void 0:_.amount)!=="0"&&(0,t.jsx)(x.hp,{disabled:f,onClick:()=>{s.staking.dispatch((0,p.ZG)({content:{validator:z},type:"rewards"}))},children:"Claim"})]}),(0,t.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,t.jsx)(b.i,{})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Bz,{children:"My Delegation (XION)"}),(0,t.jsx)("div",{className:"mb-[8px] mt-[12px]",children:y&&(0,t.jsx)(x.XJ,{children:(0,N.HS)(new a.Z(y.amount))})}),(0,t.jsx)(x.Bz,{children:(0,N.H_)(y)}),(0,t.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,t.jsx)(b.i,{})})]}),(0,t.jsx)("div",{className:"flex flex-row gap-[16px]",children:(0,t.jsxs)("div",{className:"relative w-full",children:[(0,t.jsx)(x.Bz,{children:"Available For Delegation (XION)"}),(0,t.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,t.jsx)(x.XJ,{children:S?(0,N.HS)(S):"-"})}),(0,t.jsx)(x.Bz,{children:S?(0,N.H_)((0,g.Jp)(S)):"-"}),(0,t.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,t.jsx)(b.i,{})})]})}),(0,t.jsx)("div",{className:"flex flex-row gap-[16px]",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Bz,{children:"Unstakings (XION)"}),(0,t.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,t.jsx)(x.XJ,{children:C?(0,N.HS)(new a.Z(C.amount)):"-"})}),(0,t.jsx)(x.Bz,{children:C?(0,N.H_)(C):"-"})]})})]}):(0,t.jsxs)("div",{className:"flex h-[220px] flex-col items-center justify-center gap-[32px] rounded-[24px] bg-bg-600 uppercase",children:[(0,t.jsx)(x.ls,{children:"Please log in to view"}),(0,t.jsx)("div",{children:(0,t.jsx)(x.zx,{className:"[&]:min-w-[150px]",disabled:f,onClick:()=>{l(!0)},children:"Log in"})})]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-[24px] mt-[32px] flex flex-row items-center justify-between",children:[(0,t.jsx)(x.Dx,{children:"My Delegations"}),X&&(0,t.jsx)(k.sv,{isShowingDetails:n,setIsShowingDetails:d})]}),D,X&&n&&(0,t.jsx)(k.ZP,{})]})}function B(){let e=(0,c.useSearchParams)().get("address"),s=(0,m.n)(),{core:i}=(0,o.l)(),{isLoadingBlocking:w}=i.state,[k,B]=(0,r.useState)(null),S=(0,v.P)(null==k?void 0:k.description.identity);if((0,r.useEffect)(()=>{(async()=>{e&&B(await (0,h.qp)(e,s.staking))})()},[e,s]),!k)return(0,t.jsx)("div",{children:"Loading ..."});let y=(0,j.Sg)(k.tokens,s.staking.state),C=(0,N.gg)(y),_=new a.Z(k.tokens).div(new a.Z(10).pow(6)),X=(0,j.U2)(s.staking.state,k.operatorAddress),D=(0,j.zq)(k.operatorAddress,s.staking.state);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"page-container flex w-full flex-col gap-[16px] px-[16px] pb-[32px]",children:[(0,t.jsxs)("div",{className:"mb-[32px] mt-[40px]",children:[(0,t.jsx)(x.OL,{href:"/",children:"STAKING"})," ","> ",(0,t.jsx)("span",{children:k.description.moniker})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-[24px] p-[24px]",style:{backgroundImage:"url(".concat(u.sb,"/overview-bg.png)"),backgroundSize:"cover",borderRadius:16},children:[(0,t.jsxs)("div",{className:"flex flex-row items-center gap-[16px]",children:[(0,t.jsx)("img",{alt:"Validator logo",className:"block w-[80px] rounded-full",src:S||u.c1}),(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-[16px]",children:[(0,t.jsx)("div",{className:"typo-validator-name",children:k.description.moniker||""}),D&&(0,t.jsx)("div",{className:"rounded-[4px] bg-successBg px-[8px] py-[4px] text-[11px] text-success",children:"You staked"})]}),k.status===n.BondStatus.BOND_STATUS_BONDED&&(0,t.jsx)("div",{children:(0,t.jsx)(l.z,{disabled:!s.isConnected||w,onClick:()=>{s.staking.dispatch((0,p.ZG)({content:{validator:k},type:"delegate"}))},children:"DELEGATE NOW"})})]}),(0,t.jsx)(b.I,{}),(0,t.jsxs)("div",{className:"grid grid-cols-4",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Bz,{children:"Total Stake (XION)"}),(0,t.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,t.jsx)(x.XJ,{children:(0,N.HS)(_)})}),(0,t.jsx)(x.Bz,{children:(0,N.H_)((0,g.Jp)(_))}),(0,t.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,t.jsx)(b.i,{})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Bz,{children:"Commission Rate"}),(0,t.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,t.jsx)(x.XJ,{children:(0,N.i)(k.commission.commissionRates.rate,2)})}),(0,t.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,t.jsx)(b.i,{})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Bz,{children:"Voting Power"}),(0,t.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,t.jsx)(x.XJ,{children:C})}),(0,t.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,t.jsx)(b.i,{})})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Bz,{children:"My Delegation (XION)"}),(0,t.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,t.jsx)(x.XJ,{children:X?(0,N.HS)(new a.Z((0,g.bI)(X).amount)):"-"})}),(0,t.jsx)(x.Bz,{children:(0,N.H_)(X)})]})]}),(0,t.jsx)(b.I,{}),(0,t.jsxs)("div",{className:"grid grid-cols-4",children:[(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsx)(x.Bz,{color:"text-white",children:"XION Address"}),(0,t.jsxs)("div",{className:"inline-flex flex-row gap-2 break-all",children:[k.operatorAddress," ",(0,t.jsx)(x.M5,{textToCopy:k.operatorAddress})]})]}),k.description.website&&(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Bz,{color:"text-white",children:"Website"}),(0,t.jsx)(d.default,{href:k.description.website,target:"_blank",children:k.description.website})]}),k.description.securityContact&&(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Bz,{color:"text-white",children:"Security Contact"}),(0,t.jsx)(d.default,{href:"mailto:".concat(k.description.securityContact),children:k.description.securityContact})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(x.Bz,{color:"text-white",children:"Details"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:k.description.details}),(0,t.jsxs)("div",{children:["Max Commission Rate:"," ",(0,N.i)(k.commission.commissionRates.maxRate,0)]}),(0,t.jsxs)("div",{children:["Max commission Change Rate:"," ",(0,N.i)(k.commission.commissionRates.maxChangeRate,0)]})]})]})]}),(0,t.jsx)(z,{})]}),(0,t.jsx)(f.Z,{})]})}}},function(e){e.O(0,[350,218,147,228,933,4,245,816,503,971,69,744],function(){return e(e.s=90858)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/app/validator/page-e77375662743b728.js b/_next/static/chunks/app/validator/page-e77375662743b728.js new file mode 100644 index 0000000..0663c65 --- /dev/null +++ b/_next/static/chunks/app/validator/page-e77375662743b728.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[276],{90858:function(e,s,i){Promise.resolve().then(i.bind(i,66355))},66355:function(e,s,i){"use strict";i.r(s),i.d(s,{default:function(){return B}});var l=i(3827),t=i(59115),a=i(22840),n=i(20534),d=i(8792),c=i(15313),r=i(64090),x=i(98909),o=i(6245),h=i(88197),m=i(80469),p=i(62986),j=i(39730),v=i(89056),u=i(66803),g=i(9016),N=i(67497),b=i(42498),f=i(71860),w=i(75615),k=i(62948);function z(){let e=(0,c.useSearchParams)().get("address"),s=(0,m.n)(),{core:i}=(0,o.l)(),[,t]=(0,w.dd)(),[n,d]=(0,r.useState)(!1),{isConnected:v,staking:g}=s,{isLoadingBlocking:f}=i.state,[z,B]=(0,r.useState)(null);if((0,r.useEffect)(()=>{(async()=>{e&&B(await (0,h.qp)(e,g))})()},[e,g]),!z)return(0,l.jsx)("div",{children:"Loading ..."});let S=(0,j.ap)(g.state),y=(0,j.U2)(g.state,null),C=(0,j.jv)(g.state,null),_=(0,j.Cn)(z.operatorAddress,g.state),X=(0,k.S6)(g.state),D=v?(0,l.jsxs)("div",{className:"grid grid-cols-4 rounded-[24px] bg-bg-600 p-[24px]",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Claimable Rewards"}),(0,l.jsxs)("div",{className:"mb-[8px] mt-[12px] flex flex-row items-center gap-[8px]",children:[(0,l.jsx)(x.XJ,{children:(0,N.H_)(_)}),_&&(null==_?void 0:_.amount)!=="0"&&(0,l.jsx)(x.hp,{disabled:f,onClick:()=>{var e;g.dispatch((0,p.ZG)({content:{delegations:(null===(e=g.state.delegations)||void 0===e?void 0:e.items)||[]},type:"rewards"}))},children:"Claim"})]}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"My Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:y&&(0,l.jsx)(x.XJ,{children:(0,N.HS)(new a.Z(y.amount))})}),(0,l.jsx)(x.Bz,{children:(0,N.H_)(y)}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsx)("div",{className:"flex flex-row gap-[16px]",children:(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)(x.Bz,{children:"Available For Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:S?(0,N.HS)(S):"-"})}),(0,l.jsx)(x.Bz,{children:S?(0,N.H_)((0,u.Jp)(S)):"-"}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]})}),(0,l.jsx)("div",{className:"flex flex-row gap-[16px]",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{children:"Unstakings (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:C?(0,N.HS)(new a.Z(C.amount)):"-"})}),(0,l.jsx)(x.Bz,{children:C?(0,N.H_)(C):"-"})]})})]}):(0,l.jsxs)("div",{className:"flex h-[220px] flex-col items-center justify-center gap-[32px] rounded-[24px] bg-bg-600 uppercase",children:[(0,l.jsx)(x.ls,{children:"Please log in to view"}),(0,l.jsx)("div",{children:(0,l.jsx)(x.zx,{className:"[&]:min-w-[150px]",disabled:f,onClick:()=>{t(!0)},children:"Log in"})})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"mb-[24px] mt-[32px] flex flex-row items-center justify-between",children:[(0,l.jsx)(x.Dx,{children:"My Delegations"}),X&&(0,l.jsx)(k.sv,{isShowingDetails:n,setIsShowingDetails:d})]}),D,X&&n&&(0,l.jsx)(k.ZP,{})]})}function B(){let e=(0,c.useSearchParams)().get("address"),s=(0,m.n)(),{core:i}=(0,o.l)(),{isLoadingBlocking:w}=i.state,[k,B]=(0,r.useState)(null),S=(0,v.P)(null==k?void 0:k.description.identity);if((0,r.useEffect)(()=>{(async()=>{e&&B(await (0,h.qp)(e,s.staking))})()},[e,s]),!k)return(0,l.jsx)("div",{children:"Loading ..."});let y=(0,j.Sg)(k.tokens,s.staking.state),C=(0,N.gg)(y),_=new a.Z(k.tokens).div(new a.Z(10).pow(6)),X=(0,j.U2)(s.staking.state,k.operatorAddress),D=(0,j.zq)(k.operatorAddress,s.staking.state);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"page-container flex w-full flex-col gap-[16px] px-[16px] pb-[32px]",children:[(0,l.jsxs)("div",{className:"mb-[32px] mt-[40px]",children:[(0,l.jsx)(x.OL,{href:"/",children:"STAKING"})," ","> ",(0,l.jsx)("span",{children:k.description.moniker})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-[24px] p-[24px]",style:{backgroundImage:"url(".concat(g.sb,"/overview-bg.png)"),backgroundSize:"cover",borderRadius:16},children:[(0,l.jsxs)("div",{className:"flex flex-row items-center gap-[16px]",children:[(0,l.jsx)("img",{alt:"Validator logo",className:"block w-[80px] rounded-full",src:S||g.c1}),(0,l.jsxs)("div",{className:"flex flex-1 items-center gap-[16px]",children:[(0,l.jsx)("div",{className:"typo-validator-name",children:k.description.moniker||""}),D&&(0,l.jsx)("div",{className:"rounded-[4px] bg-successBg px-[8px] py-[4px] text-[11px] text-success",children:"You staked"})]}),k.status===n.BondStatus.BOND_STATUS_BONDED&&(0,l.jsx)("div",{children:(0,l.jsx)(t.z,{disabled:!s.isConnected||w,onClick:()=>{s.staking.dispatch((0,p.ZG)({content:{validator:k},type:"delegate"}))},children:"DELEGATE NOW"})})]}),(0,l.jsx)(b.I,{}),(0,l.jsxs)("div",{className:"grid grid-cols-4",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Total Stake (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:(0,N.HS)(_)})}),(0,l.jsx)(x.Bz,{children:(0,N.H_)((0,u.Jp)(_))}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Commission Rate"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:(0,N.i)(k.commission.commissionRates.rate,2)})}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"Voting Power"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:C})}),(0,l.jsx)("div",{className:"absolute bottom-0 right-[20px] top-0",children:(0,l.jsx)(b.i,{})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(x.Bz,{children:"My Delegation (XION)"}),(0,l.jsx)("div",{className:"mb-[8px] mt-[12px]",children:(0,l.jsx)(x.XJ,{children:X?(0,N.HS)(new a.Z((0,u.bI)(X).amount)):"-"})}),(0,l.jsx)(x.Bz,{children:(0,N.H_)(X)})]})]}),(0,l.jsx)(b.I,{}),(0,l.jsxs)("div",{className:"grid grid-cols-4",children:[(0,l.jsxs)("div",{className:"col-span-2",children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"XION Address"}),(0,l.jsxs)("div",{className:"inline-flex flex-row gap-2 break-all",children:[k.operatorAddress," ",(0,l.jsx)(x.M5,{textToCopy:k.operatorAddress})]})]}),k.description.website&&(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Website"}),(0,l.jsx)(d.default,{href:k.description.website,target:"_blank",children:k.description.website})]}),k.description.securityContact&&(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Security Contact"}),(0,l.jsx)(d.default,{href:"mailto:".concat(k.description.securityContact),children:k.description.securityContact})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(x.Bz,{color:"text-white",children:"Details"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:k.description.details}),(0,l.jsxs)("div",{children:["Max Commission Rate:"," ",(0,N.i)(k.commission.commissionRates.maxRate,0)]}),(0,l.jsxs)("div",{children:["Max commission Change Rate:"," ",(0,N.i)(k.commission.commissionRates.maxChangeRate,0)]})]})]})]}),(0,l.jsx)(z,{})]}),(0,l.jsx)(f.Z,{})]})}}},function(e){e.O(0,[350,218,147,228,933,4,245,816,503,971,69,744],function(){return e(e.s=90858)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/pAOZFmz65xxHkmymOSIHX/_buildManifest.js b/_next/static/vKS50s-SqSS05fQWU-TXS/_buildManifest.js similarity index 100% rename from _next/static/pAOZFmz65xxHkmymOSIHX/_buildManifest.js rename to _next/static/vKS50s-SqSS05fQWU-TXS/_buildManifest.js diff --git a/_next/static/pAOZFmz65xxHkmymOSIHX/_ssgManifest.js b/_next/static/vKS50s-SqSS05fQWU-TXS/_ssgManifest.js similarity index 100% rename from _next/static/pAOZFmz65xxHkmymOSIHX/_ssgManifest.js rename to _next/static/vKS50s-SqSS05fQWU-TXS/_ssgManifest.js diff --git a/index.html b/index.html index 2883e2d..153faa0 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -XION Staking
Your Staking Overview
Please Log In To View
Validators
Validator
Staked Amount
Commission
Voting Power
\ No newline at end of file +XION Staking
Your Staking Overview
Please Log In To View
Validators
Validator
Staked Amount
Commission
Voting Power
\ No newline at end of file diff --git a/index.txt b/index.txt index de86d4b..cb746fd 100644 --- a/index.txt +++ b/index.txt @@ -1,7 +1,7 @@ -2:I[64350,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-fbe661fc5df9349d.js","245","static/chunks/245-8266bc6575a22c44.js","816","static/chunks/816-eb86ba1609f525f6.js","503","static/chunks/503-59dce0c9fc83ff1c.js","931","static/chunks/app/page-dfd1efb6ea25b0e8.js"],""] -3:I[56225,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-fbe661fc5df9349d.js","816","static/chunks/816-eb86ba1609f525f6.js","185","static/chunks/app/layout-60929d98c5cc30c3.js"],""] +2:I[64350,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-f9ab361db4f4f038.js","245","static/chunks/245-8266bc6575a22c44.js","816","static/chunks/816-cac8172353521c02.js","503","static/chunks/503-311c908eac1df4f6.js","931","static/chunks/app/page-5762d3667c36ba9b.js"],""] +3:I[56225,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-f9ab361db4f4f038.js","816","static/chunks/816-cac8172353521c02.js","185","static/chunks/app/layout-f8bb99b6df23ac99.js"],""] 4:I[5613,[],""] 5:I[31778,[],""] -0:["pAOZFmz65xxHkmymOSIHX",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},["$L1",["$","$L2",null,{}],null]]},[null,["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],"params":{}}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/8e69049fa282e630.css","precedence":"next","crossOrigin":""}],["$","link","1",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/9e20252c6882c039.css","precedence":"next","crossOrigin":""}]],"$L6"]]]] +0:["vKS50s-SqSS05fQWU-TXS",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},["$L1",["$","$L2",null,{}],null]]},[null,["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],"params":{}}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/8e69049fa282e630.css","precedence":"next","crossOrigin":""}],["$","link","1",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/9e20252c6882c039.css","precedence":"next","crossOrigin":""}]],"$L6"]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"XION Staking"}],["$","link","3",{"rel":"icon","href":"/xion-staking/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null diff --git a/validator.html b/validator.html index ce4bc60..6a179dc 100644 --- a/validator.html +++ b/validator.html @@ -1 +1 @@ -XION Validator Details
\ No newline at end of file +XION Validator Details
\ No newline at end of file diff --git a/validator.txt b/validator.txt index 30d5d49..bae4e80 100644 --- a/validator.txt +++ b/validator.txt @@ -1,8 +1,8 @@ 2:"$Sreact.suspense" -3:I[66355,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-fbe661fc5df9349d.js","245","static/chunks/245-8266bc6575a22c44.js","816","static/chunks/816-eb86ba1609f525f6.js","503","static/chunks/503-59dce0c9fc83ff1c.js","276","static/chunks/app/validator/page-0427cf30f4309eb5.js"],""] +3:I[66355,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-f9ab361db4f4f038.js","245","static/chunks/245-8266bc6575a22c44.js","816","static/chunks/816-cac8172353521c02.js","503","static/chunks/503-311c908eac1df4f6.js","276","static/chunks/app/validator/page-e77375662743b728.js"],""] 4:I[5613,[],""] 5:I[31778,[],""] -6:I[56225,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-fbe661fc5df9349d.js","816","static/chunks/816-eb86ba1609f525f6.js","185","static/chunks/app/layout-60929d98c5cc30c3.js"],""] -0:["pAOZFmz65xxHkmymOSIHX",[[["",{"children":["validator",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["validator",{"children":["__PAGE__",{},["$L1",["$","$2",null,{"children":["$","$L3",null,{}]}],null]]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","validator","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],"params":{}}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/8e69049fa282e630.css","precedence":"next","crossOrigin":""}],["$","link","1",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/9e20252c6882c039.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +6:I[56225,["350","static/chunks/68b159eb-f350a487f88c1bfb.js","218","static/chunks/aaea2bcf-4abc2b343ea41dae.js","147","static/chunks/6468630d-7fefcf7a3223f2f0.js","228","static/chunks/77693919-7b92b10f5ae0e31c.js","933","static/chunks/5ebe7343-e8d67ddb6cca8663.js","4","static/chunks/4-f9ab361db4f4f038.js","816","static/chunks/816-cac8172353521c02.js","185","static/chunks/app/layout-f8bb99b6df23ac99.js"],""] +0:["vKS50s-SqSS05fQWU-TXS",[[["",{"children":["validator",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["validator",{"children":["__PAGE__",{},["$L1",["$","$2",null,{"children":["$","$L3",null,{}]}],null]]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","validator","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],"params":{}}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/8e69049fa282e630.css","precedence":"next","crossOrigin":""}],["$","link","1",{"rel":"stylesheet","href":"/xion-staking/_next/static/css/9e20252c6882c039.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] 7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"XION Validator Details"}],["$","link","3",{"rel":"icon","href":"/xion-staking/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null