chore: replace toHuman() with toBoolArray() for availability votes (#12022)
This commit is contained in:
parent
8b6886b785
commit
5c8ac7b0b1
@ -74,12 +74,9 @@ function Parachain ({ bestNumber, className = '', id, lastBacked, lastInclusion,
|
||||
useEffect((): void => {
|
||||
if (sessionValidators) {
|
||||
if (paraInfo.pendingAvail) {
|
||||
const list = paraInfo.pendingAvail.availabilityVotes.toHuman()
|
||||
.slice(2)
|
||||
.replace(/_/g, '')
|
||||
.split('')
|
||||
.map((c, index) => c === '0' ? sessionValidators[index] : null)
|
||||
.filter((v, index): v is AccountId => !!v && index < sessionValidators.length);
|
||||
const list = paraInfo.pendingAvail.availabilityVotes.toBoolArray()
|
||||
.map((voted, index) => !voted && index < sessionValidators.length ? sessionValidators[index] : null)
|
||||
.filter((v): v is AccountId => !!v);
|
||||
|
||||
list.length !== sessionValidators.length && setNonBacked(list);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user