diff --git a/index.html b/index.html index 40218328273e..c7afcbdf05f8 100644 --- a/index.html +++ b/index.html @@ -124,7 +124,7 @@ opacity: 0.15; } - +
diff --git a/ipfs/pin.json b/ipfs/pin.json index 781847cf304e..1b513a1f2f68 100644 --- a/ipfs/pin.json +++ b/ipfs/pin.json @@ -1 +1 @@ -{"IpfsHash":"QmPcvaVeVFvipCCjnjFm5gG2GRSmKaafWbCiH18cojbvsK","PinSize":37876769,"Timestamp":"2024-07-02T00:42:00.564Z"} \ No newline at end of file +{"IpfsHash":"QmfS8kEBmo7K8KzFtyCYJUqHgv8CEbNtm1p55kiQeo4sYC","PinSize":37966223,"Timestamp":"2024-07-18T15:33:53.579Z"} \ No newline at end of file diff --git a/main.ad195b04ab2cc3c9.js b/main.8f4037d87eee3914.js similarity index 99% rename from main.ad195b04ab2cc3c9.js rename to main.8f4037d87eee3914.js index 5c066f491cb7..b8c3d780c33b 100644 --- a/main.ad195b04ab2cc3c9.js +++ b/main.8f4037d87eee3914.js @@ -308,7 +308,7 @@ } } } -`,At=g.memo((function({className:e="",isActive:n,name:t,routes:i}){return 1===i.length&&"settings"===i[0].group?(0,r.jsx)(kt,{className:n?"isActive":"",classNameText:"smallHide",isToplevel:!0,route:i[0]}):(0,r.jsxs)(jt,{className:`${e} ${n?"isActive":""}`,children:[(0,r.jsxs)("div",{className:"groupHdr "+(n?"":"highlight--color-contrast"),children:[(0,r.jsx)("span",{className:"smallHide",children:t}),(0,r.jsx)(A.JO,{className:"smallShow",icon:i[0].icon}),(0,r.jsx)(A.JO,{icon:"caret-down"})]}),(0,r.jsx)("ul",{className:"groupMenu",children:i.map((e=>(0,r.jsx)(kt,{route:e},e.name)))})]})}));var Nt=t(39082),It=t(52727);const St=`apps v${"0.142.1".replace("-x","")}`,Zt=A.zo.div` +`,At=g.memo((function({className:e="",isActive:n,name:t,routes:i}){return 1===i.length&&"settings"===i[0].group?(0,r.jsx)(kt,{className:n?"isActive":"",classNameText:"smallHide",isToplevel:!0,route:i[0]}):(0,r.jsxs)(jt,{className:`${e} ${n?"isActive":""}`,children:[(0,r.jsxs)("div",{className:"groupHdr "+(n?"":"highlight--color-contrast"),children:[(0,r.jsx)("span",{className:"smallHide",children:t}),(0,r.jsx)(A.JO,{className:"smallShow",icon:i[0].icon}),(0,r.jsx)(A.JO,{icon:"caret-down"})]}),(0,r.jsx)("ul",{className:"groupMenu",children:i.map((e=>(0,r.jsx)(kt,{route:e},e.name)))})]})}));var Nt=t(39082),It=t(52727);const St=`apps v${"0.142.2-0-x".replace("-x","")}`,Zt=A.zo.div` background: transparent; font-size: var(--font-size-tiny); line-height: 1.2; diff --git a/page.c0b44ff3a3c4bed9.js b/page.e6042cb57cd599f4.js similarity index 98% rename from page.c0b44ff3a3c4bed9.js rename to page.e6042cb57cd599f4.js index 5b18cc1c6e98..b6a445d63ae2 100644 --- a/page.c0b44ff3a3c4bed9.js +++ b/page.e6042cb57cd599f4.js @@ -772,7 +772,7 @@ color: rgba(255, 196, 12, 1); margin-right: 0.5rem; } -`,Ut=n.memo((function({children:e,className:s="",withIcon:t=!0}){return(0,a.jsxs)(Ht,{className:`${s} mark warning`,children:[t&&(0,a.jsx)(l.JO,{icon:"exclamation-triangle"}),(0,a.jsx)("strong",{children:"Nomination Pools are evolving!"}),(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"Soon you will be able to participate in a pool and in OpenGov with your pooled funds, and switch pools with the same ease as solo stakers!",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"You do not need to do anything, unless you are participating in a pool and also staking solo from the same account.",(0,a.jsx)("br",{}),"In this case, you need to unbond the funds you are staking solo ",(0,a.jsx)("strong",{children:"as soon as possible"}),", in order to avail yourself from the automatic migration that will happen, and avoid migrating your pool membership manually. Please check",(0,a.jsx)("a",{href:"https://hackmd.io/@ak0n/delegate-stake-faq",rel:"noreferrer",target:"_blank",children:"this article"}),"for more details.",e]})})),Jt=(0,I.e)("useNominations",(function(e=!0){const{api:s}=(0,c.h)(),t=(0,m.W7)(e&&s.query.staking.nominators.entries);return(0,n.useMemo)((()=>t&&function(e){const s={};for(let t=0,a=e.length;t({activeEra:e,eraLength:s,lastEra:e.isZero()?v.nw:e.sub(v.If),sessionLength:t})},sa={defaultValue:{},transform:([e,s,t,a,n,o,r,i])=>({counterForNominators:s,counterForValidators:t,historyDepth:e,maxNominatorsCount:a&&a.isSome?a.unwrap():void 0,maxValidatorsCount:n&&n.isSome?n.unwrap():void 0,minNominatorBond:o,minValidatorBond:r,totalIssuance:i})};function ta(e,s){return(e.legacyClaimedRewards||e.claimedRewards||[]).concat(s.toArray())}function aa(e){return(s,t)=>(s[e]=t+1,s)}function na(e){return!e.nextElected}function oa(e){const s=[];return e.filter((({accountId:e})=>{const t=e.toString();return!s.includes(t)&&(s.push(t),!0)})).sort(((e,s)=>s.bondOther.cmp(e.bondOther))).map(aa("rankBondOther")).sort(((e,s)=>s.bondOwn.cmp(e.bondOwn))).map(aa("rankBondOwn")).sort(((e,s)=>s.bondTotal.cmp(e.bondTotal))).map(aa("rankBondTotal")).sort(((e,s)=>e.stakedReturnCmp-s.stakedReturnCmp)).map(aa("rankReward")).sort(((e,s)=>s.stakedReturnCmp-e.stakedReturnCmp||e.commissionPer-s.commissionPer||s.rankBondTotal-e.rankBondTotal)).map(aa("rankOverall")).sort(((e,s)=>e.isFavorite===s.isFavorite?0:e.isFavorite?-1:1))}function ra(e,s,t,a,{activeEra:n,eraLength:o,lastEra:r,sessionLength:i},l,c){const d={},u=e.createType("SpStakingExposurePage"),m=e.createType("SpStakingPagedExposureMetadata"),h=l&&r.sub(l).iadd(v.If),p=new Array(t.info.length);for(let l=0;l")})=>{const a=t.unwrap();return s.isZero()||a.lt(s)?a:s}),v.nw),A=x.toString(),P=ta(j,g),M=r.isZero()?void 0:P[P.length-1];p[l]={accountId:x,bondOther:C.sub(k),bondOwn:k,bondShare:0,bondTotal:C,commissionPer:y.commission.unwrap().toNumber()/1e7,exposureMeta:N||m,exposurePaged:w||u,isActive:!S,isBlocking:!(!y.blocked||!y.blocked.isTrue),isElected:!na(t)&&t.nextElected.some((e=>e.eq(x))),isFavorite:a.includes(A),isNominating:(w&&w.others||[]).reduce(((e,t)=>{const a=t.who.toString();return d[a]=(d[a]||v.nw).add(t.value?.toBn()||v.nw),e||s.includes(a)}),s.includes(A)),key:A,knownLength:n.sub(P[0]||n),lastPayout:h&&M&&M.gt(h)&&!i.eq(v.If)?r.sub(M).mul(o):void 0,minNominated:I,numNominators:(w&&w.others||[]).length,numRecentPayouts:h?P.filter((e=>e.gte(h))).length:0,rankBondOther:0,rankBondOwn:0,rankBondTotal:0,rankNumNominators:0,rankOverall:0,rankReward:0,skipRewards:S,stakedReturn:0,stakedReturnCmp:0,validatorPrefs:y,withReturns:c}}return[p,d]}function ia(e,s){const t=s.avgStaked,a=s.validators;return a?(t&&!t.isZero()&&a.forEach((s=>{if(!s.skipRewards&&s.withReturns){const a=t.mul(v.S8).imuln(e.stakedReturn).div(s.bondTotal);s.stakedReturn=(a.gt(v.Ew)?v.Ew:a).toNumber()/v.S8.toNumber(),s.stakedReturnCmp=s.stakedReturn*(100-s.commissionPer)/100}})),{...s,validators:oa(a)}):s}const la=(0,I.e)("useSortedTargets",(function(e,s){const{api:t}=(0,c.h)(),{allAccounts:a}=(0,d.x)(),{counterForNominators:o,counterForValidators:r,historyDepth:i,maxNominatorsCount:l,maxValidatorsCount:u,minNominatorBond:p,minValidatorBond:x,totalIssuance:g}=(0,h.L)([t.query.staking.historyDepth,t.query.staking.counterForNominators,t.query.staking.counterForValidators,t.query.staking.maxNominatorsCount,t.query.staking.maxValidatorsCount,t.query.staking.minNominatorBond,t.query.staking.minValidatorBond,t.query.balances?.totalIssuance],sa),f=(0,m.W7)(t.derive.staking.electedInfo,[{...Kt,withClaimedRewardsEras:s,withLedger:s}]),b=(0,m.W7)(t.derive.staking.waitingInfo,[{...Yt,withClaimedRewardsEras:s,withLedger:s}]),y=(0,m.W7)(t.derive.session.info,void 0,ea),w=(0,n.useMemo)((()=>f&&y&&g&&b?function(e,s,t,a,n,o,r,i){const[l,c]=ra(e,s,t,n,r,i,!0),[d]=ra(e,s,a,n,r),u=l.filter((({isActive:e})=>e)).map((({bondTotal:e})=>e)).sort(((e,s)=>e.cmp(s))),m=u.reduce(((e,s)=>e.iadd(s)),new(j())(0)),h=m.divn(u.length),p=Object.values(c).reduce(((e,s)=>e.isZero()||s.lt(e)?s:e),v.nw),x=(0,Qt.a)([l,d]),g=x.map((({commissionPer:e})=>e)).sort(((e,s)=>e-s)),f=Math.floor(g.length/2),b=g.length?g.length%2?g[f]:(g[f-1]+g[f])/2:0,y=d.map((({key:e})=>e)),w=(0,Qt.a)([l.map((({key:e})=>e)),y]),N=(0,Qt.a)([l.filter((({isBlocking:e})=>!e)).map((({key:e})=>e)),d.filter((({isBlocking:e})=>!e)).map((({key:e})=>e))]);return{avgStaked:h,lastEra:r.lastEra,lowStaked:u[0]||v.nw,medianComm:b,minNominated:p,nominateIds:N,nominators:Object.keys(c),totalIssuance:o,totalStaked:m,validatorIds:w,validators:x,waitingIds:y}}(t,a,f,b,e,g,y,t.consts.staking.historyDepth||i):Xt),[t,a,f,e,i,y,g,b]),N=(0,Gt.V)(w?.totalStaked);return(0,n.useMemo)((()=>({counterForNominators:o,counterForValidators:r,historyDepth:t.consts.staking.historyDepth||i,inflation:N,maxNominatorsCount:l,maxValidatorsCount:u,medianComm:0,minNominated:v.nw,minNominatorBond:p,minValidatorBond:x,...N?.stakedReturn?ia(N,w):w})),[t,w,o,r,i,N,l,u,p,x])})),ca=["actions","payout"],da={defaultValue:[!1,void 0,{}],transform:([e,s,t,a])=>[!!e&&e.isOpen,s&&!s.isZero()?s:void 0,t&&a?a.reduce(((e,s)=>({...e,[t[s.toNumber()].toString()]:!0})),{}):{}]},ua=l.zo.main` +`,Ut=n.memo((function({children:e,className:s="",withIcon:t=!0}){return(0,a.jsxs)(Ht,{className:`${s} mark warning`,children:[t&&(0,a.jsx)(l.JO,{icon:"exclamation-triangle"}),(0,a.jsx)("strong",{children:"Nomination Pools are evolving!"}),(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"Soon you will be able to participate in a pool and in OpenGov with your pooled funds!",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"You do not need to do anything, unless you are participating in a pool and also staking solo from the same account.",(0,a.jsx)("br",{}),"In this case, you need to unbond the funds you are staking solo ",(0,a.jsx)("strong",{children:"as soon as possible"}),", in order to avail yourself from the automatic migration that will happen, and avoid migrating your pool membership manually. Please check",(0,a.jsx)("a",{href:"https://hackmd.io/@ak0n/delegate-stake-faq",rel:"noreferrer",target:"_blank",children:"this article"}),"for more details.",e]})})),Jt=(0,I.e)("useNominations",(function(e=!0){const{api:s}=(0,c.h)(),t=(0,m.W7)(e&&s.query.staking.nominators.entries);return(0,n.useMemo)((()=>t&&function(e){const s={};for(let t=0,a=e.length;t({activeEra:e,eraLength:s,lastEra:e.isZero()?v.nw:e.sub(v.If),sessionLength:t})},sa={defaultValue:{},transform:([e,s,t,a,n,o,r,i])=>({counterForNominators:s,counterForValidators:t,historyDepth:e,maxNominatorsCount:a&&a.isSome?a.unwrap():void 0,maxValidatorsCount:n&&n.isSome?n.unwrap():void 0,minNominatorBond:o,minValidatorBond:r,totalIssuance:i})};function ta(e,s){return(e.legacyClaimedRewards||e.claimedRewards||[]).concat(s.toArray())}function aa(e){return(s,t)=>(s[e]=t+1,s)}function na(e){return!e.nextElected}function oa(e){const s=[];return e.filter((({accountId:e})=>{const t=e.toString();return!s.includes(t)&&(s.push(t),!0)})).sort(((e,s)=>s.bondOther.cmp(e.bondOther))).map(aa("rankBondOther")).sort(((e,s)=>s.bondOwn.cmp(e.bondOwn))).map(aa("rankBondOwn")).sort(((e,s)=>s.bondTotal.cmp(e.bondTotal))).map(aa("rankBondTotal")).sort(((e,s)=>e.stakedReturnCmp-s.stakedReturnCmp)).map(aa("rankReward")).sort(((e,s)=>s.stakedReturnCmp-e.stakedReturnCmp||e.commissionPer-s.commissionPer||s.rankBondTotal-e.rankBondTotal)).map(aa("rankOverall")).sort(((e,s)=>e.isFavorite===s.isFavorite?0:e.isFavorite?-1:1))}function ra(e,s,t,a,{activeEra:n,eraLength:o,lastEra:r,sessionLength:i},l,c){const d={},u=e.createType("SpStakingExposurePage"),m=e.createType("SpStakingPagedExposureMetadata"),h=l&&r.sub(l).iadd(v.If),p=new Array(t.info.length);for(let l=0;l")})=>{const a=t.unwrap();return s.isZero()||a.lt(s)?a:s}),v.nw),A=x.toString(),P=ta(j,g),M=r.isZero()?void 0:P[P.length-1];p[l]={accountId:x,bondOther:C.sub(k),bondOwn:k,bondShare:0,bondTotal:C,commissionPer:y.commission.unwrap().toNumber()/1e7,exposureMeta:N||m,exposurePaged:w||u,isActive:!S,isBlocking:!(!y.blocked||!y.blocked.isTrue),isElected:!na(t)&&t.nextElected.some((e=>e.eq(x))),isFavorite:a.includes(A),isNominating:(w&&w.others||[]).reduce(((e,t)=>{const a=t.who.toString();return d[a]=(d[a]||v.nw).add(t.value?.toBn()||v.nw),e||s.includes(a)}),s.includes(A)),key:A,knownLength:n.sub(P[0]||n),lastPayout:h&&M&&M.gt(h)&&!i.eq(v.If)?r.sub(M).mul(o):void 0,minNominated:I,numNominators:(w&&w.others||[]).length,numRecentPayouts:h?P.filter((e=>e.gte(h))).length:0,rankBondOther:0,rankBondOwn:0,rankBondTotal:0,rankNumNominators:0,rankOverall:0,rankReward:0,skipRewards:S,stakedReturn:0,stakedReturnCmp:0,validatorPrefs:y,withReturns:c}}return[p,d]}function ia(e,s){const t=s.avgStaked,a=s.validators;return a?(t&&!t.isZero()&&a.forEach((s=>{if(!s.skipRewards&&s.withReturns){const a=t.mul(v.S8).imuln(e.stakedReturn).div(s.bondTotal);s.stakedReturn=(a.gt(v.Ew)?v.Ew:a).toNumber()/v.S8.toNumber(),s.stakedReturnCmp=s.stakedReturn*(100-s.commissionPer)/100}})),{...s,validators:oa(a)}):s}const la=(0,I.e)("useSortedTargets",(function(e,s){const{api:t}=(0,c.h)(),{allAccounts:a}=(0,d.x)(),{counterForNominators:o,counterForValidators:r,historyDepth:i,maxNominatorsCount:l,maxValidatorsCount:u,minNominatorBond:p,minValidatorBond:x,totalIssuance:g}=(0,h.L)([t.query.staking.historyDepth,t.query.staking.counterForNominators,t.query.staking.counterForValidators,t.query.staking.maxNominatorsCount,t.query.staking.maxValidatorsCount,t.query.staking.minNominatorBond,t.query.staking.minValidatorBond,t.query.balances?.totalIssuance],sa),f=(0,m.W7)(t.derive.staking.electedInfo,[{...Kt,withClaimedRewardsEras:s,withLedger:s}]),b=(0,m.W7)(t.derive.staking.waitingInfo,[{...Yt,withClaimedRewardsEras:s,withLedger:s}]),y=(0,m.W7)(t.derive.session.info,void 0,ea),w=(0,n.useMemo)((()=>f&&y&&g&&b?function(e,s,t,a,n,o,r,i){const[l,c]=ra(e,s,t,n,r,i,!0),[d]=ra(e,s,a,n,r),u=l.filter((({isActive:e})=>e)).map((({bondTotal:e})=>e)).sort(((e,s)=>e.cmp(s))),m=u.reduce(((e,s)=>e.iadd(s)),new(j())(0)),h=m.divn(u.length),p=Object.values(c).reduce(((e,s)=>e.isZero()||s.lt(e)?s:e),v.nw),x=(0,Qt.a)([l,d]),g=x.map((({commissionPer:e})=>e)).sort(((e,s)=>e-s)),f=Math.floor(g.length/2),b=g.length?g.length%2?g[f]:(g[f-1]+g[f])/2:0,y=d.map((({key:e})=>e)),w=(0,Qt.a)([l.map((({key:e})=>e)),y]),N=(0,Qt.a)([l.filter((({isBlocking:e})=>!e)).map((({key:e})=>e)),d.filter((({isBlocking:e})=>!e)).map((({key:e})=>e))]);return{avgStaked:h,lastEra:r.lastEra,lowStaked:u[0]||v.nw,medianComm:b,minNominated:p,nominateIds:N,nominators:Object.keys(c),totalIssuance:o,totalStaked:m,validatorIds:w,validators:x,waitingIds:y}}(t,a,f,b,e,g,y,t.consts.staking.historyDepth||i):Xt),[t,a,f,e,i,y,g,b]),N=(0,Gt.V)(w?.totalStaked);return(0,n.useMemo)((()=>({counterForNominators:o,counterForValidators:r,historyDepth:t.consts.staking.historyDepth||i,inflation:N,maxNominatorsCount:l,maxValidatorsCount:u,medianComm:0,minNominated:v.nw,minNominatorBond:p,minValidatorBond:x,...N?.stakedReturn?ia(N,w):w})),[t,w,o,r,i,N,l,u,p,x])})),ca=["actions","payout"],da={defaultValue:[!1,void 0,{}],transform:([e,s,t,a])=>[!!e&&e.isOpen,s&&!s.isZero()?s:void 0,t&&a?a.reduce(((e,s)=>({...e,[t[s.toNumber()].toString()]:!0})),{}):{}]},ua=l.zo.main` .staking--Chart { margin-top: 1.5rem;