Skip to content

Commit

Permalink
Update Acala paraId (polkadot-js#4424)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr authored Jan 15, 2021
1 parent 91ef70c commit 1c2cda4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/apps-config/src/endpoints/testingRococo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function createRococo (t: TFunction): EndpointOption {
// add any additional parachains here, alphabetical
{
info: 'rococoAcala',
paraId: 666,
paraId: 667,
text: t('rpc.rococo.acala', 'Mandala PC2', { ns: 'apps-config' }),
providers: {
Acala: 'wss://rococo-1.acala.laminar.one/ws'
Expand Down
11 changes: 8 additions & 3 deletions packages/page-parachains/src/Proposals/Proposals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import type { Proposals as UseProposals } from '../types';

import React, { useRef } from 'react';
import React, { useMemo, useRef } from 'react';

import { Table } from '@polkadot/react-components';

Expand All @@ -17,6 +17,11 @@ interface Props {
function Proposals ({ proposals }: Props): React.ReactElement<Props> {
const { t } = useTranslation();

const sortedIds = useMemo(
() => proposals && proposals.proposalIds.sort((a, b) => a.cmp(b)),
[proposals]
);

const headerRef = useRef([
[t('proposals'), 'start', 2],
[],
Expand All @@ -30,10 +35,10 @@ function Proposals ({ proposals }: Props): React.ReactElement<Props> {

return (
<Table
empty={proposals && t<string>('There are no pending proposals')}
empty={proposals && sortedIds && t<string>('There are no pending proposals')}
header={headerRef.current}
>
{proposals?.proposalIds.map((id): React.ReactNode => (
{proposals && sortedIds?.map((id): React.ReactNode => (
<Proposal
approvedIds={proposals.approvedIds}
id={id}
Expand Down

0 comments on commit 1c2cda4

Please sign in to comment.