Fix loan display where there are no endpoints (#5581)
This commit is contained in:
parent
f3369f4ab9
commit
ffb92d4958
@ -61,9 +61,12 @@ export function expandEndpoint (t: TFunction, { dnslink, genesisHash, homepage,
|
||||
const last = result[result.length - 1];
|
||||
const options: LinkOption[] = [];
|
||||
|
||||
linked.sort(sortLinks).forEach((o) =>
|
||||
options.push(...expandEndpoint(t, o, firstOnly))
|
||||
);
|
||||
linked
|
||||
.sort(sortLinks)
|
||||
.filter(({ paraId }) => paraId)
|
||||
.forEach((o) =>
|
||||
options.push(...expandEndpoint(t, o, firstOnly))
|
||||
);
|
||||
|
||||
last.isRelay = true;
|
||||
last.linked = options;
|
||||
|
||||
@ -66,7 +66,7 @@ function Fund ({ bestHash, bestNumber, className, isOdd, isOngoing, leasePeriod,
|
||||
const canContribute = isOngoing && !isCapped && !isWinner && !!blocksLeft;
|
||||
const canDissolve = raised.isZero();
|
||||
const canWithdraw = !raised.isZero() && hasEnded;
|
||||
const homepage = endpoints.length && endpoints[0].homepage;
|
||||
const homepage = endpoints.length !== 0 && endpoints[0].homepage;
|
||||
|
||||
useEffect((): void => {
|
||||
setLastChange((prev): LastChange => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user