Leszek Wiesner 4 лет назад
Родитель
Сommit
59d657ca38
100 измененных файлов с 0 добавлено и 5328 удалено
  1. 0 22
      pioneer/packages/app-123code/README.md
  2. 0 16
      pioneer/packages/app-123code/package.json
  3. 0 49
      pioneer/packages/app-123code/src/AccountSelector.tsx
  4. 0 28
      pioneer/packages/app-123code/src/Summary.tsx
  5. 0 65
      pioneer/packages/app-123code/src/SummaryBar.tsx
  6. 0 47
      pioneer/packages/app-123code/src/Transfer.tsx
  7. 0 38
      pioneer/packages/app-123code/src/index.tsx
  8. 0 7
      pioneer/packages/app-123code/src/translate.ts
  9. 0 1
      pioneer/packages/app-claims/README.md
  10. 0 17
      pioneer/packages/app-claims/package.json
  11. 0 107
      pioneer/packages/app-claims/src/Claim.tsx
  12. 0 259
      pioneer/packages/app-claims/src/index.tsx
  13. 0 8
      pioneer/packages/app-claims/src/secp256k1.d.ts
  14. 0 7
      pioneer/packages/app-claims/src/translate.ts
  15. 0 19
      pioneer/packages/app-claims/src/util.spec.ts
  16. 0 111
      pioneer/packages/app-claims/src/util.ts
  17. 0 1
      pioneer/packages/app-council/README.md
  18. 0 17
      pioneer/packages/app-council/package.json
  19. 0 104
      pioneer/packages/app-council/src/Motions/Motion.tsx
  20. 0 147
      pioneer/packages/app-council/src/Motions/Propose.tsx
  21. 0 44
      pioneer/packages/app-council/src/Motions/index.tsx
  22. 0 34
      pioneer/packages/app-council/src/Overview/Candidate.tsx
  23. 0 33
      pioneer/packages/app-council/src/Overview/Member.tsx
  24. 0 85
      pioneer/packages/app-council/src/Overview/Members.tsx
  25. 0 51
      pioneer/packages/app-council/src/Overview/SubmitCandidacy.tsx
  26. 0 53
      pioneer/packages/app-council/src/Overview/Summary.tsx
  27. 0 303
      pioneer/packages/app-council/src/Overview/Vote.tsx
  28. 0 38
      pioneer/packages/app-council/src/Overview/VoteValue.tsx
  29. 0 38
      pioneer/packages/app-council/src/Overview/Voters.tsx
  30. 0 56
      pioneer/packages/app-council/src/Overview/index.tsx
  31. 0 17
      pioneer/packages/app-council/src/Overview/types.ts
  32. 0 44
      pioneer/packages/app-council/src/index.tsx
  33. 0 7
      pioneer/packages/app-council/src/translate.ts
  34. 0 22
      pioneer/packages/app-dashboard/README.md
  35. 0 17
      pioneer/packages/app-dashboard/package.json
  36. 0 39
      pioneer/packages/app-dashboard/src/Entry.tsx
  37. 0 13
      pioneer/packages/app-dashboard/src/Spacer.tsx
  38. 0 68
      pioneer/packages/app-dashboard/src/index.tsx
  39. 0 7
      pioneer/packages/app-dashboard/src/translate.ts
  40. 0 1
      pioneer/packages/app-democracy/README.md
  41. 0 17
      pioneer/packages/app-democracy/package.json
  42. 0 84
      pioneer/packages/app-democracy/src/Overview/Proposal.tsx
  43. 0 42
      pioneer/packages/app-democracy/src/Overview/Proposals.tsx
  44. 0 122
      pioneer/packages/app-democracy/src/Overview/Propose.tsx
  45. 0 165
      pioneer/packages/app-democracy/src/Overview/Referendum.tsx
  46. 0 46
      pioneer/packages/app-democracy/src/Overview/Referendums.tsx
  47. 0 92
      pioneer/packages/app-democracy/src/Overview/Seconding.tsx
  48. 0 68
      pioneer/packages/app-democracy/src/Overview/Summary.tsx
  49. 0 100
      pioneer/packages/app-democracy/src/Overview/Voting.tsx
  50. 0 24
      pioneer/packages/app-democracy/src/Overview/index.tsx
  51. 0 46
      pioneer/packages/app-democracy/src/index.tsx
  52. 0 13
      pioneer/packages/app-democracy/src/md/basic.md
  53. 0 7
      pioneer/packages/app-democracy/src/translate.ts
  54. 0 3
      pioneer/packages/app-generic-asset/README.md
  55. 0 16
      pioneer/packages/app-generic-asset/package.json
  56. 0 47
      pioneer/packages/app-generic-asset/src/AssetCard.tsx
  57. 0 66
      pioneer/packages/app-generic-asset/src/AssetRow.tsx
  58. 0 68
      pioneer/packages/app-generic-asset/src/Assets.tsx
  59. 0 150
      pioneer/packages/app-generic-asset/src/Transfer.tsx
  60. 0 44
      pioneer/packages/app-generic-asset/src/assetsRegistry.tsx
  61. 0 45
      pioneer/packages/app-generic-asset/src/index.tsx
  62. 0 76
      pioneer/packages/app-generic-asset/src/modals/Create.tsx
  63. 0 7
      pioneer/packages/app-generic-asset/src/translate.ts
  64. 0 1
      pioneer/packages/app-parachains/README.md
  65. 0 17
      pioneer/packages/app-parachains/package.json
  66. 0 11
      pioneer/packages/app-parachains/src/Overview/Chain.tsx
  67. 0 71
      pioneer/packages/app-parachains/src/Overview/Parachain.tsx
  68. 0 42
      pioneer/packages/app-parachains/src/Overview/Parachains.tsx
  69. 0 50
      pioneer/packages/app-parachains/src/Overview/Summary.tsx
  70. 0 22
      pioneer/packages/app-parachains/src/Overview/index.tsx
  71. 0 38
      pioneer/packages/app-parachains/src/index.tsx
  72. 0 7
      pioneer/packages/app-parachains/src/translate.ts
  73. 0 201
      pioneer/packages/app-treasury/LICENSE
  74. 0 1
      pioneer/packages/app-treasury/README.md
  75. 0 18
      pioneer/packages/app-treasury/package.json
  76. 0 115
      pioneer/packages/app-treasury/src/Overview/Approve.tsx
  77. 0 92
      pioneer/packages/app-treasury/src/Overview/Proposal.tsx
  78. 0 89
      pioneer/packages/app-treasury/src/Overview/Proposals.tsx
  79. 0 106
      pioneer/packages/app-treasury/src/Overview/Propose.tsx
  80. 0 54
      pioneer/packages/app-treasury/src/Overview/Summary.tsx
  81. 0 27
      pioneer/packages/app-treasury/src/Overview/index.tsx
  82. 0 212
      pioneer/packages/app-treasury/src/Settings.tsx
  83. 0 47
      pioneer/packages/app-treasury/src/index.tsx
  84. 0 3
      pioneer/packages/app-treasury/src/md/basic.md
  85. 0 7
      pioneer/packages/app-treasury/src/translate.ts
  86. 0 201
      pioneer/packages/apps-routing/LICENSE
  87. 0 25
      pioneer/packages/apps-routing/src/123code.ts
  88. 0 23
      pioneer/packages/apps-routing/src/claims.ts
  89. 0 27
      pioneer/packages/apps-routing/src/contracts.ts
  90. 0 26
      pioneer/packages/apps-routing/src/council.ts
  91. 0 21
      pioneer/packages/apps-routing/src/dashboard.ts
  92. 0 23
      pioneer/packages/apps-routing/src/democracy.ts
  93. 0 25
      pioneer/packages/apps-routing/src/generic-asset.ts
  94. 0 19
      pioneer/packages/apps-routing/src/joy-help.ts
  95. 0 23
      pioneer/packages/apps-routing/src/parachains.ts
  96. 0 24
      pioneer/packages/apps-routing/src/treasury.ts
  97. 0 201
      pioneer/packages/apps/LICENSE
  98. 0 3
      pioneer/packages/joy-help/README.md
  99. 0 15
      pioneer/packages/joy-help/package.json
  100. 0 53
      pioneer/packages/joy-help/src/Help.tsx

+ 0 - 22
pioneer/packages/app-123code/README.md

@@ -1,22 +0,0 @@
-# @polkadot/app-123code
-
-A simple template to get started with adding an "app" to this UI. It contains the bare minimum for a nicely hackable app (if you just want to code _somewhere_) and the steps needed to create, add and register an new app that appears in the UI.
-
-## adding an app
-
-If you want to add a new app to the UI, this is the place to start.
-
-1. Duplicate this `app-123code` folder and give it an appropriate name, in this case we will select `app-example` to keep things clear.
-2. Edit the `apps-example/package.json` app description, i.e. the name, author and relevant overview.
-
-And we have the basic app source setup, time to get the tooling correct.
-
-3. Add the new app to the TypeScript config in root, `tsconfig.json`, i.e. an entry such as `"@polkadot/app-example/*": [ "packages/app-example/src/*" ],`
-
-At this point the app should be buildable, but not quite reachable. The final step is to add it to the actual sidebar in `apps`.
-
-4. In `apps-routing/src` duplicate the `123code.ts` file to `example.ts` and edit it with the appropriate information, including the hash link, name and icon (any icon name from semantic-ui-react/font-awesome 4 should be appropriate).
-5. In the above description file, the `isHidden` field needs to be toggled to make it appear - the base template is hidden by default.
-6. Finally add the `template` to the `apps-routing/src/index.ts` file at the appropriate place for both full and light mode (either optional)
-
-Yes. After all that we have things hooked up. Run `yarn start` and your new app (non-coded) should show up. Now start having fun and building something great.

+ 0 - 16
pioneer/packages/app-123code/package.json

@@ -1,16 +0,0 @@
-{
-  "name": "@polkadot/app-123code",
-  "version": "0.37.0-beta.63",
-  "description": "A basic app that shows the ropes on customisation",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Jaco Greeff <jacogr@gmail.com>",
-  "maintainers": [
-    "Jaco Greeff <jacogr@gmail.com>"
-  ],
-  "license": "Apache-2.0",
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/react-components": "^0.37.0-beta.63"
-  }
-}

+ 0 - 49
pioneer/packages/app-123code/src/AccountSelector.tsx

@@ -1,49 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import React, { useEffect, useState } from 'react';
-import styled from 'styled-components';
-import { Bubble, InputAddress } from '@polkadot/react-components';
-import { AccountIndex, Balance, Nonce } from '@polkadot/react-query';
-
-interface Props {
-  className?: string;
-  onChange: (accountId: string | null) => void;
-}
-
-function AccountSelector ({ className, onChange }: Props): React.ReactElement<Props> {
-  const [accountId, setAccountId] = useState<string | null>(null);
-
-  useEffect((): void => onChange(accountId), [accountId]);
-
-  return (
-    <section className={`template--AccountSelector ui--row ${className}`}>
-      <InputAddress
-        className='medium'
-        label='my default account'
-        onChange={setAccountId}
-        type='account'
-      />
-      <div className='medium'>
-        <Bubble color='teal' icon='address card' label='index'>
-          <AccountIndex params={accountId} />
-        </Bubble>
-        <Bubble color='yellow' icon='adjust' label='balance'>
-          <Balance params={accountId} />
-        </Bubble>
-        <Bubble color='yellow' icon='target' label='transactions'>
-          <Nonce params={accountId} />
-        </Bubble>
-      </div>
-    </section>
-  );
-}
-
-export default styled(AccountSelector)`
-  align-items: flex-end;
-
-  .summary {
-    text-align: center;
-  }
-`;

+ 0 - 28
pioneer/packages/app-123code/src/Summary.tsx

@@ -1,28 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { BareProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import styled from 'styled-components';
-
-interface Props extends BareProps {
-  children: React.ReactNode;
-}
-
-function Summary ({ children, className, style }: Props): React.ReactElement<Props> {
-  return (
-    <div
-      className={className}
-      style={style}
-    >
-      {children}
-    </div>
-  );
-}
-
-export default styled(Summary)`
-  opacity: 0.5;
-  padding: 1rem 1.5rem;
-`;

+ 0 - 65
pioneer/packages/app-123code/src/SummaryBar.tsx

@@ -1,65 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AccountId } from '@polkadot/types/interfaces';
-import { BareProps, I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React, { useContext } from 'react';
-import { ApiContext, withCalls } from '@polkadot/react-api';
-import { Bubble, IdentityIcon } from '@polkadot/react-components';
-import { formatBalance, formatNumber } from '@polkadot/util';
-
-import translate from './translate';
-
-interface Props extends BareProps, I18nProps {
-  balances_totalIssuance?: BN;
-  chain_bestNumber?: BN;
-  chain_bestNumberLag?: BN;
-  staking_validators?: AccountId[];
-}
-
-function SummaryBar ({ balances_totalIssuance, chain_bestNumber, chain_bestNumberLag, staking_validators }: Props): React.ReactElement<Props> {
-  const { api, systemChain, systemName, systemVersion } = useContext(ApiContext);
-
-  return (
-    <summary>
-      <div>
-        <Bubble icon='tty' label='node'>
-          {systemName} v{systemVersion}
-        </Bubble>
-        <Bubble icon='chain' label='chain'>
-          {systemChain}
-        </Bubble>
-        <Bubble icon='code' label='runtime'>
-          {api.runtimeVersion.implName} v{api.runtimeVersion.implVersion}
-        </Bubble>
-        <Bubble icon='bullseye' label='best #'>
-          {formatNumber(chain_bestNumber)} ({formatNumber(chain_bestNumberLag)} lag)
-        </Bubble>
-        {staking_validators && (
-          <Bubble icon='chess queen' label='validators'>{
-            staking_validators.map((accountId, index): React.ReactNode => (
-              <IdentityIcon key={index} value={accountId} size={20} />
-            ))
-          }</Bubble>
-        )}
-        <Bubble icon='circle' label='total tokens'>
-          {formatBalance(balances_totalIssuance)}
-        </Bubble>
-      </div>
-    </summary>
-  );
-}
-
-// inject the actual API calls automatically into props
-export default translate(
-  withCalls<Props>(
-    'derive.chain.bestNumber',
-    'derive.chain.bestNumberLag',
-    'derive.staking.validators',
-    'query.balances.totalIssuance'
-  )(SummaryBar)
-);

+ 0 - 47
pioneer/packages/app-123code/src/Transfer.tsx

@@ -1,47 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import BN from 'bn.js';
-import React, { useState } from 'react';
-import { Button, InputAddress, InputBalance, TxButton } from '@polkadot/react-components';
-
-import Summary from './Summary';
-
-interface Props {
-  accountId?: string | null;
-}
-
-export default function Transfer ({ accountId }: Props): React.ReactElement<Props> {
-  const [amount, setAmount] = useState<BN | undefined | null>(null);
-  const [recipientId, setRecipientId] = useState<string | null>(null);
-
-  return (
-    <section>
-      <h1>transfer</h1>
-      <div className='ui--row'>
-        <div className='large'>
-          <InputAddress
-            label='recipient address for this transfer'
-            onChange={setRecipientId}
-            type='all'
-          />
-          <InputBalance
-            label='amount to transfer'
-            onChange={setAmount}
-          />
-          <Button.Group>
-            <TxButton
-              accountId={accountId}
-              icon='send'
-              label='make transfer'
-              params={[recipientId, amount]}
-              tx='balances.transfer'
-            />
-          </Button.Group>
-        </div>
-        <Summary className='small'>Make a transfer from any account you control to another account. Transfer fees and per-transaction fees apply and will be calculated upon submission.</Summary>
-      </div>
-    </section>
-  );
-}

+ 0 - 38
pioneer/packages/app-123code/src/index.tsx

@@ -1,38 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-// some types, AppProps for the app and I18nProps to indicate
-// translatable strings. Generally the latter is quite "light",
-// `t` is inject into props (see the HOC export) and `t('any text')
-// does the translation
-import { AppProps, I18nProps } from '@polkadot/react-components/types';
-
-// external imports (including those found in the packages/*
-// of this repo)
-import React, { useState } from 'react';
-
-// local imports and components
-import AccountSelector from './AccountSelector';
-import SummaryBar from './SummaryBar';
-import Transfer from './Transfer';
-import translate from './translate';
-
-// define our internal types
-interface Props extends AppProps, I18nProps {}
-
-function App ({ className }: Props): React.ReactElement<Props> {
-  const [accountId, setAccountId] = useState<string | null>(null);
-
-  return (
-    // in all apps, the main wrapper is setup to allow the padding
-    // and margins inside the application. (Just from a consistent pov)
-    <main className={className}>
-      <SummaryBar />
-      <AccountSelector onChange={setAccountId} />
-      <Transfer accountId={accountId} />
-    </main>
-  );
-}
-
-export default translate(App);

+ 0 - 7
pioneer/packages/app-123code/src/translate.ts

@@ -1,7 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { withTranslation } from 'react-i18next';
-
-export default withTranslation(['app-123code']);

+ 0 - 1
pioneer/packages/app-claims/README.md

@@ -1 +0,0 @@
-# @polkadot/app-claims

+ 0 - 17
pioneer/packages/app-claims/package.json

@@ -1,17 +0,0 @@
-{
-  "name": "@polkadot/app-claims",
-  "version": "0.37.0-beta.63",
-  "description": "An app for claiming Polkadot tokens",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Keith Ingram <keith@parity.io>",
-  "maintainers": [
-    "Keith Ingram <keith@parity.io>",
-    "Jaco Greeff <jacogr@gmail.com>"
-  ],
-  "license": "Apache-2.0",
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/react-components": "^0.37.0-beta.63"
-  }
-}

+ 0 - 107
pioneer/packages/app-claims/src/Claim.tsx

@@ -1,107 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Option } from '@polkadot/types';
-import { BalanceOf, EthereumAddress } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import React, { useContext, useEffect, useState } from 'react';
-import styled from 'styled-components';
-import { ApiContext } from '@polkadot/react-api';
-import { Button, Card } from '@polkadot/react-components';
-import { formatBalance } from '@polkadot/util';
-
-import translate from './translate';
-import { addrToChecksum } from './util';
-
-interface Props extends I18nProps {
-  button: React.ReactNode;
-  ethereumAddress: EthereumAddress | null;
-}
-
-function Claim ({ button, className, ethereumAddress, t }: Props): React.ReactElement<Props> | null {
-  const { api } = useContext(ApiContext);
-  const [claimValue, setClaimValue] = useState<BalanceOf | null>(null);
-  const [claimAddress, setClaimAddress] = useState<EthereumAddress | null>(null);
-  const [isBusy, setIsBusy] = useState(false);
-
-  const _fetchClaim = (address: EthereumAddress): void => {
-    setIsBusy(true);
-
-    api.query.claims
-      .claims<Option<BalanceOf>>(address)
-      .then((claim): void => {
-        setClaimValue(claim.unwrapOr(null));
-        setIsBusy(false);
-      })
-      .catch((): void => setIsBusy(false));
-  };
-
-  useEffect((): void => {
-    if (ethereumAddress !== claimAddress) {
-      setClaimAddress(ethereumAddress);
-      ethereumAddress && _fetchClaim(ethereumAddress);
-    }
-  }, [ethereumAddress]);
-
-  if (isBusy || !claimAddress) {
-    return null;
-  }
-
-  const hasClaim = claimValue && claimValue.gten(0);
-
-  return (
-    <Card
-      isError={!hasClaim}
-      isSuccess={!!hasClaim}
-    >
-      <div className={className}>
-        {t('Your Ethereum account')}
-        <h3>{addrToChecksum(claimAddress.toString())}</h3>
-        {hasClaim && claimValue
-          ? (
-            <>
-              {t('has a valid claim for')}
-              <h2>{formatBalance(claimValue)}</h2>
-              <Button.Group>{button}</Button.Group>
-            </>
-          )
-          : (
-            <>
-              {t('does not appear to have a valid claim. Please double check that you have signed the transaction correctly on the correct ETH account.')}
-            </>
-          )}
-      </div>
-    </Card>
-  );
-}
-
-export default translate(
-  styled(Claim)`
-    font-size: 1.15rem;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    min-height: 12rem;
-    align-items: center;
-    margin: 0 1rem;
-
-    h3 {
-      font-family: monospace;
-      font-size: 1.5rem;
-      max-width: 100%;
-      margin: 0.5rem;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-
-    h2 {
-      margin: 0.5rem 0 2rem;
-      font-family: monospace;
-      font-size: 2.5rem;
-      font-weight: 200;
-    }
-  `
-);

+ 0 - 259
pioneer/packages/app-claims/src/index.tsx

@@ -1,259 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Compact } from '@polkadot/types';
-import { Balance, EcdsaSignature, EthereumAddress } from '@polkadot/types/interfaces';
-import { AppProps, I18nProps } from '@polkadot/react-components/types';
-import { ApiProps } from '@polkadot/react-api/types';
-
-import React from 'react';
-import { Trans } from 'react-i18next';
-import styled from 'styled-components';
-import CopyToClipboard from 'react-copy-to-clipboard';
-import { withApi, withMulti } from '@polkadot/react-api';
-import { Button, Card, Columar, Column, InputAddress, Tooltip } from '@polkadot/react-components';
-import { InputNumber } from '@polkadot/react-components/InputNumber';
-import TxModal, { TxModalState, TxModalProps } from '@polkadot/react-components/TxModal';
-import { u8aToHex, u8aToString } from '@polkadot/util';
-import { decodeAddress } from '@polkadot/util-crypto';
-
-import ClaimDisplay from './Claim';
-import { recoverFromJSON } from './util';
-
-import translate from './translate';
-
-enum Step {
-  Account = 0,
-  Sign = 1,
-  Claim = 2,
-}
-
-interface Props extends AppProps, ApiProps, I18nProps, TxModalProps {}
-
-interface State extends TxModalState {
-  didCopy: boolean;
-  ethereumAddress: EthereumAddress | null;
-  claim?: Balance | null;
-  signature?: EcdsaSignature | null;
-  step: Step;
-}
-
-const Payload = styled.pre`
-  cursor: copy;
-  font-family: monospace;
-  border: 1px dashed #c2c2c2;
-  background: #fafafa;
-  padding: 1rem;
-  width: 100%;
-  margin: 1rem 0;
-  white-space: normal;
-  word-break: break-all;
-`;
-
-const Signature = styled.textarea`
-  font-family: monospace;
-  padding: 1rem;
-  border: 1px solid rgba(34, 36, 38, 0.15);
-  border-radius: 0.25rem;
-  margin: 1rem 0;
-  resize: none;
-  width: 100%;
-
-  &::placeholder {
-    color: rgba(0, 0, 0, 0.5);
-  }
-
-  &:-ms-input-placeholder {
-    color: rgba(0, 0, 0, 0.5);
-  }
-
-  &::-ms-input-placeholder {
-    color: rgba(0, 0, 0, 0.5);
-  }
-`;
-
-class App extends TxModal<Props, State> {
-  constructor (props: Props) {
-    super(props);
-
-    this.defaultState = {
-      ...this.defaultState,
-      claim: null,
-      didCopy: false,
-      ethereumAddress: null,
-      signature: null,
-      step: 0
-    };
-    this.state = this.defaultState;
-  }
-
-  public componentDidUpdate (): void {
-    if (this.state.didCopy) {
-      setTimeout((): void => {
-        this.setState({ didCopy: false });
-      }, 1000);
-    }
-  }
-
-  public render (): React.ReactNode {
-    const { api, systemChain = '', t } = this.props;
-    const { accountId, didCopy, ethereumAddress, signature, step } = this.state;
-
-    const payload = accountId
-      ? (
-        u8aToString(Compact.stripLengthPrefix(api.consts.claims.prefix.toU8a(true))) +
-        u8aToHex(decodeAddress(accountId), -1, false)
-      )
-      : '';
-
-    return (
-      <main>
-        <header />
-        <h1>
-          <Trans>claim your <em>{InputNumber.units}</em> tokens</Trans>
-        </h1>
-        <Columar>
-          <Column>
-            <Card withBottomMargin>
-              <h3>{t('1. Select your {{chain}} account', {
-                replace: {
-                  chain: systemChain
-                }
-              })}</h3>
-              <InputAddress
-                defaultValue={this.state.accountId}
-                help={t('The account you want to claim to.')}
-                label={t('claim to account')}
-                onChange={this.onChangeAccount}
-                type='all'
-              />
-              {(step === Step.Account) && (
-                <Button.Group>
-                  <Button
-                    icon='sign-in'
-                    isPrimary
-                    onClick={this.setStep(Step.Sign)}
-                    label={t('Continue')}
-                  />
-                </Button.Group>
-              )}
-            </Card>
-            {(step >= Step.Sign && !!accountId) && (
-              <Card>
-                <h3>{t('2. Sign ETH transaction')}</h3>
-                <CopyToClipboard
-                  onCopy={this.onCopy}
-                  text={payload}
-                >
-                  <Payload
-                    data-for='tx-payload'
-                    data-tip
-                  >
-                    {payload}
-                  </Payload>
-                </CopyToClipboard>
-                <Tooltip
-                  place='right'
-                  text={didCopy ? t('copied') : t('click to copy')}
-                  trigger='tx-payload'
-                />
-                <div>
-                  {t('Copy the above string and sign an Ethereum transaction with the account you used during the pre-sale in the wallet of your choice, using the string as the payload, and then paste the transaction signature object below')}
-                  :
-                </div>
-                <Signature
-                  onChange={this.onChangeSignature}
-                  placeholder='{\n  "address": "0x ...",\n  "msg": "Pay KSMs to the Kusama account: ...",\n  "sig": "0x ...",\n  "version": "2"\n}'
-                  rows={10}
-                />
-                {(step === Step.Sign) && (
-                  <Button.Group>
-                    <Button
-                      icon='sign-in'
-                      isDisabled={!accountId || !signature}
-                      isPrimary
-                      onClick={this.setStep(Step.Claim)}
-                      label={t('Confirm claim')}
-                    />
-                  </Button.Group>
-                )}
-              </Card>
-            )}
-          </Column>
-          <Column showEmptyText={false}>
-            {(step >= Step.Claim) && (
-              <ClaimDisplay
-                button={this.renderTxButton()}
-                ethereumAddress={ethereumAddress}
-              />
-            )}
-          </Column>
-        </Columar>
-      </main>
-    );
-  }
-
-  protected isDisabled = (): boolean => {
-    const { accountId, signature } = this.state;
-
-    return !accountId || !signature;
-  }
-
-  protected isUnsigned = (): boolean => true;
-
-  protected submitLabel = (): React.ReactNode => this.props.t('Redeem');
-
-  protected txMethod = (): string => 'claims.claim';
-
-  protected txParams = (): [string | null, EcdsaSignature | null] => {
-    const { accountId, signature } = this.state;
-
-    return [
-      accountId ? accountId.toString() : null,
-      signature || null
-    ];
-  }
-
-  protected onChangeAccount = (accountId: string | null): void => {
-    this.setState(({ step }: State): Pick<State, never> => {
-      return {
-        ...(
-          step > Step.Account
-            ? this.defaultState
-            : {}
-        ),
-        accountId
-      };
-    });
-  }
-
-  protected onChangeSignature = (event: React.SyntheticEvent<Element>): void => {
-    const { value: signatureJson } = event.target as HTMLInputElement;
-
-    this.setState(({ step }: State): Pick<State, never> => ({
-      ...(
-        step > Step.Sign
-          ? { step: Step.Sign }
-          : {}
-      ),
-      ...recoverFromJSON(signatureJson)
-    }));
-  }
-
-  private onCopy = (): void => {
-    this.setState({ didCopy: true });
-  }
-
-  private setStep = (step: Step): () => void =>
-    (): void => {
-      this.setState({ step });
-    }
-}
-
-export default withMulti(
-  App,
-  translate,
-  withApi
-);

+ 0 - 8
pioneer/packages/app-claims/src/secp256k1.d.ts

@@ -1,8 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-declare module 'secp256k1/elliptic' {
-  export function publicKeyConvert (publicKey: Buffer, expanded: boolean): Buffer;
-  export function recover (msgHash: Buffer, signature: Buffer, recovery: number): Buffer;
-}

+ 0 - 7
pioneer/packages/app-claims/src/translate.ts

@@ -1,7 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { withTranslation } from 'react-i18next';
-
-export default withTranslation(['app-claims']);

+ 0 - 19
pioneer/packages/app-claims/src/util.spec.ts

@@ -1,19 +0,0 @@
-// Copyright 2017-2019 @polkadot/react-components authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { hexToU8a } from '@polkadot/util';
-
-import { publicToAddr } from './util';
-
-describe('publicToAddr', (): void => {
-  it('converts a publicKey to address', (): void => {
-    expect(
-      publicToAddr(
-        hexToU8a(
-          '0x836b35a026743e823a90a0ee3b91bf615c6a757e2b60b9e1dc1826fd0dd16106f7bc1e8179f665015f43c6c81f39062fc2086ed849625c06e04697698b21855e'
-        )
-      )
-    ).toEqual('0x0BED7ABd61247635c1973eB38474A2516eD1D884');
-  });
-});

+ 0 - 111
pioneer/packages/app-claims/src/util.ts

@@ -1,111 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-123code authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { EthereumAddress, EcdsaSignature } from '@polkadot/types/interfaces';
-
-import secp256k1 from 'secp256k1/elliptic';
-import { createType } from '@polkadot/types';
-import { assert, hexToU8a, stringToU8a, u8aToBuffer, u8aConcat } from '@polkadot/util';
-import { keccakAsHex, keccakAsU8a } from '@polkadot/util-crypto';
-
-interface RecoveredSignature {
-  error: Error | null;
-  ethereumAddress: EthereumAddress | null;
-  signature: EcdsaSignature | null;
-}
-
-interface SignatureParts {
-  recovery: number;
-  signature: Buffer;
-}
-
-// converts an Ethereum address to a checksum representation
-export function addrToChecksum (_address: string): string {
-  const address = _address.toLowerCase();
-  const hash = keccakAsHex(address.substr(2)).substr(2);
-  let result = '0x';
-
-  for (let n = 0; n < 40; n++) {
-    result = `${result}${
-      parseInt(hash[n], 16) > 7
-        ? address[n + 2].toUpperCase()
-        : address[n + 2]
-    }`;
-  }
-
-  return result;
-}
-
-// convert a give public key to an Ethereum address (the last 20 bytes of an _exapnded_ key keccack)
-export function publicToAddr (publicKey: Uint8Array): string {
-  return addrToChecksum(`0x${keccakAsHex(publicKey).slice(-40)}`);
-}
-
-// hash a message for use in signature recovery, adding the standard Ethereum header
-export function hashMessage (message: string): Buffer {
-  const expanded = stringToU8a(`\x19Ethereum Signed Message:\n${message.length.toString()}${message}`);
-  const hashed = keccakAsU8a(expanded);
-
-  return u8aToBuffer(hashed);
-}
-
-// split is 65-byte signature into the r, s (combined) and recovery number (derived from v)
-export function sigToParts (_signature: string): SignatureParts {
-  const signature = hexToU8a(_signature);
-
-  assert(signature.length === 65, `Invalid signature length, expected 65 found ${signature.length}`);
-
-  let v = signature[64];
-
-  if (v < 27) {
-    v += 27;
-  }
-
-  const recovery = v - 27;
-
-  assert(recovery === 0 || recovery === 1, 'Invalid signature v value');
-
-  return {
-    recovery,
-    signature: u8aToBuffer(signature.slice(0, 64))
-  };
-}
-
-// recover an address from a given message and a recover/signature combination
-export function recoverAddress (message: string, { recovery, signature }: SignatureParts): string {
-  const msgHash = hashMessage(message);
-  const senderPubKey = secp256k1.recover(msgHash, signature, recovery);
-
-  return publicToAddr(
-    secp256k1.publicKeyConvert(senderPubKey, false).slice(1)
-  );
-}
-
-// recover an address from a signature JSON (as supplied by e.g. MyCrypto)
-export function recoverFromJSON (signatureJson: string | null): RecoveredSignature {
-  try {
-    const { msg, sig } = JSON.parse(signatureJson || '{}');
-
-    if (!msg || !sig) {
-      throw new Error('Invalid signature object');
-    }
-
-    const parts = sigToParts(sig);
-
-    return {
-      error: null,
-      ethereumAddress: createType('EthereumAddress', recoverAddress(msg, parts)),
-      signature: createType('EcdsaSignature', u8aConcat(parts.signature, new Uint8Array([parts.recovery])))
-    };
-  } catch (error) {
-    console.error(error);
-
-    return {
-      error,
-      ethereumAddress: null,
-      signature: null
-    };
-  }
-}

+ 0 - 1
pioneer/packages/app-council/README.md

@@ -1 +0,0 @@
-# @polkadot/app-council

+ 0 - 17
pioneer/packages/app-council/package.json

@@ -1,17 +0,0 @@
-{
-  "name": "@polkadot/app-council",
-  "version": "0.37.0-beta.63",
-  "description": "Council",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Jaco Greeff <jacogr@gmail.com>",
-  "maintainers": [
-    "Jaco Greeff <jacogr@gmail.com>"
-  ],
-  "license": "Apache-2.0",
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/react-components": "^0.37.0-beta.63",
-    "@polkadot/react-query": "^0.37.0-beta.63"
-  }
-}

+ 0 - 104
pioneer/packages/app-council/src/Motions/Motion.tsx

@@ -1,104 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Proposal as ProposalType, Votes } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { Option } from '@polkadot/types';
-
-import { ActionItem, InputAddress, Labelled, Voting } from '@polkadot/react-components';
-import { withCalls, withMulti } from '@polkadot/react-api';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  chain_bestNumber?: BN;
-  hash: string;
-  proposal: ProposalType | null;
-  votes: Votes | null;
-}
-
-function Motion ({ className, hash, proposal, t, votes }: Props): React.ReactElement<Props> | null {
-  if (!proposal || !votes) {
-    return null;
-  }
-
-  const { ayes, index, nays, threshold } = votes;
-
-  return (
-    <ActionItem
-      className={className}
-      accessory={
-        <Voting
-          hash={hash}
-          isCouncil
-          idNumber={index}
-          proposal={proposal}
-        />
-      }
-      expandNested
-      idNumber={index}
-      proposal={proposal}
-    >
-      <div>
-        <h4>{t('ayes ({{ayes}}/{{threshold}} to approve)', {
-          replace: {
-            ayes: ayes.length,
-            threshold: threshold.toString()
-          }
-        })}</h4>
-        {ayes.map((address, index): React.ReactNode => (
-          <Labelled
-            key={`${index}:${address}`}
-            label={t('Aye')}
-          >
-            <InputAddress
-              isDisabled
-              value={address}
-              withLabel={false}
-            />
-          </Labelled>
-        ))}
-        <h4>{t('nays ({{nays}})', {
-          replace: {
-            nays: nays.length
-          }
-        })}</h4>
-        {nays.map((address, index): React.ReactNode => (
-          <Labelled
-            key={`${index}:${address}`}
-            label={t('Nay')}
-          >
-            <InputAddress
-              isDisabled
-              value={address}
-              withLabel={false}
-            />
-          </Labelled>
-        ))}
-      </div>
-    </ActionItem>
-  );
-}
-
-export default withMulti(
-  Motion,
-  translate,
-  withCalls<Props>(
-    ['query.council.proposalOf', {
-      paramName: 'hash',
-      propName: 'proposal',
-      transform: (value: Option<ProposalType>): ProposalType | null =>
-        value.unwrapOr(null)
-    }],
-    ['query.council.voting', {
-      paramName: 'hash',
-      propName: 'votes',
-      transform: (value: Option<Votes>): Votes | null =>
-        value.unwrapOr(null)
-    }]
-  )
-);

+ 0 - 147
pioneer/packages/app-council/src/Motions/Propose.tsx

@@ -1,147 +0,0 @@
-// Copyright 2017-2019 @polkadot/ui-staking authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { ApiProps } from '@polkadot/react-api/types';
-import { Call, Proposal } from '@polkadot/types/interfaces';
-
-import BN from 'bn.js';
-import React from 'react';
-import { createType } from '@polkadot/types';
-import { Button, Extrinsic, InputNumber } from '@polkadot/react-components';
-import TxModal, { TxModalState, TxModalProps } from '@polkadot/react-components/TxModal';
-import { withCalls, withMulti } from '@polkadot/react-api';
-
-import translate from '../translate';
-
-interface Props extends TxModalProps, ApiProps {
-  memberCount: number;
-}
-
-interface State extends TxModalState {
-  method: Call | null;
-  threshold: BN | null;
-}
-
-class Propose extends TxModal<Props, State> {
-  constructor (props: Props) {
-    super(props);
-
-    this.defaultState = {
-      ...this.defaultState,
-      method: null,
-      threshold: props.memberCount ? new BN((props.memberCount / 2) + 1) : null
-    };
-    this.state = this.defaultState;
-  }
-
-  public static getDerivedStateFromProps ({ memberCount }: Props, { threshold }: State): Pick<State, never> | null {
-    if (!threshold && memberCount > 0) {
-      const simpleMajority = new BN((memberCount / 2) + 1);
-
-      return { threshold: simpleMajority };
-    }
-
-    return null;
-  }
-
-  protected headerText = (): string => this.props.t('Propose a council motion');
-
-  protected txMethod = (): string => 'council.propose';
-
-  protected txParams = (): [BN | null, ...Proposal[]] => {
-    const { method, threshold } = this.state;
-
-    return [
-      threshold,
-      ...(method ? [createType('Proposal', method)] : [])
-    ];
-  }
-
-  protected isDisabled = (): boolean => {
-    const { memberCount = 0 } = this.props;
-    const { accountId, method, threshold } = this.state;
-
-    const hasThreshold = !!threshold && threshold.gtn(0) && threshold.ltn(memberCount + 1);
-    const hasMethod = !!method;
-
-    return !accountId || !hasMethod || !hasThreshold;
-  }
-
-  protected renderTrigger = (): React.ReactNode => {
-    const { t } = this.props;
-
-    return (
-      <Button.Group>
-        <Button
-          isPrimary
-          label={t('Propose a council motion')}
-          icon='add'
-          onClick={this.showModal}
-        />
-      </Button.Group>
-    );
-  }
-
-  protected renderContent = (): React.ReactNode => {
-    const { apiDefaultTxSudo, memberCount = 0, t } = this.props;
-    const { threshold } = this.state;
-
-    return (
-      <>
-        <InputNumber
-          className='medium'
-          label={t('threshold')}
-          help={t('The minimum number of council votes required to approve this motion')}
-          isError={!threshold || threshold.eqn(0) || threshold.gtn(memberCount)}
-          onChange={this.onChangeThreshold}
-          onEnter={this.sendTx}
-          placeholder={
-            t(
-              'Positive number between 1 and {{memberCount}}',
-              { replace: { memberCount } }
-            )
-          }
-          value={threshold || new BN(0)}
-        />
-        <Extrinsic
-          defaultValue={apiDefaultTxSudo}
-          label={t('proposal')}
-          onChange={this.onChangeExtrinsic}
-          onEnter={this.sendTx}
-        />
-      </>
-    );
-  }
-
-  private onChangeThreshold = (threshold: BN | null = null): void => {
-    const { memberCount = 0 } = this.props;
-
-    if (memberCount > 0 && !this.defaultState.threshold) {
-      this.defaultState.threshold = new BN((memberCount / 2) + 1);
-    }
-
-    this.setState({ threshold });
-  }
-
-  private onChangeExtrinsic = (method?: Call): void => {
-    if (!method) {
-      return;
-    }
-
-    this.setState({ method });
-  }
-}
-
-export default withMulti(
-  Propose,
-  translate,
-  withCalls(
-    ['query.electionsPhragmen.members', {
-      fallbacks: ['query.elections.members'],
-      propName: 'memberCount',
-      transform: (value: any[]): number =>
-        value.length
-    }]
-  )
-);

+ 0 - 44
pioneer/packages/app-council/src/Motions/index.tsx

@@ -1,44 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Hash } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { withCalls } from '@polkadot/react-api';
-import { CardGrid } from '@polkadot/react-components';
-
-import Motion from './Motion';
-import Propose from './Propose';
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  council_proposals?: Hash[];
-}
-
-function Proposals ({ council_proposals, t }: Props): React.ReactElement<Props> {
-  return (
-    <CardGrid
-      emptyText={t('No council motions')}
-      headerText={t('Motions')}
-      buttons={
-        <Propose />
-      }
-    >
-      {council_proposals && council_proposals.map((hash: Hash): React.ReactNode => (
-        <Motion
-          hash={hash.toHex()}
-          key={hash.toHex()}
-        />
-      ))}
-    </CardGrid>
-  );
-}
-
-export default translate(
-  withCalls<Props>(
-    'query.council.proposals'
-  )(Proposals)
-);

+ 0 - 34
pioneer/packages/app-council/src/Overview/Candidate.tsx

@@ -1,34 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-import { AccountId } from '@polkadot/types/interfaces';
-
-import React from 'react';
-import { AddressCard } from '@polkadot/react-components';
-
-import translate from '../translate';
-import Voters from './Voters';
-
-interface Props extends I18nProps {
-  address: AccountId;
-  isRunnerUp?: boolean;
-  voters?: AccountId[];
-}
-
-function Candidate ({ address, isRunnerUp, t, voters }: Props): React.ReactElement<Props> {
-  return (
-    <AddressCard
-      defaultName={isRunnerUp ? t('runner up') : t('candidate')}
-      value={address}
-      withIndexOrAddress
-    >
-      {voters && voters.length !== 0 && (
-        <Voters voters={voters} />
-      )}
-    </AddressCard>
-  );
-}
-
-export default translate(Candidate);

+ 0 - 33
pioneer/packages/app-council/src/Overview/Member.tsx

@@ -1,33 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-import { AccountId } from '@polkadot/types/interfaces';
-
-import React from 'react';
-import { AddressCard } from '@polkadot/react-components';
-
-import translate from '../translate';
-import Voters from './Voters';
-
-interface Props extends I18nProps {
-  address: AccountId;
-  voters?: AccountId[];
-}
-
-function Member ({ address, t, voters }: Props): React.ReactElement<Props> {
-  return (
-    <AddressCard
-      defaultName={t('council member')}
-      value={address}
-      withIndexOrAddress
-    >
-      {voters && voters.length !== 0 && (
-        <Voters voters={voters} />
-      )}
-    </AddressCard>
-  );
-}
-
-export default translate(Member);

+ 0 - 85
pioneer/packages/app-council/src/Overview/Members.tsx

@@ -1,85 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AccountId } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-import { ComponentProps } from './types';
-
-import React from 'react';
-import { withCalls } from '@polkadot/react-api';
-import { Columar, Column } from '@polkadot/react-components';
-
-import translate from '../translate';
-import Candidate from './Candidate';
-import Member from './Member';
-
-interface Props extends I18nProps, ComponentProps {
-  allVotes?: Record<string, AccountId[]>;
-}
-
-function Members ({ allVotes = {}, electionsInfo: { candidates, members, runnersUp }, t }: Props): React.ReactElement<Props> {
-  return (
-    <Columar>
-      <Column
-        emptyText={t('No members found')}
-        headerText={t('members')}
-      >
-        {members.map(([accountId]): React.ReactNode => (
-          <Member
-            address={accountId}
-            key={accountId.toString()}
-            voters={allVotes[accountId.toString()]}
-          />
-        ))}
-      </Column>
-      <Column
-        emptyText={t('No candidates found')}
-        headerText={t('candidates')}
-      >
-        {(!!candidates.length || !!runnersUp.length) && (
-          <>
-            {runnersUp.map(([accountId]): React.ReactNode => (
-              <Candidate
-                address={accountId}
-                isRunnerUp
-                key={accountId.toString()}
-                voters={allVotes[accountId.toString()]}
-              />
-            ))}
-            {candidates.map((accountId): React.ReactNode => (
-              <Candidate
-                address={accountId}
-                key={accountId.toString()}
-                voters={allVotes[accountId.toString()]}
-              />
-            ))}
-          </>
-        )}
-      </Column>
-    </Columar>
-  );
-}
-
-export default translate(
-  withCalls<Props>(
-    ['query.electionsPhragmen.votesOf', {
-      propName: 'allVotes',
-      transform: ([voters, casted]: [AccountId[], AccountId[][]]): Record<string, AccountId[]> =>
-        voters.reduce((result: Record<string, AccountId[]>, voter, index): Record<string, AccountId[]> => {
-          casted[index].forEach((candidate): void => {
-            const address = candidate.toString();
-
-            if (!result[address]) {
-              result[address] = [];
-            }
-
-            result[address].push(voter);
-          });
-
-          return result;
-        }, {})
-    }]
-  )(Members)
-);

+ 0 - 51
pioneer/packages/app-council/src/Overview/SubmitCandidacy.tsx

@@ -1,51 +0,0 @@
-// Copyright 2017-2019 @polkadot/ui-staking authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { ApiProps } from '@polkadot/react-api/types';
-import { ComponentProps } from './types';
-
-import React from 'react';
-import { withApi } from '@polkadot/react-api';
-import { Button } from '@polkadot/react-components';
-import TxModal, { TxModalState as State, TxModalProps } from '@polkadot/react-components/TxModal';
-
-import translate from '../translate';
-
-interface Props extends ApiProps, ComponentProps, TxModalProps {}
-
-class SubmitCandidacy extends TxModal<Props, State> {
-  protected headerText = (): string => this.props.t('Submit your council candidacy');
-
-  protected accountLabel = (): string => this.props.t('Candidate account');
-
-  protected accountHelp = (): string => this.props.t('This account will be nominated to fill the council slot you specify.');
-
-  protected txMethod = (): string =>
-    this.props.api.tx.electionsPhragmen
-      ? 'electionsPhragmen.submitCandidacy'
-      : 'elections.submitCandidacy';
-
-  protected txParams = (): [] => [];
-
-  protected isDisabled = (): boolean => {
-    const { accountId } = this.state;
-
-    return !accountId;
-  }
-
-  protected renderTrigger = (): React.ReactNode => {
-    const { t } = this.props;
-
-    return (
-      <Button
-        isPrimary
-        label={t('Submit candidacy')}
-        icon='add'
-        onClick={this.showModal}
-      />
-    );
-  }
-}
-
-export default translate(withApi(SubmitCandidacy));

+ 0 - 53
pioneer/packages/app-council/src/Overview/Summary.tsx

@@ -1,53 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-import { BlockNumber } from '@polkadot/types/interfaces';
-import { ComponentProps } from './types';
-
-import React from 'react';
-import { SummaryBox, CardSummary } from '@polkadot/react-components';
-import { formatNumber } from '@polkadot/util';
-
-import translate from '../translate';
-
-interface Props extends I18nProps, ComponentProps {
-  bestNumber?: BlockNumber;
-}
-
-function Summary ({ bestNumber, electionsInfo: { members, candidateCount, desiredSeats, runnersUp, termDuration, voteCount }, t }: Props): React.ReactElement<Props> {
-  return (
-    <SummaryBox>
-      <section>
-        <CardSummary label={t('seats')}>
-          {formatNumber(members.length)}/{formatNumber(desiredSeats)}
-        </CardSummary>
-        <CardSummary label={t('candidates')}>
-          {formatNumber(candidateCount.addn(runnersUp.length))}
-        </CardSummary>
-      </section>
-      {voteCount && (
-        <section>
-          <CardSummary label={t('voting round')}>
-            #{formatNumber(voteCount)}
-          </CardSummary>
-        </section>
-      )}
-      {bestNumber && termDuration && termDuration.gtn(0) && (
-        <section>
-          <CardSummary
-            label={t('term progress')}
-            progress={{
-              total: termDuration,
-              value: bestNumber.mod(termDuration)
-            }}
-          />
-        </section>
-      )}
-    </SummaryBox>
-  );
-}
-
-export default translate(Summary);

+ 0 - 303
pioneer/packages/app-council/src/Overview/Vote.tsx

@@ -1,303 +0,0 @@
-// Copyright 2017-2019 @polkadot/ui-staking authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AccountId, VoteIndex } from '@polkadot/types/interfaces';
-import { Codec } from '@polkadot/types/types';
-import { DerivedVoterPositions } from '@polkadot/api-derive/types';
-import { ApiProps } from '@polkadot/react-api/types';
-import { ComponentProps } from './types';
-
-import BN from 'bn.js';
-import React from 'react';
-import styled from 'styled-components';
-import { createType } from '@polkadot/types';
-import { withCalls, withMulti } from '@polkadot/react-api';
-import { AddressRow, Button, Toggle } from '@polkadot/react-components';
-import TxModal, { TxModalState, TxModalProps } from '@polkadot/react-components/TxModal';
-
-import translate from '../translate';
-import VoteValue from './VoteValue';
-
-interface Props extends ApiProps, ComponentProps, TxModalProps {
-  voterPositions?: DerivedVoterPositions;
-}
-
-interface State extends TxModalState {
-  votes: Record<string, boolean>;
-  voteValue: BN;
-  // voterPositions: DerivedVoterPositions;
-}
-
-// const AlreadyVoted = styled.article`
-//   display: flex;
-//   align-items: center;
-//   margin: 0.5rem 0;
-
-//   & > :first-child {
-//     flex: 1 1;
-//   }
-
-//   & > :not(:first-child) {
-//     margin: 0;
-//   }
-// `;
-
-const Candidates = styled.div`
-  display: flex;
-  flex-wrap: wrap;
-`;
-
-const Candidate = styled.div`
-  cursor: pointer;
-  width: 25rem;
-  min-width: calc(50% - 1rem);
-  border-radius: 0.5rem;
-  border: 1px solid #eee;
-  padding: 0.75rem 0.5rem 0.25rem;
-  margin: 0.25rem;
-  transition: all 0.2s;
-
-  b {
-    min-width: 5rem;
-  }
-
-  &.aye {
-    background-color: rgba(0, 255, 0, 0.05);
-
-    b {
-      color: green;
-    }
-  }
-
-  &.nay {
-    background-color: rgba(0, 0, 0, 0.05);
-  }
-
-  .ui--Row-children {
-    text-align: right;
-    width: 100%;
-  }
-`;
-
-class Vote extends TxModal<Props, State> {
-  public static emptyApprovals (length: number): boolean[] {
-    return [...new Array(length).keys()].map((): boolean => false);
-  }
-
-  constructor (props: Props) {
-    super(props);
-
-    this.defaultState = {
-      ...this.defaultState,
-      votes: {},
-      voteValue: new BN(0)
-    };
-
-    this.state = {
-      ...this.defaultState
-    };
-  }
-
-  protected headerText = (): string => this.props.t('Vote for current candidates');
-
-  protected accountLabel = (): string => this.props.t('Voting account');
-
-  protected accountHelp = (): string => this.props.t('This account will be use to approve or disapprove each candidate.');
-
-  protected txMethod = (): string =>
-    this.props.api.tx.electionsPhragmen
-      ? 'electionsPhragmen.vote'
-      : 'elections.setApprovals';
-
-  protected txParams = (): [boolean[] | null, VoteIndex, BN | null] | [string[], BN] => {
-    const { api, electionsInfo: { candidates, nextVoterSet, voteCount }, voterPositions } = this.props;
-    const { accountId, votes, voteValue } = this.state;
-
-    if (api.tx.electionsPhragmen) {
-      return [
-        Object.entries(votes).filter(([, vote]): boolean => vote).map(([accountId]): string => accountId),
-        voteValue
-      ];
-    }
-
-    const approvals = candidates.map((accountId): boolean => votes[accountId.toString()] === true);
-
-    return [
-      approvals
-        ? approvals.slice(0, 1 + approvals.lastIndexOf(true))
-        : [],
-      createType('VoteIndex', voteCount),
-      voterPositions && accountId && voterPositions[accountId]
-        ? voterPositions[accountId].setIndex
-        : nextVoterSet || null
-    ];
-  }
-
-  protected isDisabled = (): boolean => {
-    const { accountId, votes } = this.state;
-    const hasApprovals = Object.values(votes).some((vote): boolean => vote);
-
-    return !accountId || !hasApprovals;
-  }
-
-  protected renderTrigger = (): React.ReactNode => {
-    const { api, electionsInfo: { candidates, members, runnersUp }, t } = this.props;
-    const available = api.tx.electionsPhragmen
-      ? members
-        .map(([accountId]): AccountId => accountId)
-        .concat(runnersUp.map(([accountId]): AccountId => accountId))
-        .concat(candidates)
-      : candidates;
-
-    return (
-      <Button
-        isDisabled={available.length === 0}
-        isPrimary
-        label={t('Vote')}
-        icon='check'
-        onClick={this.showModal}
-      />
-    );
-  }
-
-  protected renderContent = (): React.ReactNode => {
-    const { api, electionsInfo: { candidates, members, runnersUp }, t } = this.props;
-    const { accountId, votes } = this.state;
-    const _candidates = candidates.map((accountId): [AccountId, boolean] => [accountId, false]);
-    const available = api.tx.electionsPhragmen
-      ? members
-        .map(([accountId]): [AccountId, boolean] => [accountId, true])
-        .concat(runnersUp.map(([accountId]): [AccountId, boolean] => [accountId, false]))
-        .concat(_candidates)
-      : _candidates;
-
-    return (
-      <>
-        {api.tx.electionsPhragmen && (
-          <VoteValue
-            accountId={accountId}
-            onChange={this.setVoteValue}
-          />
-        )}
-        {/* {(oldApprovals && accountId && voterPositions && voterPositions[accountId]) && (
-          <AlreadyVoted className='warning padded'>
-            <div>
-              <Icon name='warning sign' />
-              {t('You have already voted in this round')}
-            </div>
-            <Button.Group>
-              <TxButton
-                accountId={accountId}
-                isNegative
-                label={t('Retract vote')}
-                icon='delete'
-                onSuccess={this.onRetractVote}
-                params={[voterPositions[accountId].globalIndex]}
-                tx='elections.retractVoter'
-              />
-            </Button.Group>
-          </AlreadyVoted>
-        )} */}
-        <Candidates>
-          {available.map(([accountId, isMember]): React.ReactNode => {
-            const key = accountId.toString();
-            const isAye = votes[key] || false;
-
-            return (
-              <Candidate
-                className={isAye ? 'aye' : 'nay'}
-                key={key}
-              >
-                <AddressRow
-                  defaultName={isMember ? t('member') : t('candidate')}
-                  isInline
-                  value={accountId}
-                  withIndexOrAddress
-                >
-                  <Toggle
-                    label={
-                      isAye
-                        ? t('Aye')
-                        : t('Nay')
-                    }
-                    onChange={this.onChangeVote(key)}
-                    value={isAye}
-                  />
-                </AddressRow>
-              </Candidate>
-            );
-          })}
-        </Candidates>
-      </>
-    );
-  }
-
-  private setVoteValue = (voteValue?: BN): void => {
-    this.setState({ voteValue: voteValue || new BN(0) });
-  }
-
-  private fetchApprovals = (accountId: string | null): void => {
-    const { api, electionsInfo: { candidates, voteCount } } = this.props;
-
-    if (!accountId || !voteCount) {
-      return;
-    }
-
-    // FIXME This any is a mismatch in api-derive
-    api.derive.elections
-      .approvalsOfAt(accountId as any, voteCount)
-      .then((approvals: boolean[]): void => {
-        this.setState({
-          votes: candidates.reduce((votes: Record<string, boolean>, accountId, index): Record<string, boolean> => ({
-            ...votes,
-            [accountId.toString()]: approvals[index] || false
-          }), {})
-        });
-      });
-  }
-
-  private fetchVotes = (accountId: string | null): void => {
-    const { api } = this.props;
-
-    if (!accountId || !api.tx.electionsPhragmen) {
-      return;
-    }
-
-    api.query.electionsPhragmen
-      .votesOf<[AccountId[]] & Codec>(accountId)
-      .then(([existingVotes]): void => {
-        existingVotes.forEach((accountId): void => {
-          this.onChangeVote(accountId.toString())(true);
-        });
-      });
-  }
-
-  protected onChangeAccount = (accountId: string | null): void => {
-    const { api } = this.props;
-
-    this.setState({ accountId });
-
-    api.tx.electionsPhragmen
-      ? this.fetchVotes(accountId)
-      : this.fetchApprovals(accountId);
-  }
-
-  private onChangeVote = (accountId: string): (isChecked: boolean) => void =>
-    (isChecked: boolean): void => {
-      this.setState(({ votes }: State): Pick<State, never> => ({
-        votes: {
-          ...votes,
-          [accountId]: isChecked
-        }
-      }));
-    }
-}
-
-export default withMulti(
-  Vote,
-  translate,
-  withCalls<Props>(
-    ['derive.elections.voterPositions', { propName: 'voterPositions' }]
-  )
-);

+ 0 - 38
pioneer/packages/app-council/src/Overview/VoteValue.tsx

@@ -1,38 +0,0 @@
-// Copyright 2017-2019 @polkadot/ui-staking authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { DerivedBalances } from '@polkadot/api-derive/types';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { InputBalance } from '@polkadot/react-components';
-import { BalanceVoting } from '@polkadot/react-query';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  accountId?: string | null;
-  allBalances?: DerivedBalances;
-  onChange: (value: BN) => void;
-}
-
-const ZERO = new BN(0);
-
-function VoteValue ({ accountId, onChange, t }: Props): React.ReactElement<Props> {
-  const _setVoteValue = (value?: BN): void => {
-    onChange(value || ZERO);
-  };
-
-  return (
-    <InputBalance
-      help={t('The amount that is associated with this vote. This value is is locked for the duration of the vote.')}
-      label={t('vote value')}
-      labelExtra={<BalanceVoting label={t('voting balance ')} params={accountId} />}
-      onChange={_setVoteValue}
-    />
-  );
-}
-
-export default translate(VoteValue);

+ 0 - 38
pioneer/packages/app-council/src/Overview/Voters.tsx

@@ -1,38 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-import { AccountId } from '@polkadot/types/interfaces';
-
-import React from 'react';
-import { AddressMini } from '@polkadot/react-components';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  voters: AccountId[];
-}
-
-function Voters ({ voters, t }: Props): React.ReactElement<Props> | null {
-  return (
-    <details>
-      <summary>
-        {t('Voters ({{count}})', {
-          replace: {
-            count: voters.length
-          }
-        })}
-      </summary>
-      {voters.map((who): React.ReactNode =>
-        <AddressMini
-          key={who.toString()}
-          value={who}
-          withLockedVote
-        />
-      )}
-    </details>
-  );
-}
-
-export default translate(Voters);

+ 0 - 56
pioneer/packages/app-council/src/Overview/index.tsx

@@ -1,56 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { DerivedElectionsInfo } from '@polkadot/api-derive/types';
-import { BlockNumber } from '@polkadot/types/interfaces';
-import { ComponentProps } from './types';
-
-import React from 'react';
-import { withCalls } from '@polkadot/react-api';
-import { Button } from '@polkadot/react-components';
-import { createType } from '@polkadot/types';
-
-import Members from './Members';
-import SubmitCandidacy from './SubmitCandidacy';
-import Summary from './Summary';
-import Vote from './Vote';
-
-interface Props extends ComponentProps {
-  bestNumber?: BlockNumber;
-}
-
-const NULL_INFO: DerivedElectionsInfo = {
-  candidates: [],
-  candidateCount: createType('u32'),
-  desiredSeats: createType('u32'),
-  members: [],
-  runnersUp: [],
-  termDuration: createType('BlockNumber')
-};
-
-function Overview ({ bestNumber, electionsInfo = NULL_INFO }: Props): React.ReactElement<Props> {
-  return (
-    <>
-      <Summary
-        bestNumber={bestNumber}
-        electionsInfo={electionsInfo}
-      />
-      <Button.Group>
-        <SubmitCandidacy electionsInfo={electionsInfo} />
-        <Button.Or />
-        <Vote electionsInfo={electionsInfo} />
-      </Button.Group>
-      <Members electionsInfo={electionsInfo} />
-    </>
-  );
-}
-
-export default withCalls<Props>(
-  ['derive.elections.info', {
-    propName: 'electionsInfo'
-  }],
-  ['derive.chain.bestNumber', {
-    propName: 'bestNumber'
-  }]
-)(Overview);

+ 0 - 17
pioneer/packages/app-council/src/Overview/types.ts

@@ -1,17 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { SetIndex } from '@polkadot/types/interfaces';
-import { DerivedElectionsInfo } from '@polkadot/api-derive/types';
-
-import BN from 'bn.js';
-
-export interface ComponentProps {
-  electionsInfo: DerivedElectionsInfo;
-}
-
-export interface VoterPosition {
-  setIndex: SetIndex;
-  globalIndex: BN;
-}

+ 0 - 44
pioneer/packages/app-council/src/index.tsx

@@ -1,44 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AppProps, BareProps, I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { Route, Switch } from 'react-router';
-import { Tabs } from '@polkadot/react-components';
-
-import Overview from './Overview';
-import Motions from './Motions';
-import translate from './translate';
-
-interface Props extends AppProps, BareProps, I18nProps {}
-
-function App ({ basePath, t }: Props): React.ReactElement<Props> {
-  return (
-    <main>
-      <header>
-        <Tabs
-          basePath={basePath}
-          items={[
-            {
-              isRoot: true,
-              name: 'overview',
-              text: t('Council overview')
-            },
-            {
-              name: 'motions',
-              text: t('Motions')
-            }
-          ]}
-        />
-      </header>
-      <Switch>
-        <Route path={`${basePath}/motions`} component={Motions} />
-        <Route component={Overview} />
-      </Switch>
-    </main>
-  );
-}
-
-export default translate(App);

+ 0 - 7
pioneer/packages/app-council/src/translate.ts

@@ -1,7 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-council authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { withTranslation } from 'react-i18next';
-
-export default withTranslation(['app-council']);

+ 0 - 22
pioneer/packages/app-dashboard/README.md

@@ -1,22 +0,0 @@
-# @polkadot/app-123code
-
-A simple template to get started with adding an "app" to this UI. It contains the bare minimum for a nicely hackable app (if you just want to code _somewhere_) and the steps needed to create, add and register an new app that appears in the UI.
-
-## adding an app
-
-If you want to add a new app to the UI, this is the place to start.
-
-1. Duplicate this `app-123code` folder and give it an appropriate name, in this case we will select `app-example` to keep things clear.
-2. Edit the `apps-example/package.json` app description, i.e. the name, author and relevant overview.
-
-And we have the basic app source setup, time to get the tooling correct.
-
-3. Add the new app to the TypeScript config in root, `tsconfig.json`, i.e. an entry such as `"@polkadot/app-example/*": [ "packages/app-example/src/*" ],`
-
-At this point the app should be buildable, but not quite reachable. The final step is to add it to the actual sidebar in `apps`.
-
-4. In `apps/src/routing/` duplicate the `123code.ts` file to `example.ts` and edit it with the appropriate information, including the hash link, name and icon (any icon name from semantic-ui-react/font-awesome 4 should be appropriate).
-5. In the above description file, the `isHidden` field needs to be toggled to make it appear - the base template is hidden by default.
-6. Finally add the `template` to the `apps/src/routing/index.ts` file at the appropriate place for both full and light mode (either optional)
-
-Yes. After all that we have things hooked up. Run `yarn start` and your new app (non-coded) should show up. Now start having fun and building something great.

+ 0 - 17
pioneer/packages/app-dashboard/package.json

@@ -1,17 +0,0 @@
-{
-  "name": "@polkadot/app-dashboard",
-  "version": "0.37.0-beta.63",
-  "description": "Dashboard for all apps, allowing for an overview and quick navigation",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Jaco Greeff <jacogr@gmail.com>",
-  "maintainers": [
-    "Jaco Greeff <jacogr@gmail.com>"
-  ],
-  "license": "Apache-2.0",
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/apps-routing": "^0.37.0-beta.63",
-    "@polkadot/react-components": "^0.37.0-beta.63"
-  }
-}

+ 0 - 39
pioneer/packages/app-dashboard/src/Entry.tsx

@@ -1,39 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-dashboard authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Route } from '@polkadot/apps-routing/types';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { Link } from 'react-router-dom';
-import styled from 'styled-components';
-import { Icon } from '@polkadot/react-components';
-
-import translate from './translate';
-
-interface Props extends I18nProps {
-  route: Route;
-}
-
-function Entry ({ className, route: { i18n, icon, name }, t }: Props): React.ReactElement<Props> {
-  return (
-    <div className={className}>
-      <Link to={`/${name}`}>
-        <Icon
-          name={icon}
-          size='massive'
-        />
-        <div className='name'>
-          {t(`entry.${name}`, i18n)}
-        </div>
-      </Link>
-    </div>
-  );
-}
-
-export default translate(styled(Entry)`
-  .name {
-    margin-top: 0.75rem;
-  }
-`);

+ 0 - 13
pioneer/packages/app-dashboard/src/Spacer.tsx

@@ -1,13 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-dashboard authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import React from 'react';
-
-type Props = {};
-
-export default function Spacer (): React.ReactElement<Props> {
-  return (
-    <div />
-  );
-}

+ 0 - 68
pioneer/packages/app-dashboard/src/index.tsx

@@ -1,68 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-dashboard authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Route } from '@polkadot/apps-routing/types';
-import { AppProps } from '@polkadot/react-components/types';
-
-import React, { useState } from 'react';
-import styled from 'styled-components';
-import routing from '@polkadot/apps-routing';
-
-import Entry from './Entry';
-import Spacer from './Spacer';
-
-interface Props extends AppProps {
-  className?: string;
-}
-
-function renderEntry (route: Route): React.ReactNode {
-  return (
-    <Entry
-      key={route.name}
-      route={route}
-    />
-  );
-}
-
-// NOTE: This _looks_ weird, because it is weird. Basically we want all the entries
-// of an equal width. So here we add a non-content spacers at the end that just
-// ensures flex has enough items to render something usable to the user. Since we don't
-// quite know how many items per row, we just render a bunch, n === routes.length
-function renderSpacer (route: Route, index: number): React.ReactNode {
-  return (
-    <Spacer key={index} />
-  );
-}
-
-function App ({ className }: Props): React.ReactElement<Props> {
-  const [routes] = useState(
-    routing.routes.filter((route): boolean =>
-      !!route && !route.display.isHidden && route.name !== 'dashboard'
-    ) as Route[]
-  );
-
-  return (
-    <main className={className}>
-      <div className='routes'>
-        {routes.map(renderEntry)}
-        {routes.map(renderSpacer)}
-      </div>
-    </main>
-  );
-}
-
-export default styled(App)`
-  .routes {
-    display: flex;
-    flex-direction: row;
-    flex-wrap: wrap;
-    justify-content: flex-start;
-
-    > div {
-      flex: 1;
-      padding: 1.5rem;
-      text-align: center;
-    }
-  }
-`;

+ 0 - 7
pioneer/packages/app-dashboard/src/translate.ts

@@ -1,7 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-dashboard authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { withTranslation } from 'react-i18next';
-
-export default withTranslation(['app-dashboard']);

+ 0 - 1
pioneer/packages/app-democracy/README.md

@@ -1 +0,0 @@
-# @polkadot/app-democracy

+ 0 - 17
pioneer/packages/app-democracy/package.json

@@ -1,17 +0,0 @@
-{
-  "name": "@polkadot/app-democracy",
-  "version": "0.37.0-beta.63",
-  "description": "A referendum & proposal app",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Jaco Greeff <jacogr@gmail.com>",
-  "maintainers": [
-    "Jaco Greeff <jacogr@gmail.com>"
-  ],
-  "license": "Apache-2.0",
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/react-components": "^0.37.0-beta.63",
-    "@polkadot/react-query": "^0.37.0-beta.63"
-  }
-}

+ 0 - 84
pioneer/packages/app-democracy/src/Overview/Proposal.tsx

@@ -1,84 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AccountId, Balance, Proposal as ProposalType } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { Option, Tuple, Vec } from '@polkadot/types';
-import { ActionItem, InputAddress, Labelled, Static } from '@polkadot/react-components';
-import { withCalls, withMulti } from '@polkadot/react-api';
-import { formatBalance } from '@polkadot/util';
-
-import translate from '../translate';
-import Seconding from './Seconding';
-
-interface Props extends I18nProps {
-  democracy_depositOf?: [Balance, Vec<AccountId>] | null;
-  idNumber: BN;
-  value: ProposalType;
-}
-
-function renderProposal ({ democracy_depositOf, t }: Props): React.ReactNode {
-  if (!democracy_depositOf) {
-    return null;
-  }
-
-  const [balance, addresses] = democracy_depositOf;
-
-  return (
-    <div>
-      <Labelled label={t('depositors')}>
-        {addresses.map((address, index): React.ReactNode => (
-          <InputAddress
-            isDisabled
-            key={`${index}:${address}`}
-            value={address}
-            withLabel={false}
-          />
-        ))}
-      </Labelled>
-      <Static label={t('balance')}>
-        {formatBalance(balance)}
-      </Static>
-    </div>
-  );
-}
-
-function Proposal (props: Props): React.ReactElement<Props> {
-  const { className, democracy_depositOf, idNumber, value } = props;
-  const depositors = democracy_depositOf
-    ? democracy_depositOf[1]
-    : [];
-
-  return (
-    <ActionItem
-      className={className}
-      idNumber={idNumber}
-      proposal={value}
-      accessory={
-        <Seconding
-          depositors={depositors}
-          proposalId={idNumber}
-        />
-      }
-    >
-      {renderProposal(props)}
-    </ActionItem>
-  );
-}
-
-export default withMulti(
-  Proposal,
-  translate,
-  withCalls<Props>(
-    ['query.democracy.depositOf', {
-      paramName: 'idNumber',
-      transform: (value: Option<Tuple>): Tuple | null =>
-        value.unwrapOr(null)
-    }]
-  )
-);

+ 0 - 42
pioneer/packages/app-democracy/src/Overview/Proposals.tsx

@@ -1,42 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Proposal } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { withCalls, withMulti } from '@polkadot/react-api';
-import { Column } from '@polkadot/react-components';
-
-import ProposalDisplay from './Proposal';
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  democracy_publicProps?: [BN, Proposal][];
-}
-
-function Proposals ({ democracy_publicProps, t }: Props): React.ReactElement<Props> {
-  return (
-    <Column
-      emptyText={t('No available proposals')}
-      headerText={t('proposals')}
-    >
-      {democracy_publicProps && democracy_publicProps.map(([idNumber, proposal]): React.ReactNode => (
-        <ProposalDisplay
-          idNumber={idNumber}
-          key={idNumber.toString()}
-          value={proposal}
-        />
-      ))}
-    </Column>
-  );
-}
-
-export default withMulti(
-  Proposals,
-  translate,
-  withCalls<Props>('query.democracy.publicProps')
-);

+ 0 - 122
pioneer/packages/app-democracy/src/Overview/Propose.tsx

@@ -1,122 +0,0 @@
-// Copyright 2017-2019 @polkadot/ui-staking authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Call } from '@polkadot/types/interfaces';
-import { ApiProps } from '@polkadot/react-api/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { createType } from '@polkadot/types';
-import { Button, Extrinsic, InputBalance } from '@polkadot/react-components';
-import TxModal, { TxModalState, TxModalProps } from '@polkadot/react-components/TxModal';
-import { withApi, withMulti } from '@polkadot/react-api';
-
-import translate from '../translate';
-
-interface Props extends TxModalProps, ApiProps {}
-
-interface State extends TxModalState {
-  accountId?: string | null;
-  method: Call | null;
-  value: BN;
-  isValid: boolean;
-}
-
-class Propose extends TxModal<Props, State> {
-  public state: State = {
-    ...this.defaultState,
-    value: new BN(0)
-  };
-
-  protected headerText = (): string => this.props.t('Submit proposal');
-
-  protected txMethod = (): string => 'democracy.propose';
-
-  protected txParams = (): [Call, BN] => {
-    const { value, method } = this.state;
-
-    return [createType('Proposal', method || undefined), value];
-  }
-
-  protected isDisabled = (): boolean => {
-    const { accountId, value, method } = this.state;
-    const hasValue = !!value && value.gtn(0);
-    const hasMethod = !!method;
-
-    return !accountId || !hasValue || !hasMethod;
-  }
-
-  protected renderTrigger = (): React.ReactNode => {
-    const { t } = this.props;
-
-    return (
-      <Button.Group>
-        <Button
-          isPrimary
-          label={t('Submit proposal')}
-          icon='add'
-          onClick={this.showModal}
-        />
-      </Button.Group>
-    );
-  }
-
-  protected renderContent = (): React.ReactNode => {
-    const { apiDefaultTxSudo, t } = this.props;
-    const { value } = this.state;
-    const hasValue = !!value && value.gtn(0);
-
-    return (
-      <section>
-        <Extrinsic
-          defaultValue={apiDefaultTxSudo}
-          label={t('propose')}
-          onChange={this.onChangeExtrinsic}
-          onEnter={this.sendTx}
-        />
-        <InputBalance
-          className='medium'
-          isError={!hasValue}
-          help={t('The amount that will be bonded to submit the proposal')}
-          label={t('value')}
-          onChange={this.onChangeValue}
-          onEnter={this.sendTx}
-        />
-      </section>
-    );
-  }
-
-  private nextState (newState: Partial<State>): void {
-    this.setState(
-      (prevState: State): Pick<State, never> => {
-        const { accountId = prevState.accountId, method = prevState.method, value = prevState.value } = newState;
-        const isValid = !!method && !!value && value.gt(new BN(0)) && !!accountId && accountId.length > 0;
-
-        return {
-          accountId,
-          method,
-          value,
-          isValid
-        };
-      }
-    );
-  }
-
-  private onChangeExtrinsic = (method?: Call): void => {
-    if (!method) {
-      return this.nextState({ method: null });
-    }
-
-    this.nextState({ method });
-  }
-
-  private onChangeValue = (value?: BN): void => {
-    this.nextState({ value });
-  }
-}
-
-export default withMulti(
-  withApi(Propose),
-  translate
-);

+ 0 - 165
pioneer/packages/app-democracy/src/Overview/Referendum.tsx

@@ -1,165 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { DerivedReferendumVote } from '@polkadot/api-derive/types';
-import { I18nProps } from '@polkadot/react-components/types';
-import { ReferendumInfoExtended } from '@polkadot/api-derive/type';
-
-import BN from 'bn.js';
-import React, { useEffect, useState } from 'react';
-import styled from 'styled-components';
-import { ActionItem, Chart, Static, Voting } from '@polkadot/react-components';
-import { formatBalance, formatNumber } from '@polkadot/util';
-import VoteThreshold from '@polkadot/react-params/Param/VoteThreshold';
-import { withCalls, withMulti } from '@polkadot/react-api';
-
-import translate from '../translate';
-
-const COLORS_AYE = ['#64bebe', '#5badad'];
-const COLORS_NAY = ['#d75ea1', '#e189ba'];
-
-interface Props extends I18nProps {
-  idNumber: BN;
-  chain_bestNumber?: BN;
-  democracy_referendumVotesFor?: DerivedReferendumVote[];
-  democracy_enactmentPeriod: BN;
-  value: ReferendumInfoExtended;
-}
-
-interface State {
-  voteCount: number;
-  voteCountAye: number;
-  voteCountNay: number;
-  votedAye: BN;
-  votedNay: BN;
-  votedTotal: BN;
-}
-
-function Referendum ({ chain_bestNumber, className, democracy_enactmentPeriod, democracy_referendumVotesFor, t, value }: Props): React.ReactElement<Props> | null {
-  const [{ voteCount, voteCountAye, voteCountNay, votedAye, votedNay, votedTotal }, setState] = useState<State>({
-    voteCount: 0,
-    voteCountAye: 0,
-    voteCountNay: 0,
-    votedAye: new BN(0),
-    votedNay: new BN(0),
-    votedTotal: new BN(0)
-  });
-
-  useEffect((): void => {
-    if (democracy_referendumVotesFor) {
-      const newState: State = democracy_referendumVotesFor.reduce((state, { balance, vote }): State => {
-        if (vote.isAye) {
-          state.voteCountAye++;
-          state.votedAye = state.votedAye.add(balance);
-        } else {
-          state.voteCountNay++;
-          state.votedNay = state.votedNay.add(balance);
-        }
-
-        state.voteCount++;
-        state.votedTotal = state.votedTotal.add(balance);
-
-        return state;
-      }, {
-        voteCount: 0,
-        voteCountAye: 0,
-        voteCountNay: 0,
-        votedAye: new BN(0),
-        votedNay: new BN(0),
-        votedTotal: new BN(0)
-      });
-
-      if (newState.votedAye.eq(votedNay) && newState.votedNay.eq(votedNay)) {
-        return;
-      }
-
-      setState(newState);
-    }
-  }, [democracy_referendumVotesFor]);
-
-  if (!chain_bestNumber || value.end.sub(chain_bestNumber).lten(0)) {
-    return null;
-  }
-
-  const enactBlock = (democracy_enactmentPeriod || new BN(0)).add(value.end);
-
-  return (
-    <ActionItem
-      className={className}
-      idNumber={value.index}
-      proposal={value.proposal}
-      accessory={
-        <Voting
-          idNumber={value.index}
-          proposal={value.proposal}
-        />
-      }
-    >
-      <div>
-        {voteCount !== 0 && votedTotal.gtn(0) && (
-          <div className='democracy--Referendum-results chart'>
-            <Chart.HorizBar
-              values={[
-                {
-                  colors: COLORS_AYE,
-                  label: `Aye, ${formatBalance(votedAye)} (${formatNumber(voteCountAye)})`,
-                  value: votedAye.muln(10000).div(votedTotal).toNumber() / 100
-                },
-                {
-                  colors: COLORS_NAY,
-                  label: `Nay, ${formatBalance(votedNay)} (${formatNumber(voteCountNay)})`,
-                  value: votedNay.muln(10000).div(votedTotal).toNumber() / 100
-                }
-              ]}
-            />
-          </div>
-        )}
-        <Static label={t('ending at')}>
-          {t('block #{{blockNumber}}, {{remaining}} blocks remaining', {
-            replace: {
-              blockNumber: formatNumber(value.end),
-              remaining: formatNumber(value.end.sub(chain_bestNumber).subn(1))
-            }
-          })}
-        </Static>
-        <Static label={t('activate at (if passed)')}>
-          {t('block #{{blockNumber}}', {
-            replace: {
-              blockNumber: formatNumber(enactBlock)
-            }
-          })}
-        </Static>
-        <VoteThreshold
-          isDisabled
-          defaultValue={{ isValid: true, value: value.threshold }}
-          label={t('vote threshold')}
-          name='voteThreshold'
-          type={{
-            info: 0,
-            type: 'VoteThreshold'
-          }}
-        />
-      </div>
-    </ActionItem>
-  );
-}
-
-export default withMulti(
-  styled(Referendum)`
-    .democracy--Referendum-results {
-      margin-bottom: 1em;
-
-      &.chart {
-        text-align: center;
-      }
-    }
-  `,
-  translate,
-  withCalls<Props>(
-    'derive.chain.bestNumber',
-    ['derive.democracy.referendumVotesFor', { paramName: 'idNumber' }],
-    ['consts.democracy.enactmentPeriod', { fallbacks: ['query.democracy.publicDelay'] }]
-  )
-);

+ 0 - 46
pioneer/packages/app-democracy/src/Overview/Referendums.tsx

@@ -1,46 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { ReferendumInfoExtended } from '@polkadot/api-derive/type';
-import { Option } from '@polkadot/types';
-import { withCalls } from '@polkadot/react-api';
-import { Column } from '@polkadot/react-components';
-
-import Referendum from './Referendum';
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  democracy_referendums?: Option<ReferendumInfoExtended>[];
-}
-
-function Referendums ({ democracy_referendums, t }: Props): React.ReactElement<Props> {
-  return (
-    <Column
-      emptyText={t('No available referendums')}
-      headerText={t('referendum')}
-    >
-      {democracy_referendums && democracy_referendums
-        .filter((opt): boolean => opt.isSome)
-        .map((opt): ReferendumInfoExtended => opt.unwrap())
-        .map((referendum): React.ReactNode => (
-          <Referendum
-            idNumber={referendum.index}
-            key={referendum.index.toString()}
-            value={referendum}
-          />
-        ))
-      }
-    </Column>
-  );
-}
-
-export default translate(
-  withCalls<Props>(
-    'derive.democracy.referendums'
-  )(Referendums)
-);

+ 0 - 92
pioneer/packages/app-democracy/src/Overview/Seconding.tsx

@@ -1,92 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AccountId } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-import { SubjectInfo } from '@polkadot/ui-keyring/observable/types';
-
-import BN from 'bn.js';
-import React, { useState } from 'react';
-import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components';
-import accountObservable from '@polkadot/ui-keyring/observable/accounts';
-import { withMulti, withObservable } from '@polkadot/react-api';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  allAccounts?: SubjectInfo;
-  depositors: AccountId[];
-  proposalId: BN | number;
-}
-
-function Seconding ({ allAccounts, depositors, proposalId, t }: Props): React.ReactElement<Props> | null {
-  const [accountId, setAccountId] = useState<string | null>(null);
-  const [isSecondingOpen, setIsSecondingOpen] = useState(false);
-  const hasAccounts = allAccounts && Object.keys(allAccounts).length !== 0;
-
-  if (!hasAccounts) {
-    return null;
-  }
-
-  const isDepositor = depositors.some((depositor): boolean => depositor.eq(accountId));
-  const _toggleSeconding = (): void => setIsSecondingOpen(!isSecondingOpen);
-
-  return (
-    <>
-      {isSecondingOpen && (
-        <Modal
-          dimmer='inverted'
-          open
-          size='small'
-        >
-          <Modal.Header>{t('Second proposal')}</Modal.Header>
-          <Modal.Content>
-            <InputAddress
-              help={t('Select the account you wish to second with. This will lock your funds until the proposal is either approved or rejected')}
-              label={t('second with account')}
-              onChange={setAccountId}
-              type='account'
-              withLabel
-            />
-          </Modal.Content>
-          <Modal.Actions>
-            <Button.Group>
-              <Button
-                isNegative
-                onClick={_toggleSeconding}
-                label={t('Cancel')}
-                icon='cancel'
-              />
-              <Button.Or />
-              <TxButton
-                accountId={accountId}
-                isDisabled={!accountId || isDepositor}
-                isPrimary
-                label={t('Second')}
-                icon='sign-in'
-                onClick={_toggleSeconding}
-                params={[proposalId]}
-                tx='democracy.second'
-              />
-            </Button.Group>
-          </Modal.Actions>
-        </Modal>
-      )}
-      <div className='ui--Row-buttons'>
-        <Button
-          isPrimary
-          label={t('Second proposal')}
-          icon='toggle off'
-          onClick={_toggleSeconding}
-        />
-      </div>
-    </>
-  );
-}
-
-export default withMulti(
-  Seconding,
-  translate,
-  withObservable(accountObservable.subject, { propName: 'allAccounts' })
-);

+ 0 - 68
pioneer/packages/app-democracy/src/Overview/Summary.tsx

@@ -1,68 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { SummaryBox, CardSummary } from '@polkadot/react-components';
-import { withCalls } from '@polkadot/react-api';
-import { formatNumber } from '@polkadot/util';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  chain_bestNumber?: BN;
-  democracy_launchPeriod?: BN;
-  democracy_nextTally?: BN;
-  democracy_publicPropCount?: BN;
-  democracy_referendumCount?: BN;
-}
-
-function Summary (props: Props): React.ReactElement<Props> {
-  const {
-    chain_bestNumber = new BN(0),
-    democracy_launchPeriod = new BN(1),
-    democracy_nextTally = new BN(0),
-    democracy_publicPropCount,
-    democracy_referendumCount = new BN(0),
-    t
-  } = props;
-
-  return (
-    <SummaryBox>
-      <section>
-        <CardSummary label={t('proposals')}>
-          {formatNumber(democracy_publicPropCount)}
-        </CardSummary>
-        <CardSummary label={t('referenda')}>
-          {formatNumber(democracy_referendumCount)}
-        </CardSummary>
-        <CardSummary label={t('active')}>
-          {formatNumber(democracy_referendumCount.sub(democracy_nextTally))}
-        </CardSummary>
-      </section>
-      <section className='ui--media-medium'>
-        <CardSummary
-          label={t('launch period')}
-          progress={{
-            value: chain_bestNumber.mod(democracy_launchPeriod).addn(1),
-            total: democracy_launchPeriod || new BN(1)
-          }}
-        />
-      </section>
-    </SummaryBox>
-  );
-}
-
-export default translate(
-  withCalls<Props>(
-    ['consts.democracy.launchPeriod', { fallbacks: ['query.democracy.launchPeriod'] }],
-    'query.democracy.nextTally',
-    'query.democracy.publicPropCount',
-    'query.democracy.referendumCount',
-    'derive.chain.bestNumber'
-  )(Summary)
-);

+ 0 - 100
pioneer/packages/app-democracy/src/Overview/Voting.tsx

@@ -1,100 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-import { SubjectInfo } from '@polkadot/ui-keyring/observable/types';
-
-import BN from 'bn.js';
-import React, { useState } from 'react';
-import { Button, Dropdown, InputAddress, Modal, TxButton } from '@polkadot/react-components';
-import accountObservable from '@polkadot/ui-keyring/observable/accounts';
-import { withMulti, withObservable } from '@polkadot/react-api';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  allAccounts?: SubjectInfo;
-  referendumId: BN | number;
-}
-
-function Voting ({ allAccounts, referendumId, t }: Props): React.ReactElement<Props> | null {
-  const [accountId, setAccountId] = useState<string | null>(null);
-  const [isVotingOpen, setIsVotingOpen] = useState(false);
-  const [voteValue, setVoteValue] = useState(true);
-  const hasAccounts = allAccounts && Object.keys(allAccounts).length !== 0;
-
-  if (!hasAccounts) {
-    return null;
-  }
-
-  const _toggleVoting = (): void => setIsVotingOpen(!isVotingOpen);
-
-  return (
-    <>
-      {isVotingOpen && (
-        <Modal
-          dimmer='inverted'
-          open
-          size='small'
-        >
-          <Modal.Header>{t('Vote on proposal')}</Modal.Header>
-          <Modal.Content>
-            <InputAddress
-              help={t('Select the account you wish to vote with. You can approve "aye" or deny "nay" the proposal.')}
-              label={t('vote with account')}
-              onChange={setAccountId}
-              type='account'
-              withLabel
-            />
-            <Dropdown
-              help={t('Select your vote preferences for this proposal, either to approve or disapprove')}
-              label={t('record my vote as')}
-              options={[
-                { text: t('Aye, I approve'), value: true },
-                { text: t('Nay, I do not approve'), value: false }
-              ]}
-              onChange={setVoteValue}
-              value={voteValue}
-            />
-          </Modal.Content>
-          <Modal.Actions>
-            <Button.Group>
-              <Button
-                icon='cancel'
-                isNegative
-                label={t('Cancel')}
-                onClick={_toggleVoting}
-              />
-              <Button.Or />
-              <TxButton
-                accountId={accountId}
-                icon='check'
-                isDisabled={!accountId}
-                isPrimary
-                label={t('Vote')}
-                onClick={_toggleVoting}
-                params={[referendumId, voteValue]}
-                tx='democracy.vote'
-              />
-            </Button.Group>
-          </Modal.Actions>
-        </Modal>
-      )}
-      <div className='ui--Row-buttons'>
-        <Button
-          icon='check'
-          isPrimary
-          label={t('Vote')}
-          onClick={_toggleVoting}
-        />
-      </div>
-    </>
-  );
-}
-
-export default withMulti(
-  Voting,
-  translate,
-  withObservable(accountObservable.subject, { propName: 'allAccounts' })
-);

+ 0 - 24
pioneer/packages/app-democracy/src/Overview/index.tsx

@@ -1,24 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import React from 'react';
-import { Columar } from '@polkadot/react-components';
-
-import Proposals from './Proposals';
-import Referendums from './Referendums';
-import Summary from './Summary';
-import Propose from './Propose';
-
-export default function Overview (): React.ReactElement {
-  return (
-    <>
-      <Summary />
-      <Propose />
-      <Columar>
-        <Referendums />
-        <Proposals />
-      </Columar>
-    </>
-  );
-}

+ 0 - 46
pioneer/packages/app-democracy/src/index.tsx

@@ -1,46 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AppProps, BareProps, I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { Route, Switch } from 'react-router';
-import { HelpOverlay, Tabs } from '@polkadot/react-components';
-import uiSettings from '@polkadot/ui-settings';
-
-import basicMd from './md/basic.md';
-import Overview from './Overview';
-import translate from './translate';
-
-interface Props extends AppProps, BareProps, I18nProps {}
-
-const hidden = uiSettings.uiMode === 'full'
-  ? []
-  : ['propose'];
-
-function App ({ basePath, t }: Props): React.ReactElement<Props> {
-  return (
-    <main className='democracy--App'>
-      <HelpOverlay md={basicMd} />
-      <header>
-        <Tabs
-          basePath={basePath}
-          hidden={hidden}
-          items={[
-            {
-              isRoot: true,
-              name: 'overview',
-              text: t('Democracy overview')
-            }
-          ]}
-        />
-      </header>
-      <Switch>
-        <Route component={Overview} />
-      </Switch>
-    </main>
-  );
-}
-
-export default translate(App);

+ 0 - 13
pioneer/packages/app-democracy/src/md/basic.md

@@ -1,13 +0,0 @@
-# Democracy
-
-This application lets you view proposals and vote for or against a referendum.
-Anyone can create a proposal by bonding the minimum deposit for a certain period of time (No. of Blocks). If someone likes the proposal, they could deposit the same amount of tokens to support it. The minimum deposit is currently 5 Units/DOTs.
-
-# Proposals
-
-This lists the proposals that you can not vote on yet. The proposal with the highest amount of Units/DOTs supporting it will be selected in the next launch period for everyone to vote. This selected proposal evolved in a referendum. The tokens locked to support each proposal will be released once the proposal is tabled.
-
-# Referendum
-
-This lists the proposal that you can now vote for "aye" or against "nay".
-At the end of the launch period, and depending on the outcome of the referendum, the action that was subjected to vote will be executed or rejected.

+ 0 - 7
pioneer/packages/app-democracy/src/translate.ts

@@ -1,7 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-explorer authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { withTranslation } from 'react-i18next';
-
-export default withTranslation(['app-democracy']);

+ 0 - 3
pioneer/packages/app-generic-asset/README.md

@@ -1,3 +0,0 @@
-# @polkadot/app-generic-asset
-
-A basic GenericAsset transfer application, allowing the movement of funds from one account to another.

+ 0 - 16
pioneer/packages/app-generic-asset/package.json

@@ -1,16 +0,0 @@
-{
-  "name": "@polkadot/app-generic-asset",
-  "version": "0.37.0-beta.63",
-  "description": "A basic GenericAsset transfer app",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Bryan Chen <xlchen1291@gmail.com>",
-  "maintainers": [
-    "Bryan Chen <xlchen1291@gmail.com>"
-  ],
-  "license": "Apache-2.0",
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/react-components": "^0.37.0-beta.63"
-  }
-}

+ 0 - 47
pioneer/packages/app-generic-asset/src/AssetCard.tsx

@@ -1,47 +0,0 @@
-// Copyright 2019 @polkadot/app-generic-asset authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import React from 'react';
-import { Card, Button } from '@polkadot/react-components';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import AssetRow from './AssetRow';
-import translate from './translate';
-
-interface Props extends I18nProps {
-  assetId: string;
-  name: string;
-  onSaveName: (id: string, name: string) => void;
-  onForget: (id: string) => void;
-}
-
-function AssetCard ({ className, assetId, name, onForget, onSaveName, t }: Props): React.ReactElement<Props> {
-  const _onForget = (): void => onForget(assetId);
-  const _onSaveName = (name: string): void => onSaveName(assetId, name);
-
-  return (
-    <Card className={className}>
-      <div>
-        <AssetRow
-          isEditable
-          assetId={assetId}
-          defaultName={name}
-          buttons={(
-            <Button
-              isNegative
-              onClick={_onForget}
-              icon='trash'
-              key='forget'
-              size='small'
-              tooltip={t('Forget this asset')}
-            />
-          )}
-          onSaveName={_onSaveName}
-        />
-      </div>
-    </Card>
-  );
-}
-
-export default translate(AssetCard);

+ 0 - 66
pioneer/packages/app-generic-asset/src/AssetRow.tsx

@@ -1,66 +0,0 @@
-// Copyright 2019 @polkadot/app-generic-asset authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import React from 'react';
-import styled from 'styled-components';
-import { CopyButton } from '@polkadot/react-components';
-import Row, { styles, RowProps, RowState } from '@polkadot/react-components/Row';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import translate from './translate';
-
-type Props = I18nProps & RowProps & {
-  onSaveName: (name: string) => void;
-  assetId: string;
-}
-
-class AssetRow extends Row<Props, RowState> {
-  constructor (props: Props) {
-    super(props);
-
-    this.state.name = this.props.defaultName || 'New Asset';
-  }
-
-  public render (): React.ReactNode {
-    const { className } = this.props;
-
-    return (
-      <div
-        className={`ui--Row ${className}`}
-      >
-        <div className='ui--Row-base'>
-          <div className='ui--Row-details'>
-            {this.renderName()}
-            {this.renderAssetId()}
-          </div>
-          {this.renderButtons()}
-        </div>
-      </div>
-    );
-  }
-
-  protected saveName = (): void => {
-    const { name } = this.state;
-    const { onSaveName } = this.props;
-
-    const trimmedName = name.trim();
-
-    onSaveName(trimmedName);
-    this.setState({ isEditingName: false });
-  }
-
-  private renderAssetId (): React.ReactNode {
-    const { assetId, t } = this.props;
-
-    return (
-      <div className='ui--Row-details'>
-        <CopyButton value={assetId}>
-          <span>{t('Asset ID')}: {assetId}</span>
-        </CopyButton>
-      </div>
-    );
-  }
-}
-
-export default translate(styled(AssetRow)`${styles}`);

+ 0 - 68
pioneer/packages/app-generic-asset/src/Assets.tsx

@@ -1,68 +0,0 @@
-// Copyright 2019 @polkadot/app-generic-asset authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React, { useState } from 'react';
-import { Button, CardGrid } from '@polkadot/react-components';
-import { withMulti, withObservable } from '@polkadot/react-api';
-
-import assetRegistry, { AssetsSubjectInfo } from './assetsRegistry';
-import AssetCard from './AssetCard';
-import CreateModal from './modals/Create';
-import translate from './translate';
-
-type Props = I18nProps & {
-  assets?: AssetsSubjectInfo;
-};
-
-function Assets ({ assets, t }: Props): React.ReactElement<Props> {
-  const [isCreateOpen, setIsCreateOpen] = useState(false);
-  const emptyScreen = !isCreateOpen && (!assets || Object.keys(assets).length === 0);
-
-  const _onForget = (id: string): void => assetRegistry.remove(id);
-  const _onRegister = (id: BN, name: string): void => assetRegistry.add(id.toString(), name);
-  const _onSaveName = (id: string, name: string): void => assetRegistry.add(id, name);
-  const _toggleCreate = (): void => setIsCreateOpen(!isCreateOpen);
-
-  return (
-    <CardGrid
-      buttons={
-        <Button.Group>
-          <Button
-            isPrimary
-            label={t('Register Asset')}
-            icon='registered'
-            onClick={_toggleCreate}
-          />
-        </Button.Group>
-      }
-      isEmpty={emptyScreen}
-      emptyText={t('No assets found.')}
-    >
-      {isCreateOpen && (
-        <CreateModal
-          onClose={_toggleCreate}
-          onRegister={_onRegister}
-        />
-      )}
-      {assets && Object.entries(assets).map(([id, name]): React.ReactNode => (
-        <AssetCard
-          key={id}
-          assetId={id}
-          name={name}
-          onSaveName={_onSaveName}
-          onForget={_onForget}
-        />
-      ))}
-    </CardGrid>
-  );
-}
-
-export default withMulti(
-  Assets,
-  translate,
-  withObservable(assetRegistry.subject, { propName: 'assets' })
-);

+ 0 - 150
pioneer/packages/app-generic-asset/src/Transfer.tsx

@@ -1,150 +0,0 @@
-// Copyright 2019 @polkadot/app-generic-asset authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { SubmittableExtrinsic } from '@polkadot/api/promise/types';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React, { useContext, useEffect, useState } from 'react';
-import styled from 'styled-components';
-import { Button, InputAddress, InputBalance, TxButton, Dropdown } from '@polkadot/react-components';
-import { Available } from '@polkadot/react-query';
-import Checks from '@polkadot/react-signer/Checks';
-import { ApiContext, withMulti, withObservable } from '@polkadot/react-api';
-
-import assetRegistry, { AssetsSubjectInfo } from './assetsRegistry';
-import translate from './translate';
-
-interface Props extends I18nProps {
-  className?: string;
-  onClose: () => void;
-  recipientId?: string;
-  senderId?: string;
-  assets?: AssetsSubjectInfo;
-}
-
-interface Option {
-  text: string;
-  value: string;
-}
-
-function Transfer ({ assets, className, onClose, recipientId: propRecipientId, senderId: propSenderId, t }: Props): React.ReactElement<Props> {
-  const { api } = useContext(ApiContext);
-  const [assetId, setAssetId] = useState('0');
-  const [amount, setAmount] = useState<BN | undefined>(new BN(0));
-  const [extrinsic, setExtrinsic] = useState<SubmittableExtrinsic | null>(null);
-  const [hasAvailable, setHasAvailable] = useState(true);
-  const [options, setOptions] = useState<Option[]>([]);
-  const [recipientId, setRecipientId] = useState(propRecipientId || null);
-  const [senderId, setSenderId] = useState(propSenderId || null);
-
-  // build up our list of options via assets
-  useEffect((): void => {
-    setOptions(Object.entries(assets || {}).map(([id, name]): Option => ({
-      value: id,
-      text: `${name} (${id})`
-    })));
-  }, [assets]);
-
-  // create an extrinsic if we have correct values
-  useEffect((): void => {
-    setExtrinsic(
-      recipientId && senderId && amount
-        ? api.tx.genericAsset.transfer(assetId, recipientId, amount)
-        : null
-    );
-  }, [amount, assetId, recipientId, senderId]);
-
-  const _onAddAssetId = (id: string): void => {
-    // eslint-disable-next-line @typescript-eslint/prefer-regexp-exec
-    if (id.trim().match(/^\d+$/)) {
-      assetRegistry.add(id, id);
-    }
-  };
-
-  const transferrable = <span className='label'>{t('transferrable ')}</span>;
-
-  return (
-    <div>
-      <div className={className}>
-        <InputAddress
-          defaultValue={propSenderId}
-          help={t('The account you will send funds from.')}
-          isDisabled={!!propSenderId}
-          label={t('send from account')}
-          labelExtra={<Available label={transferrable} params={senderId} />}
-          onChange={setSenderId}
-          type='account'
-        />
-        <InputAddress
-          defaultValue={propRecipientId}
-          help={t('Select a contact or paste the address you want to send funds to.')}
-          isDisabled={!!propRecipientId}
-          label={t('send to address')}
-          labelExtra={<Available label={transferrable} params={recipientId} />}
-          onChange={setRecipientId}
-          type='allPlus'
-        />
-        <Dropdown
-          allowAdd
-          help={t('Enter the Asset ID of the token you want to transfer.')}
-          label={t('asset id')}
-          onChange={setAssetId}
-          options={options}
-          onAdd={_onAddAssetId}
-          value={assetId}
-        />
-        <InputBalance
-          help={t('Type the amount you want to transfer. Note that you can select the unit on the right e.g sending 1 milli is equivalent to sending 0.001.')}
-          isError={!hasAvailable}
-          label={t('amount')}
-          onChange={setAmount}
-        />
-        <Checks
-          accountId={senderId}
-          extrinsic={extrinsic}
-          isSendable
-          onChange={setHasAvailable}
-        />
-      </div>
-      <Button.Group>
-        <TxButton
-          accountId={senderId}
-          extrinsic={extrinsic}
-          isDisabled={!hasAvailable}
-          isPrimary
-          label={t('Make Transfer')}
-          icon='send'
-          onStart={onClose}
-          withSpinner={false}
-        />
-      </Button.Group>
-    </div>
-  );
-}
-
-export default withMulti(
-  styled(Transfer)`
-    article.padded {
-      box-shadow: none;
-      margin-left: 2rem;
-    }
-
-    .balance {
-      margin-bottom: 0.5rem;
-      text-align: right;
-      padding-right: 1rem;
-
-      .label {
-        opacity: 0.7;
-      }
-    }
-
-    label.with-help {
-      flex-basis: 10rem;
-    }
-  `,
-  translate,
-  withObservable(assetRegistry.subject, { propName: 'assets' })
-);

+ 0 - 44
pioneer/packages/app-generic-asset/src/assetsRegistry.tsx

@@ -1,44 +0,0 @@
-// Copyright 2019 @polkadot/app-generic-asset authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { BehaviorSubject } from 'rxjs';
-
-const ASSETS_KEY = 'polkadot-app-generic-asset-assets';
-
-export interface AssetsSubjectInfo { [id: string]: string }
-
-let initalAssets: AssetsSubjectInfo = {};
-
-try {
-  const storedAsset = localStorage.getItem(ASSETS_KEY);
-  if (storedAsset) {
-    initalAssets = JSON.parse(storedAsset);
-  }
-} catch (e) {
-  // ignore error
-}
-
-const subject = new BehaviorSubject(initalAssets);
-
-subject.subscribe((assets): void =>
-  localStorage.setItem(ASSETS_KEY, JSON.stringify(assets))
-);
-
-export default {
-  getAssets: (): AssetsSubjectInfo[] =>
-    Object.entries(subject.getValue()).map(([id, name]): AssetsSubjectInfo => ({ id, name })),
-  add: (id: string, name: string): void => {
-    const assets = subject.getValue();
-    subject.next({
-      ...assets,
-      [id]: name
-    });
-  },
-  remove: (id: string): void => {
-    // eslint-disable-next-line @typescript-eslint/no-unused-vars
-    const { [id]: ignore, ...assets } = subject.getValue();
-    subject.next(assets);
-  },
-  subject
-};

+ 0 - 45
pioneer/packages/app-generic-asset/src/index.tsx

@@ -1,45 +0,0 @@
-// Copyright 2019 @polkadot/app-generic-asset authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AppProps, BareProps, I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { Route, Switch } from 'react-router';
-import { Tabs } from '@polkadot/react-components';
-
-import Transfer from './Transfer';
-import Assets from './Assets';
-
-import translate from './translate';
-
-interface Props extends AppProps, BareProps, I18nProps {}
-
-function App ({ basePath, t }: Props): React.ReactElement<Props> {
-  return (
-    <main className='treasury--App'>
-      <header>
-        <Tabs
-          basePath={basePath}
-          items={[
-            {
-              isRoot: true,
-              name: 'assets',
-              text: t('Assets')
-            },
-            {
-              name: 'transfer',
-              text: t('Transfer')
-            }
-          ]}
-        />
-      </header>
-      <Switch>
-        <Route path={`${basePath}/transfer`} component={Transfer} />
-        <Route component={Assets} />
-      </Switch>
-    </main>
-  );
-}
-
-export default translate(App);

+ 0 - 76
pioneer/packages/app-generic-asset/src/modals/Create.tsx

@@ -1,76 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-address-book authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React, { useState } from 'react';
-import { InputNumber, Button, Input, Modal } from '@polkadot/react-components';
-
-import translate from '../translate';
-
-export interface ModalProps {
-  onClose: () => void;
-  onRegister: (id: BN, name: string) => void;
-}
-
-interface Props extends ModalProps, I18nProps {}
-
-function Create ({ onClose, onRegister, t }: Props): React.ReactElement<Props> {
-  const [assetId, setAssetId] = useState(new BN(0));
-  const [name, setName] = useState('new asset');
-
-  const _onChangeAssetId = (assetId: BN | undefined): void => setAssetId(assetId || new BN(0));
-  const _onCommit = (): void => {
-    onRegister(assetId, name);
-    onClose();
-  };
-
-  return (
-    <Modal
-      dimmer='inverted'
-      open
-    >
-      <Modal.Header>{t('Register an Asset')}</Modal.Header>
-      <Modal.Content>
-        <InputNumber
-          help={t('Enter the Asset ID of the token you want to manage.')}
-          label={t('asset id')}
-          onChange={_onChangeAssetId}
-          onEnter={_onCommit}
-          value={assetId}
-        />
-        <Input
-          className='full'
-          help={t('Type the name of this Asset. This name will be used across all the apps. It can be edited later on.')}
-          isError={!name}
-          label={t('name')}
-          onChange={setName}
-          onEnter={_onCommit}
-          value={name}
-        />
-      </Modal.Content>
-      <Modal.Actions>
-        <Button.Group>
-          <Button
-            isNegative
-            onClick={onClose}
-            label={t('Cancel')}
-            icon='cancel'
-          />
-          <Button.Or />
-          <Button
-            isDisabled={!name}
-            isPrimary
-            onClick={onClose}
-            label={t('Register')}
-            icon='registered'
-          />
-        </Button.Group>
-      </Modal.Actions>
-    </Modal>
-  );
-}
-
-export default translate(Create);

+ 0 - 7
pioneer/packages/app-generic-asset/src/translate.ts

@@ -1,7 +0,0 @@
-// Copyright 2019 @polkadot/app-generic-asset authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { withTranslation } from 'react-i18next';
-
-export default withTranslation(['app-generic-asset']);

+ 0 - 1
pioneer/packages/app-parachains/README.md

@@ -1 +0,0 @@
-# @polkadot/app-parachains

+ 0 - 17
pioneer/packages/app-parachains/package.json

@@ -1,17 +0,0 @@
-{
-  "name": "@polkadot/app-parachains",
-  "version": "0.37.0-beta.63",
-  "description": "Parachains",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Jaco Greeff <jacogr@gmail.com>",
-  "maintainers": [
-    "Jaco Greeff <jacogr@gmail.com>"
-  ],
-  "license": "Apache-2.0",
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/react-components": "^0.37.0-beta.63",
-    "@polkadot/react-query": "^0.37.0-beta.63"
-  }
-}

+ 0 - 11
pioneer/packages/app-parachains/src/Overview/Chain.tsx

@@ -1,11 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-parachains authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import React from 'react';
-
-type Props = {};
-
-export default function Chain (): React.ReactElement<Props> | null {
-  return null;
-}

+ 0 - 71
pioneer/packages/app-parachains/src/Overview/Parachain.tsx

@@ -1,71 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-parachains authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import styled from 'styled-components';
-import { Bytes, Option } from '@polkadot/types';
-import { Card, Static } from '@polkadot/react-components';
-import { styles as rowStyles } from '@polkadot/react-components/Row';
-import { withCalls, withMulti } from '@polkadot/react-api';
-import { formatNumber } from '@polkadot/util';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  className?: string;
-  paraId: BN;
-  parachains_heads?: string | null;
-  parachains_relayDispatchQueueSize?: [BN, BN];
-}
-
-function Parachain ({ className, paraId, parachains_heads, parachains_relayDispatchQueueSize, t }: Props): React.ReactElement<Props> {
-  return (
-    <Card className={className}>
-      <div className='ui--Row'>
-        <div className='ui--Row-base'>
-          <div className='ui--Row-details parachains--Item-header'>
-            <h3>#{formatNumber(paraId)}</h3>
-          </div>
-        </div>
-        <Static
-          help={t('the last heads of this parachain')}
-          label={t('heads')}
-          value={parachains_heads || t('<unknown>')}
-        />
-        <Static
-          help={t('the relay dispatch queue size')}
-          label={t('relay queue')}
-          value={
-            parachains_relayDispatchQueueSize
-              ? formatNumber(parachains_relayDispatchQueueSize[0])
-              : '-'
-          }
-        />
-      </div>
-    </Card>
-  );
-}
-
-export default withMulti(
-  styled(Parachain)`
-    ${rowStyles}
-
-    .parachains--Item-header {
-      margin-bottom: 1rem;
-    }
-  `,
-  translate,
-  withCalls<Props>(
-    ['query.parachains.heads', {
-      paramName: 'paraId',
-      transform: (heads: Option<Bytes>): string | null =>
-        heads.isSome ? heads.unwrap().toHex() : null
-    }],
-    ['query.parachains.relayDispatchQueueSize', { paramName: 'paraId' }]
-  )
-);

+ 0 - 42
pioneer/packages/app-parachains/src/Overview/Parachains.tsx

@@ -1,42 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-parachains authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { Column } from '@polkadot/react-components';
-import { withCalls } from '@polkadot/react-api';
-
-import translate from '../translate';
-import Parachain from './Parachain';
-
-interface Props extends I18nProps {
-  parachains?: BN[];
-}
-
-function Parachains ({ parachains, t }: Props): React.ReactElement<Props> {
-  return (
-    <Column
-      emptyText={t('no deployed parachains')}
-      headerText={t('parachains')}
-    >
-      {parachains && parachains.map((paraId): React.ReactNode => (
-        <Parachain
-          key={paraId.toString()}
-          paraId={paraId}
-        />
-      ))}
-    </Column>
-  );
-}
-
-export default translate(
-  withCalls<Props>(
-    ['query.registrar.parachains', {
-      fallbacks: ['query.parachains.parachains'],
-      propName: 'parachains'
-    }]
-  )(Parachains)
-);

+ 0 - 50
pioneer/packages/app-parachains/src/Overview/Summary.tsx

@@ -1,50 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-parachains authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { SummaryBox, CardSummary } from '@polkadot/react-components';
-import { withCalls } from '@polkadot/react-api';
-import { formatNumber } from '@polkadot/util';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  nextFreeId?: BN;
-  parachains?: BN[];
-}
-
-function Summary ({ nextFreeId, parachains = [], t }: Props): React.ReactElement<Props> {
-  return (
-    <SummaryBox>
-      <section>
-        <CardSummary label={t('parachains')}>
-          {formatNumber(parachains.length)}
-        </CardSummary>
-      </section>
-      {nextFreeId && (
-        <section>
-          <CardSummary label={t('next id')}>
-            {formatNumber(nextFreeId)}
-          </CardSummary>
-        </section>
-      )}
-    </SummaryBox>
-  );
-}
-
-export default translate(
-  withCalls<Props>(
-    ['query.registrar.nextFreeId', {
-      fallbacks: ['query.parachains.nextFreeId'],
-      propName: 'nextFreeId'
-    }],
-    ['query.registrar.parachains', {
-      fallbacks: ['query.parachains.parachains'],
-      propName: 'parachains'
-    }]
-  )(Summary)
-);

+ 0 - 22
pioneer/packages/app-parachains/src/Overview/index.tsx

@@ -1,22 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-parachains authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import React from 'react';
-import { Columar } from '@polkadot/react-components';
-
-import Parachains from './Parachains';
-import Summary from './Summary';
-
-type Props = {};
-
-export default function Overview (): React.ReactElement<Props> {
-  return (
-    <>
-      <Summary />
-      <Columar>
-        <Parachains />
-      </Columar>
-    </>
-  );
-}

+ 0 - 38
pioneer/packages/app-parachains/src/index.tsx

@@ -1,38 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-parachains authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AppProps, BareProps, I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { Route, Switch } from 'react-router';
-import { Tabs } from '@polkadot/react-components';
-
-import Overview from './Overview';
-import translate from './translate';
-
-interface Props extends AppProps, BareProps, I18nProps {}
-
-function App ({ basePath, t }: Props): React.ReactElement<Props> {
-  return (
-    <main>
-      <header>
-        <Tabs
-          basePath={basePath}
-          items={[
-            {
-              isRoot: true,
-              name: 'overview',
-              text: t('Parachains overview')
-            }
-          ]}
-        />
-      </header>
-      <Switch>
-        <Route component={Overview} />
-      </Switch>
-    </main>
-  );
-}
-
-export default translate(App);

+ 0 - 7
pioneer/packages/app-parachains/src/translate.ts

@@ -1,7 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-parachains authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { withTranslation } from 'react-i18next';
-
-export default withTranslation(['app-parachains']);

+ 0 - 201
pioneer/packages/app-treasury/LICENSE

@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                    http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-  "License" shall mean the terms and conditions for use, reproduction,
-  and distribution as defined by Sections 1 through 9 of this document.
-
-  "Licensor" shall mean the copyright owner or entity authorized by
-  the copyright owner that is granting the License.
-
-  "Legal Entity" shall mean the union of the acting entity and all
-  other entities that control, are controlled by, or are under common
-  control with that entity. For the purposes of this definition,
-  "control" means (i) the power, direct or indirect, to cause the
-  direction or management of such entity, whether by contract or
-  otherwise, or (ii) ownership of fifty percent (50%) or more of the
-  outstanding shares, or (iii) beneficial ownership of such entity.
-
-  "You" (or "Your") shall mean an individual or Legal Entity
-  exercising permissions granted by this License.
-
-  "Source" form shall mean the preferred form for making modifications,
-  including but not limited to software source code, documentation
-  source, and configuration files.
-
-  "Object" form shall mean any form resulting from mechanical
-  transformation or translation of a Source form, including but
-  not limited to compiled object code, generated documentation,
-  and conversions to other media types.
-
-  "Work" shall mean the work of authorship, whether in Source or
-  Object form, made available under the License, as indicated by a
-  copyright notice that is included in or attached to the work
-  (an example is provided in the Appendix below).
-
-  "Derivative Works" shall mean any work, whether in Source or Object
-  form, that is based on (or derived from) the Work and for which the
-  editorial revisions, annotations, elaborations, or other modifications
-  represent, as a whole, an original work of authorship. For the purposes
-  of this License, Derivative Works shall not include works that remain
-  separable from, or merely link (or bind by name) to the interfaces of,
-  the Work and Derivative Works thereof.
-
-  "Contribution" shall mean any work of authorship, including
-  the original version of the Work and any modifications or additions
-  to that Work or Derivative Works thereof, that is intentionally
-  submitted to Licensor for inclusion in the Work by the copyright owner
-  or by an individual or Legal Entity authorized to submit on behalf of
-  the copyright owner. For the purposes of this definition, "submitted"
-  means any form of electronic, verbal, or written communication sent
-  to the Licensor or its representatives, including but not limited to
-  communication on electronic mailing lists, source code control systems,
-  and issue tracking systems that are managed by, or on behalf of, the
-  Licensor for the purpose of discussing and improving the Work, but
-  excluding communication that is conspicuously marked or otherwise
-  designated in writing by the copyright owner as "Not a Contribution."
-
-  "Contributor" shall mean Licensor and any individual or Legal Entity
-  on behalf of whom a Contribution has been received by Licensor and
-  subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  copyright license to reproduce, prepare Derivative Works of,
-  publicly display, publicly perform, sublicense, and distribute the
-  Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  (except as stated in this section) patent license to make, have made,
-  use, offer to sell, sell, import, and otherwise transfer the Work,
-  where such license applies only to those patent claims licensable
-  by such Contributor that are necessarily infringed by their
-  Contribution(s) alone or by combination of their Contribution(s)
-  with the Work to which such Contribution(s) was submitted. If You
-  institute patent litigation against any entity (including a
-  cross-claim or counterclaim in a lawsuit) alleging that the Work
-  or a Contribution incorporated within the Work constitutes direct
-  or contributory patent infringement, then any patent licenses
-  granted to You under this License for that Work shall terminate
-  as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-  Work or Derivative Works thereof in any medium, with or without
-  modifications, and in Source or Object form, provided that You
-  meet the following conditions:
-
-  (a) You must give any other recipients of the Work or
-      Derivative Works a copy of this License; and
-
-  (b) You must cause any modified files to carry prominent notices
-      stating that You changed the files; and
-
-  (c) You must retain, in the Source form of any Derivative Works
-      that You distribute, all copyright, patent, trademark, and
-      attribution notices from the Source form of the Work,
-      excluding those notices that do not pertain to any part of
-      the Derivative Works; and
-
-  (d) If the Work includes a "NOTICE" text file as part of its
-      distribution, then any Derivative Works that You distribute must
-      include a readable copy of the attribution notices contained
-      within such NOTICE file, excluding those notices that do not
-      pertain to any part of the Derivative Works, in at least one
-      of the following places: within a NOTICE text file distributed
-      as part of the Derivative Works; within the Source form or
-      documentation, if provided along with the Derivative Works; or,
-      within a display generated by the Derivative Works, if and
-      wherever such third-party notices normally appear. The contents
-      of the NOTICE file are for informational purposes only and
-      do not modify the License. You may add Your own attribution
-      notices within Derivative Works that You distribute, alongside
-      or as an addendum to the NOTICE text from the Work, provided
-      that such additional attribution notices cannot be construed
-      as modifying the License.
-
-  You may add Your own copyright statement to Your modifications and
-  may provide additional or different license terms and conditions
-  for use, reproduction, or distribution of Your modifications, or
-  for any such Derivative Works as a whole, provided Your use,
-  reproduction, and distribution of the Work otherwise complies with
-  the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-  any Contribution intentionally submitted for inclusion in the Work
-  by You to the Licensor shall be under the terms and conditions of
-  this License, without any additional terms or conditions.
-  Notwithstanding the above, nothing herein shall supersede or modify
-  the terms of any separate license agreement you may have executed
-  with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-  names, trademarks, service marks, or product names of the Licensor,
-  except as required for reasonable and customary use in describing the
-  origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-  agreed to in writing, Licensor provides the Work (and each
-  Contributor provides its Contributions) on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-  implied, including, without limitation, any warranties or conditions
-  of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-  PARTICULAR PURPOSE. You are solely responsible for determining the
-  appropriateness of using or redistributing the Work and assume any
-  risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-  whether in tort (including negligence), contract, or otherwise,
-  unless required by applicable law (such as deliberate and grossly
-  negligent acts) or agreed to in writing, shall any Contributor be
-  liable to You for damages, including any direct, indirect, special,
-  incidental, or consequential damages of any character arising as a
-  result of this License or out of the use or inability to use the
-  Work (including but not limited to damages for loss of goodwill,
-  work stoppage, computer failure or malfunction, or any and all
-  other commercial damages or losses), even if such Contributor
-  has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-  the Work or Derivative Works thereof, You may choose to offer,
-  and charge a fee for, acceptance of support, warranty, indemnity,
-  or other liability obligations and/or rights consistent with this
-  License. However, in accepting such obligations, You may act only
-  on Your own behalf and on Your sole responsibility, not on behalf
-  of any other Contributor, and only if You agree to indemnify,
-  defend, and hold each Contributor harmless for any liability
-  incurred by, or claims asserted against, such Contributor by reason
-  of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-  To apply the Apache License to your work, attach the following
-  boilerplate notice, with the fields enclosed by brackets "[]"
-  replaced with your own identifying information. (Don't include
-  the brackets!)  The text should be enclosed in the appropriate
-  comment syntax for the file format. We also recommend that a
-  file or class name and description of purpose be included on the
-  same "printed page" as the copyright notice for easier
-  identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.

+ 0 - 1
pioneer/packages/app-treasury/README.md

@@ -1 +0,0 @@
-# @polkadot/app-treasury

+ 0 - 18
pioneer/packages/app-treasury/package.json

@@ -1,18 +0,0 @@
-{
-  "name": "@polkadot/app-treasury",
-  "version": "0.37.0-beta.63",
-  "description": "A referendum & proposal app",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Keith Ingram <keith@parity.io>",
-  "maintainers": [
-    "Keith Ingram <keith@parity.io>",
-    "Jaco Greeff <jacogr@gmail.com>"
-  ],
-  "license": "Apache-2.0",
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/react-components": "^0.37.0-beta.63",
-    "@polkadot/react-query": "^0.37.0-beta.63"
-  }
-}

+ 0 - 115
pioneer/packages/app-treasury/src/Overview/Approve.tsx

@@ -1,115 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AccountId, BlockNumber } from '@polkadot/types/interfaces';
-import { ApiProps } from '@polkadot/react-api/types';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { Button, Dropdown } from '@polkadot/react-components';
-import { withMulti, withApi, withCalls } from '@polkadot/react-api';
-import TxModal, { TxModalProps, TxModalState } from '@polkadot/react-components/TxModal';
-
-import translate from '../translate';
-
-interface Props extends I18nProps, ApiProps, TxModalProps {
-  isApproved?: boolean;
-  proposalInfo?: React.ReactNode;
-  proposalId: string;
-  threshold: number;
-}
-
-interface State extends TxModalState {
-  isApproving: boolean;
-}
-
-class Approve extends TxModal<Props, State> {
-  public state: State = {
-    ...this.defaultState,
-    isApproving: false
-  };
-
-  private approveOptions = (): { text: string; value: boolean }[] => [
-    { text: this.props.t('Aye, I approve'), value: true },
-    { text: this.props.t('Nay, I do not approve'), value: false }
-  ]
-
-  protected headerText = (): string => this.props.t('Approve or reject proposal');
-
-  protected txMethod = (): string => 'council.propose';
-
-  protected txParams = (): [number, any] => {
-    const { api, proposalId, threshold } = this.props;
-    const { isApproving } = this.state;
-
-    const method = isApproving ? 'approveProposal' : 'rejectProposal';
-    const spendProposal = api.tx.treasury[method](proposalId);
-
-    return [threshold, spendProposal];
-  }
-
-  protected renderTrigger = (): React.ReactNode => {
-    const { api, t } = this.props;
-
-    // disable voting for 1.x (we only use elections here)
-    if (!api.query.elections) {
-      return null;
-    }
-
-    return (
-      <div className='ui--Row-buttons'>
-        <Button.Group>
-          <Button
-            isPrimary
-            label={t('Respond')}
-            icon='reply'
-            onClick={this.showModal}
-          />
-        </Button.Group>
-      </div>
-    );
-  }
-
-  protected renderPreContent = (): React.ReactNode => {
-    const { proposalInfo = null } = this.props;
-
-    if (!proposalInfo) {
-      return null;
-    }
-
-    return proposalInfo;
-  }
-
-  protected renderContent = (): React.ReactNode => {
-    const { t } = this.props;
-    const { isApproving } = this.state;
-
-    return (
-      <Dropdown
-        help={t('Propose a majority council motion to either approve or reject this spend proposal')}
-        label={t('proposed council action')}
-        options={this.approveOptions()}
-        onChange={this.onChangeApproving}
-        value={isApproving}
-      />
-    );
-  }
-
-  private onChangeApproving = (isApproving: boolean): void => {
-    this.setState({ isApproving });
-  }
-}
-
-export default withMulti(
-  Approve,
-  translate,
-  withApi,
-  withCalls(
-    ['query.elections.members', {
-      propName: 'threshold',
-      transform: (value: [AccountId, BlockNumber][]): number =>
-        1 + (value.length / 2)
-    }]
-  )
-);

+ 0 - 92
pioneer/packages/app-treasury/src/Overview/Proposal.tsx

@@ -1,92 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { TreasuryProposal as TreasuryProposalType } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-import { SubjectInfo } from '@polkadot/ui-keyring/observable/types';
-
-import React, { useEffect } from 'react';
-import styled from 'styled-components';
-import { Option } from '@polkadot/types';
-import { ActionItem, Icon, TreasuryProposal } from '@polkadot/react-components';
-import { withCalls, withMulti, withObservable } from '@polkadot/react-api';
-import keyring from '@polkadot/ui-keyring';
-
-import translate from '../translate';
-import Approve from './Approve';
-
-const Approved = styled.h3`
-  color: green;
-  margin: 0;
-`;
-
-interface Props extends I18nProps {
-  allAccounts?: SubjectInfo;
-  isApproved: boolean;
-  proposal?: TreasuryProposalType | null;
-  proposalId: string;
-  onPopulate: () => void;
-  onRespond: () => void;
-}
-
-function ProposalDisplay ({ allAccounts, isApproved, onPopulate, onRespond, proposal, proposalId, t }: Props): React.ReactElement<Props> | null {
-  useEffect((): void => {
-    onPopulate();
-  }, [proposal]);
-
-  if (!proposal) {
-    return null;
-  }
-
-  const hasAccounts = allAccounts && Object.keys(allAccounts).length !== 0;
-
-  return (
-    <ActionItem
-      accessory={
-        isApproved
-          ? (
-            <Approved>
-              <Icon name='check' />
-              {'  '}
-              {t('Approved')}
-            </Approved>
-          )
-          : hasAccounts
-            ? (
-              <Approve
-                proposalInfo={
-                  <>
-                    <h3>Proposal #{proposalId}</h3>
-                    <details>
-                      <TreasuryProposal proposal={proposal} />
-                    </details>
-                    <br />
-                  </>
-                }
-                proposalId={proposalId}
-                onSuccess={onRespond}
-              />
-            )
-            : null
-      }
-      idNumber={proposalId}
-    >
-      <TreasuryProposal proposal={proposal} />
-    </ActionItem>
-  );
-}
-
-export default withMulti(
-  ProposalDisplay,
-  translate,
-  withCalls<Props>(
-    ['query.treasury.proposals', {
-      paramName: 'proposalId',
-      propName: 'proposal',
-      transform: (value: Option<TreasuryProposalType>): TreasuryProposalType | null =>
-        value.unwrapOr(null)
-    }]
-  ),
-  withObservable(keyring.accounts.subject, { propName: 'allAccounts' })
-);

+ 0 - 89
pioneer/packages/app-treasury/src/Overview/Proposals.tsx

@@ -1,89 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { ProposalIndex } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React, { useEffect, useState } from 'react';
-import { RouteComponentProps } from 'react-router';
-import { withRouter } from 'react-router-dom';
-import { withCalls, withMulti } from '@polkadot/react-api';
-import { Column } from '@polkadot/react-components';
-
-import Proposal from './Proposal';
-import translate from '../translate';
-
-interface Props extends I18nProps, RouteComponentProps<{}> {
-  isApprovals?: boolean;
-  treasury_approvals?: BN[];
-  treasury_proposalCount?: BN;
-}
-
-function ProposalsBase ({ history, isApprovals = false, treasury_approvals, treasury_proposalCount, t }: Props): React.ReactElement<Props> {
-  const [isEmpty, setIsEmpty] = useState(true);
-  const [proposalIndices, setProposalIndices] = useState<BN[]>([]);
-
-  useEffect((): void => {
-    let proposalIndices: BN[] = [];
-
-    if (isApprovals) {
-      proposalIndices = treasury_approvals || [];
-    } else if (treasury_proposalCount && treasury_approvals) {
-      for (let i = 0; i < treasury_proposalCount.toNumber(); i++) {
-        if (!treasury_approvals.find((index): boolean => index.eqn(i))) {
-          proposalIndices.push(new BN(i));
-        }
-      }
-    }
-
-    setProposalIndices(proposalIndices);
-  }, [isApprovals, treasury_approvals, treasury_approvals]);
-
-  const _onRespond = (): void => {
-    history.push('/council/motions');
-  };
-  const _onPopulateProposal = (): void => {
-    isEmpty && setIsEmpty(false);
-  };
-
-  return (
-    <>
-      <Column
-        emptyText={isApprovals ? t('No approved proposals') : t('No pending proposals')}
-        headerText={isApprovals ? t('Approved') : t('Proposals')}
-        isEmpty={isEmpty}
-      >
-        {proposalIndices.map((proposalId): React.ReactNode => (
-          <Proposal
-            isApproved={isApprovals}
-            onPopulate={_onPopulateProposal}
-            onRespond={_onRespond}
-            proposalId={proposalId.toString()}
-            key={proposalId.toString()}
-          />
-        ))}
-      </Column>
-    </>
-  );
-}
-
-const Proposals = withMulti(
-  withRouter(ProposalsBase),
-  translate,
-  withCalls<Props>(
-    ['query.treasury.approvals', {
-      transform: (value: ProposalIndex[]): BN[] =>
-        value.map((proposalId): BN => new BN(proposalId))
-    }],
-    'query.treasury.proposalCount'
-  )
-);
-
-export default Proposals;
-
-export function Approvals (): React.ReactElement<{}> {
-  return <Proposals isApprovals />;
-}

+ 0 - 106
pioneer/packages/app-treasury/src/Overview/Propose.tsx

@@ -1,106 +0,0 @@
-// Copyright 2017-2019 @polkadot/ui-staking authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import BN from 'bn.js';
-import React from 'react';
-
-import { Button, InputAddress, InputBalance } from '@polkadot/react-components';
-import TxModal, { TxModalState, TxModalProps as Props } from '@polkadot/react-components/TxModal';
-
-import translate from '../translate';
-
-interface State extends TxModalState {
-  beneficiary?: string | null;
-  value: BN;
-}
-
-class Propose extends TxModal<Props, State> {
-  public state: State = {
-    ...this.defaultState,
-    value: new BN(0)
-  };
-
-  protected headerText = (): string => this.props.t('Submit a spend proposal');
-
-  protected txMethod = (): string => 'treasury.proposeSpend';
-
-  protected txParams = (): [BN, string | null | undefined] => {
-    const { beneficiary, value } = this.state;
-
-    return [value, beneficiary];
-  }
-
-  protected isDisabled = (): boolean => {
-    const { accountId, beneficiary, value } = this.state;
-    const hasValue = !!value && value.gtn(0);
-    const hasBeneficiary = !!beneficiary;
-
-    return !accountId || !hasValue || !hasBeneficiary;
-  }
-
-  protected renderTrigger = (): React.ReactNode => {
-    const { t } = this.props;
-
-    return (
-      <Button.Group>
-        <Button
-          isPrimary
-          label={t('Submit a spend proposal')}
-          icon='add'
-          onClick={this.showModal}
-        />
-      </Button.Group>
-    );
-  }
-
-  protected renderContent = (): React.ReactNode => {
-    const { t } = this.props;
-    const { value } = this.state;
-    const hasValue = !!value && value.gtn(0);
-
-    return (
-      <>
-        <InputAddress
-          className='medium'
-          label={t('beneficiary')}
-          help={t('The account to which the proposed balance will be transferred if approved')}
-          type='allPlus'
-          onChange={this.onChangeBeneficiary}
-        />
-        <InputBalance
-          className='medium'
-          isError={!hasValue}
-          help={t('The amount that will be allocated from the treasury pot')}
-          label={t('value')}
-          onChange={this.onChangeValue}
-          onEnter={this.sendTx}
-        />
-      </>
-    );
-  }
-
-  private nextState (newState: Partial<State>): void {
-    this.setState(
-      (prevState: State): Pick<State, never> => {
-        const { accountId = prevState.accountId, beneficiary = prevState.beneficiary, value = prevState.value } = newState;
-
-        return {
-          accountId,
-          beneficiary,
-          value
-        };
-      }
-    );
-  }
-
-  private onChangeBeneficiary = (beneficiary: string | null): void => {
-    this.nextState({ beneficiary });
-  }
-
-  private onChangeValue = (value?: BN): void => {
-    this.nextState({ value });
-  }
-}
-
-export default translate(Propose);

+ 0 - 54
pioneer/packages/app-treasury/src/Overview/Summary.tsx

@@ -1,54 +0,0 @@
-/* eslint-disable @typescript-eslint/camelcase */
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { SummaryBox, CardSummary } from '@polkadot/react-components';
-import { withCalls } from '@polkadot/react-api';
-import { formatBalance, formatNumber } from '@polkadot/util';
-
-import translate from '../translate';
-
-interface Props extends I18nProps {
-  treasury_proposalCount?: BN;
-  treasury_approvals?: BN[];
-  treasury_pot?: BN;
-}
-
-function Summary ({ treasury_proposalCount, treasury_approvals, treasury_pot, t }: Props): React.ReactElement<Props> {
-  const value = treasury_pot && treasury_pot.gtn(0)
-    ? treasury_pot.toString()
-    : null;
-
-  return (
-    <SummaryBox>
-      <section>
-        <CardSummary label={t('proposals')}>
-          {formatNumber(treasury_proposalCount)}
-        </CardSummary>
-        <CardSummary label={t('approved')}>
-          {treasury_approvals ? treasury_approvals.length : '0'}
-        </CardSummary>
-      </section>
-      <section>
-        {value && (
-          <CardSummary label={t('pot')}>
-            {formatBalance(value, false)}{formatBalance.calcSi(value).value}
-          </CardSummary>
-        )}
-      </section>
-    </SummaryBox>
-  );
-}
-
-export default translate(
-  withCalls<Props>(
-    'query.treasury.proposalCount',
-    'query.treasury.approvals',
-    'query.treasury.pot'
-  )(Summary)
-);

+ 0 - 27
pioneer/packages/app-treasury/src/Overview/index.tsx

@@ -1,27 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AppProps, BareProps, I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { Columar } from '@polkadot/react-components';
-
-import Summary from './Summary';
-import Proposals, { Approvals } from './Proposals';
-import Propose from './Propose';
-
-interface Props extends AppProps, BareProps, I18nProps {}
-
-export default function Overview (): React.ReactElement<Props> {
-  return (
-    <>
-      <Summary />
-      <Propose />
-      <Columar>
-        <Proposals />
-        <Approvals />
-      </Columar>
-    </>
-  );
-}

+ 0 - 212
pioneer/packages/app-treasury/src/Settings.tsx

@@ -1,212 +0,0 @@
-// Copyright 2017-2019 @polkadot/ui-staking authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { BlockNumber, BalanceOf, Permill } from '@polkadot/types/interfaces';
-import { I18nProps } from '@polkadot/react-components/types';
-import { ApiProps } from '@polkadot/react-api/types';
-
-import BN from 'bn.js';
-import React from 'react';
-import { RouteComponentProps } from 'react-router';
-
-import { Button, InputAddress, InputBalance, InputNumber, TxButton, TxComponent } from '@polkadot/react-components';
-import { withCalls, withMulti } from '@polkadot/react-api';
-
-import translate from './translate';
-
-interface Props extends I18nProps, ApiProps, RouteComponentProps {
-  basePath: string;
-  proposalBond: Permill;
-  proposalBondMinimum: BalanceOf;
-  spendPeriod: BlockNumber;
-  burn: Permill;
-  pot: BalanceOf;
-}
-
-interface State {
-  accountId?: string | null;
-  proposalBond?: BN;
-  proposalBondMinimum?: BN;
-  spendPeriod?: BN;
-  burn?: BN;
-  pot?: BN;
-}
-
-class Settings extends TxComponent<Props, State> {
-  public state: State = {};
-
-  public static getDerivedStateFromProps ({ proposalBond, proposalBondMinimum, spendPeriod, burn, pot }: Props, state: State): State {
-    const newState: State = {};
-
-    if (proposalBond && !state.proposalBond) {
-      newState.proposalBond = new BN(proposalBond);
-    }
-
-    if (proposalBondMinimum && !state.proposalBondMinimum) {
-      newState.proposalBondMinimum = new BN(proposalBondMinimum);
-    }
-
-    if (spendPeriod && !state.spendPeriod) {
-      newState.spendPeriod = new BN(spendPeriod);
-    }
-
-    if (burn && !state.burn) {
-      newState.burn = new BN(burn);
-    }
-
-    if (pot && !state.pot) {
-      newState.pot = new BN(pot);
-    }
-
-    return newState;
-  }
-
-  public render (): React.ReactNode {
-    const { t } = this.props;
-    const { accountId, proposalBond, proposalBondMinimum, spendPeriod, burn, pot } = this.state;
-
-    const hasConfig = !!proposalBond && !!proposalBondMinimum && !!spendPeriod && !!burn;
-    const hasPot = !!pot;
-
-    return (
-      <>
-        <section>
-          <InputAddress
-            className='medium'
-            label={t('using my account')}
-            help={t('The account used to change your settings')}
-            type='account'
-            onChange={this.onChangeAccount}
-          />
-        </section>
-        {hasConfig && proposalBond && proposalBondMinimum && (
-          <section>
-            <h1>
-              {t('configuration')}
-            </h1>
-            <InputBalance
-              className='medium'
-              value={proposalBond}
-              help={t('Proposal bond')}
-              label={t('proposal bond')}
-              onChange={this.onChangeProposalBond}
-            />
-            <InputBalance
-              className='medium'
-              value={proposalBondMinimum}
-              help={t('Proposal bond minimum')}
-              label={t('proposal bond minimum')}
-              onChange={this.onChangeProposalBondMinimum}
-            />
-            <InputNumber
-              className='medium'
-              help={t('Spend period')}
-              label={t('spend period')}
-              onChange={this.onChangeSpendPeriod}
-              value={spendPeriod}
-            />
-            <InputNumber
-              className='medium'
-              help={t('Burn percentage')}
-              label={t('burn percentage')}
-              onChange={this.onChangeBurn}
-              value={burn}
-            />
-            <Button.Group>
-              <TxButton
-                accountId={accountId}
-                label={t('Submit')}
-                icon='sign-in'
-                tx='treasury.configure'
-                params={[
-                  proposalBond.toString(),
-                  proposalBondMinimum.toString(),
-                  spendPeriod,
-                  burn
-                ]}
-              />
-            </Button.Group>
-          </section>
-        )}
-        {hasPot && (
-          <section>
-            <h1>
-              {t('pot')}
-            </h1>
-            <InputBalance
-              className='medium'
-              defaultValue={pot}
-              help={t('Pot')}
-              label={t('pot size')}
-              onChange={this.onChangePot}
-            />
-            <Button.Group>
-              <TxButton
-                accountId={accountId}
-                label={t('Submit')}
-                icon='sign-in'
-                tx='treasury.setPot'
-                params={[pot]}
-              />
-            </Button.Group>
-          </section>
-        )}
-      </>
-    );
-  }
-
-  private nextState (newState: State): void {
-    this.setState(
-      (prevState: State): State => {
-        const { accountId = prevState.accountId, proposalBond = prevState.proposalBond, proposalBondMinimum = prevState.proposalBondMinimum, spendPeriod = prevState.spendPeriod, burn = prevState.burn, pot = prevState.pot } = newState;
-        // const isValid = !!beneficiary && !!value && value.gt(new BN(0)) && !!accountId && accountId.length > 0;
-
-        return {
-          accountId,
-          proposalBond,
-          proposalBondMinimum,
-          spendPeriod,
-          burn,
-          pot
-        };
-      }
-    );
-  }
-
-  private onChangeAccount = (accountId: string | null): void => {
-    this.nextState({ accountId });
-  }
-
-  private onChangeProposalBond = (proposalBond?: BN): void => {
-    this.nextState({ proposalBond });
-  }
-
-  private onChangeProposalBondMinimum = (proposalBondMinimum?: BN): void => {
-    this.nextState({ proposalBondMinimum });
-  }
-
-  private onChangeSpendPeriod = (spendPeriod?: BN): void => {
-    this.nextState({ spendPeriod });
-  }
-
-  private onChangeBurn = (burn?: BN): void => {
-    this.nextState({ burn });
-  }
-
-  private onChangePot = (pot?: BN): void => {
-    this.nextState({ pot });
-  }
-}
-
-export default withMulti(
-  Settings,
-  translate,
-  withCalls<Props>(
-    ['consts.treasury.proposalBond', { fallbacks: ['query.treasury.proposalBond'], propName: 'proposalBond' }],
-    ['consts.treasury.proposalBondMinimum', { fallbacks: ['query.treasury.proposalBondMinimum'], propName: 'proposalBondMinimum' }],
-    ['consts.treasury.spendPeriod', { fallbacks: ['query.treasury.spendPeriod'], propName: 'spendPeriod' }],
-    ['consts.treasury.burn', { fallbacks: ['query.treasury.burn'], propName: 'burn' }],
-    ['query.treasury.pot', { propName: 'pot' }]
-  )
-);

+ 0 - 47
pioneer/packages/app-treasury/src/index.tsx

@@ -1,47 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-democracy authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AppProps, BareProps, I18nProps } from '@polkadot/react-components/types';
-
-import React from 'react';
-import { Route, Switch } from 'react-router';
-import { HelpOverlay, Tabs } from '@polkadot/react-components';
-
-import basicMd from './md/basic.md';
-import Overview from './Overview';
-// import Settings from './Settings';
-
-import translate from './translate';
-
-interface Props extends AppProps, BareProps, I18nProps {}
-
-function App ({ basePath, t }: Props): React.ReactElement<Props> {
-  return (
-    <main className='treasury--App'>
-      <HelpOverlay md={basicMd} />
-      <header>
-        <Tabs
-          basePath={basePath}
-          items={[
-            {
-              isRoot: true,
-              name: 'overview',
-              text: t('Treasury overview')
-            }
-            // {
-            //   name: 'settings',
-            //   text: t('Edit settings')
-            // }
-          ]}
-        />
-      </header>
-      <Switch>
-        {/* <Route path={`${basePath}/settings`} component={Settings} /> */}
-        <Route component={Overview} />
-      </Switch>
-    </main>
-  );
-}
-
-export default translate(App);

+ 0 - 3
pioneer/packages/app-treasury/src/md/basic.md

@@ -1,3 +0,0 @@
-# Treasury
-
-This application lets you view and vote to approve or deny treasury spend proposals.

+ 0 - 7
pioneer/packages/app-treasury/src/translate.ts

@@ -1,7 +0,0 @@
-// Copyright 2017-2019 @polkadot/app-explorer authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { withTranslation } from 'react-i18next';
-
-export default withTranslation(['app-treasury']);

+ 0 - 201
pioneer/packages/apps-routing/LICENSE

@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                    http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-  "License" shall mean the terms and conditions for use, reproduction,
-  and distribution as defined by Sections 1 through 9 of this document.
-
-  "Licensor" shall mean the copyright owner or entity authorized by
-  the copyright owner that is granting the License.
-
-  "Legal Entity" shall mean the union of the acting entity and all
-  other entities that control, are controlled by, or are under common
-  control with that entity. For the purposes of this definition,
-  "control" means (i) the power, direct or indirect, to cause the
-  direction or management of such entity, whether by contract or
-  otherwise, or (ii) ownership of fifty percent (50%) or more of the
-  outstanding shares, or (iii) beneficial ownership of such entity.
-
-  "You" (or "Your") shall mean an individual or Legal Entity
-  exercising permissions granted by this License.
-
-  "Source" form shall mean the preferred form for making modifications,
-  including but not limited to software source code, documentation
-  source, and configuration files.
-
-  "Object" form shall mean any form resulting from mechanical
-  transformation or translation of a Source form, including but
-  not limited to compiled object code, generated documentation,
-  and conversions to other media types.
-
-  "Work" shall mean the work of authorship, whether in Source or
-  Object form, made available under the License, as indicated by a
-  copyright notice that is included in or attached to the work
-  (an example is provided in the Appendix below).
-
-  "Derivative Works" shall mean any work, whether in Source or Object
-  form, that is based on (or derived from) the Work and for which the
-  editorial revisions, annotations, elaborations, or other modifications
-  represent, as a whole, an original work of authorship. For the purposes
-  of this License, Derivative Works shall not include works that remain
-  separable from, or merely link (or bind by name) to the interfaces of,
-  the Work and Derivative Works thereof.
-
-  "Contribution" shall mean any work of authorship, including
-  the original version of the Work and any modifications or additions
-  to that Work or Derivative Works thereof, that is intentionally
-  submitted to Licensor for inclusion in the Work by the copyright owner
-  or by an individual or Legal Entity authorized to submit on behalf of
-  the copyright owner. For the purposes of this definition, "submitted"
-  means any form of electronic, verbal, or written communication sent
-  to the Licensor or its representatives, including but not limited to
-  communication on electronic mailing lists, source code control systems,
-  and issue tracking systems that are managed by, or on behalf of, the
-  Licensor for the purpose of discussing and improving the Work, but
-  excluding communication that is conspicuously marked or otherwise
-  designated in writing by the copyright owner as "Not a Contribution."
-
-  "Contributor" shall mean Licensor and any individual or Legal Entity
-  on behalf of whom a Contribution has been received by Licensor and
-  subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  copyright license to reproduce, prepare Derivative Works of,
-  publicly display, publicly perform, sublicense, and distribute the
-  Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  (except as stated in this section) patent license to make, have made,
-  use, offer to sell, sell, import, and otherwise transfer the Work,
-  where such license applies only to those patent claims licensable
-  by such Contributor that are necessarily infringed by their
-  Contribution(s) alone or by combination of their Contribution(s)
-  with the Work to which such Contribution(s) was submitted. If You
-  institute patent litigation against any entity (including a
-  cross-claim or counterclaim in a lawsuit) alleging that the Work
-  or a Contribution incorporated within the Work constitutes direct
-  or contributory patent infringement, then any patent licenses
-  granted to You under this License for that Work shall terminate
-  as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-  Work or Derivative Works thereof in any medium, with or without
-  modifications, and in Source or Object form, provided that You
-  meet the following conditions:
-
-  (a) You must give any other recipients of the Work or
-      Derivative Works a copy of this License; and
-
-  (b) You must cause any modified files to carry prominent notices
-      stating that You changed the files; and
-
-  (c) You must retain, in the Source form of any Derivative Works
-      that You distribute, all copyright, patent, trademark, and
-      attribution notices from the Source form of the Work,
-      excluding those notices that do not pertain to any part of
-      the Derivative Works; and
-
-  (d) If the Work includes a "NOTICE" text file as part of its
-      distribution, then any Derivative Works that You distribute must
-      include a readable copy of the attribution notices contained
-      within such NOTICE file, excluding those notices that do not
-      pertain to any part of the Derivative Works, in at least one
-      of the following places: within a NOTICE text file distributed
-      as part of the Derivative Works; within the Source form or
-      documentation, if provided along with the Derivative Works; or,
-      within a display generated by the Derivative Works, if and
-      wherever such third-party notices normally appear. The contents
-      of the NOTICE file are for informational purposes only and
-      do not modify the License. You may add Your own attribution
-      notices within Derivative Works that You distribute, alongside
-      or as an addendum to the NOTICE text from the Work, provided
-      that such additional attribution notices cannot be construed
-      as modifying the License.
-
-  You may add Your own copyright statement to Your modifications and
-  may provide additional or different license terms and conditions
-  for use, reproduction, or distribution of Your modifications, or
-  for any such Derivative Works as a whole, provided Your use,
-  reproduction, and distribution of the Work otherwise complies with
-  the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-  any Contribution intentionally submitted for inclusion in the Work
-  by You to the Licensor shall be under the terms and conditions of
-  this License, without any additional terms or conditions.
-  Notwithstanding the above, nothing herein shall supersede or modify
-  the terms of any separate license agreement you may have executed
-  with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-  names, trademarks, service marks, or product names of the Licensor,
-  except as required for reasonable and customary use in describing the
-  origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-  agreed to in writing, Licensor provides the Work (and each
-  Contributor provides its Contributions) on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-  implied, including, without limitation, any warranties or conditions
-  of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-  PARTICULAR PURPOSE. You are solely responsible for determining the
-  appropriateness of using or redistributing the Work and assume any
-  risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-  whether in tort (including negligence), contract, or otherwise,
-  unless required by applicable law (such as deliberate and grossly
-  negligent acts) or agreed to in writing, shall any Contributor be
-  liable to You for damages, including any direct, indirect, special,
-  incidental, or consequential damages of any character arising as a
-  result of this License or out of the use or inability to use the
-  Work (including but not limited to damages for loss of goodwill,
-  work stoppage, computer failure or malfunction, or any and all
-  other commercial damages or losses), even if such Contributor
-  has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-  the Work or Derivative Works thereof, You may choose to offer,
-  and charge a fee for, acceptance of support, warranty, indemnity,
-  or other liability obligations and/or rights consistent with this
-  License. However, in accepting such obligations, You may act only
-  on Your own behalf and on Your sole responsibility, not on behalf
-  of any other Contributor, and only if You agree to indemnify,
-  defend, and hold each Contributor harmless for any liability
-  incurred by, or claims asserted against, such Contributor by reason
-  of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-  To apply the Apache License to your work, attach the following
-  boilerplate notice, with the fields enclosed by brackets "[]"
-  replaced with your own identifying information. (Don't include
-  the brackets!)  The text should be enclosed in the appropriate
-  comment syntax for the file format. We also recommend that a
-  file or class name and description of purpose be included on the
-  same "printed page" as the copyright notice for easier
-  identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.

+ 0 - 25
pioneer/packages/apps-routing/src/123code.ts

@@ -1,25 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import Template from '@polkadot/app-123code';
-
-export default ([
-  {
-    Component: Template,
-    display: {
-      isHidden: true,
-      needsAccounts: true,
-      needsApi: [
-        'tx.balances.transfer'
-      ]
-    },
-    i18n: {
-      defaultValue: 'Template'
-    },
-    icon: 'th',
-    name: '123code'
-  }
-] as Routes);

+ 0 - 23
pioneer/packages/apps-routing/src/claims.ts

@@ -1,23 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import Claims from '@polkadot/app-claims';
-
-export default ([
-  {
-    Component: Claims,
-    display: {
-      needsApi: [
-        'query.claims.claims'
-      ]
-    },
-    i18n: {
-      defaultValue: 'Claim Tokens'
-    },
-    icon: 'star',
-    name: 'claims'
-  }
-] as Routes);

+ 0 - 27
pioneer/packages/apps-routing/src/contracts.ts

@@ -1,27 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import Contracts from '@polkadot/app-contracts';
-
-export default ([
-  {
-    Component: Contracts,
-    display: {
-      needsAccounts: true,
-      needsApi: [
-        [
-          'tx.contracts.call', // substrate 2.x
-          'tx.contract.call' // substrate 1.x
-        ]
-      ]
-    },
-    i18n: {
-      defaultValue: 'Contracts'
-    },
-    icon: 'compress',
-    name: 'contracts'
-  }
-] as Routes);

+ 0 - 26
pioneer/packages/apps-routing/src/council.ts

@@ -1,26 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import Council from '@polkadot/app-council';
-
-export default ([
-  {
-    Component: Council,
-    display: {
-      needsApi: [
-        [
-          'query.electionsPhragmen.candidates',
-          'query.elections.candidates'
-        ]
-      ]
-    },
-    i18n: {
-      defaultValue: 'Council'
-    },
-    icon: 'building',
-    name: 'council'
-  }
-] as Routes);

+ 0 - 21
pioneer/packages/apps-routing/src/dashboard.ts

@@ -1,21 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import Dashboard from '@polkadot/app-dashboard';
-
-export default ([
-  {
-    Component: Dashboard,
-    display: {
-      isHidden: true
-    },
-    i18n: {
-      defaultValue: 'Dashboard'
-    },
-    icon: 'th',
-    name: 'dashboard'
-  }
-] as Routes);

+ 0 - 23
pioneer/packages/apps-routing/src/democracy.ts

@@ -1,23 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import Democracy from '@polkadot/app-democracy';
-
-export default ([
-  {
-    Component: Democracy,
-    display: {
-      needsApi: [
-        'query.democracy.nextTally'
-      ]
-    },
-    i18n: {
-      defaultValue: 'Democracy'
-    },
-    icon: 'calendar check',
-    name: 'democracy'
-  }
-] as Routes);

+ 0 - 25
pioneer/packages/apps-routing/src/generic-asset.ts

@@ -1,25 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import GenericAsset from '@polkadot/app-generic-asset';
-
-export default ([
-  {
-    Component: GenericAsset,
-    display: {
-      isHidden: false,
-      needsAccounts: true,
-      needsApi: [
-        'tx.genericAsset.transfer'
-      ]
-    },
-    i18n: {
-      defaultValue: 'Generic Asset'
-    },
-    icon: 'cubes',
-    name: 'generic-asset'
-  }
-] as Routes);

+ 0 - 19
pioneer/packages/apps-routing/src/joy-help.ts

@@ -1,19 +0,0 @@
-import { Routes } from './types';
-
-import Help from '@polkadot/joy-help/index';
-
-export default ([
-  {
-    Component: Help,
-    display: {
-      needsApi: [
-        'query.memo.memo'
-      ]
-    },
-    i18n: {
-      defaultValue: 'Help and News'
-    },
-    icon: 'question circle outline',
-    name: 'help'
-  }
-] as Routes);

+ 0 - 23
pioneer/packages/apps-routing/src/parachains.ts

@@ -1,23 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import Parachains from '@polkadot/app-parachains';
-
-export default ([
-  {
-    Component: Parachains,
-    display: {
-      needsApi: [
-        'query.parachains.code'
-      ]
-    },
-    i18n: {
-      defaultValue: 'Parachains'
-    },
-    icon: 'chain',
-    name: 'parachains'
-  }
-] as Routes);

+ 0 - 24
pioneer/packages/apps-routing/src/treasury.ts

@@ -1,24 +0,0 @@
-// Copyright 2017-2019 @polkadot/apps-routing authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { Routes } from './types';
-
-import Treasury from '@polkadot/app-treasury';
-
-export default ([
-  {
-    Component: Treasury,
-    display: {
-      needsAccounts: true,
-      needsApi: [
-        'tx.treasury.proposeSpend'
-      ]
-    },
-    i18n: {
-      defaultValue: 'Treasury'
-    },
-    icon: 'gem',
-    name: 'treasury'
-  }
-] as Routes);

+ 0 - 201
pioneer/packages/apps/LICENSE

@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                    http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-  "License" shall mean the terms and conditions for use, reproduction,
-  and distribution as defined by Sections 1 through 9 of this document.
-
-  "Licensor" shall mean the copyright owner or entity authorized by
-  the copyright owner that is granting the License.
-
-  "Legal Entity" shall mean the union of the acting entity and all
-  other entities that control, are controlled by, or are under common
-  control with that entity. For the purposes of this definition,
-  "control" means (i) the power, direct or indirect, to cause the
-  direction or management of such entity, whether by contract or
-  otherwise, or (ii) ownership of fifty percent (50%) or more of the
-  outstanding shares, or (iii) beneficial ownership of such entity.
-
-  "You" (or "Your") shall mean an individual or Legal Entity
-  exercising permissions granted by this License.
-
-  "Source" form shall mean the preferred form for making modifications,
-  including but not limited to software source code, documentation
-  source, and configuration files.
-
-  "Object" form shall mean any form resulting from mechanical
-  transformation or translation of a Source form, including but
-  not limited to compiled object code, generated documentation,
-  and conversions to other media types.
-
-  "Work" shall mean the work of authorship, whether in Source or
-  Object form, made available under the License, as indicated by a
-  copyright notice that is included in or attached to the work
-  (an example is provided in the Appendix below).
-
-  "Derivative Works" shall mean any work, whether in Source or Object
-  form, that is based on (or derived from) the Work and for which the
-  editorial revisions, annotations, elaborations, or other modifications
-  represent, as a whole, an original work of authorship. For the purposes
-  of this License, Derivative Works shall not include works that remain
-  separable from, or merely link (or bind by name) to the interfaces of,
-  the Work and Derivative Works thereof.
-
-  "Contribution" shall mean any work of authorship, including
-  the original version of the Work and any modifications or additions
-  to that Work or Derivative Works thereof, that is intentionally
-  submitted to Licensor for inclusion in the Work by the copyright owner
-  or by an individual or Legal Entity authorized to submit on behalf of
-  the copyright owner. For the purposes of this definition, "submitted"
-  means any form of electronic, verbal, or written communication sent
-  to the Licensor or its representatives, including but not limited to
-  communication on electronic mailing lists, source code control systems,
-  and issue tracking systems that are managed by, or on behalf of, the
-  Licensor for the purpose of discussing and improving the Work, but
-  excluding communication that is conspicuously marked or otherwise
-  designated in writing by the copyright owner as "Not a Contribution."
-
-  "Contributor" shall mean Licensor and any individual or Legal Entity
-  on behalf of whom a Contribution has been received by Licensor and
-  subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  copyright license to reproduce, prepare Derivative Works of,
-  publicly display, publicly perform, sublicense, and distribute the
-  Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-  this License, each Contributor hereby grants to You a perpetual,
-  worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-  (except as stated in this section) patent license to make, have made,
-  use, offer to sell, sell, import, and otherwise transfer the Work,
-  where such license applies only to those patent claims licensable
-  by such Contributor that are necessarily infringed by their
-  Contribution(s) alone or by combination of their Contribution(s)
-  with the Work to which such Contribution(s) was submitted. If You
-  institute patent litigation against any entity (including a
-  cross-claim or counterclaim in a lawsuit) alleging that the Work
-  or a Contribution incorporated within the Work constitutes direct
-  or contributory patent infringement, then any patent licenses
-  granted to You under this License for that Work shall terminate
-  as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-  Work or Derivative Works thereof in any medium, with or without
-  modifications, and in Source or Object form, provided that You
-  meet the following conditions:
-
-  (a) You must give any other recipients of the Work or
-      Derivative Works a copy of this License; and
-
-  (b) You must cause any modified files to carry prominent notices
-      stating that You changed the files; and
-
-  (c) You must retain, in the Source form of any Derivative Works
-      that You distribute, all copyright, patent, trademark, and
-      attribution notices from the Source form of the Work,
-      excluding those notices that do not pertain to any part of
-      the Derivative Works; and
-
-  (d) If the Work includes a "NOTICE" text file as part of its
-      distribution, then any Derivative Works that You distribute must
-      include a readable copy of the attribution notices contained
-      within such NOTICE file, excluding those notices that do not
-      pertain to any part of the Derivative Works, in at least one
-      of the following places: within a NOTICE text file distributed
-      as part of the Derivative Works; within the Source form or
-      documentation, if provided along with the Derivative Works; or,
-      within a display generated by the Derivative Works, if and
-      wherever such third-party notices normally appear. The contents
-      of the NOTICE file are for informational purposes only and
-      do not modify the License. You may add Your own attribution
-      notices within Derivative Works that You distribute, alongside
-      or as an addendum to the NOTICE text from the Work, provided
-      that such additional attribution notices cannot be construed
-      as modifying the License.
-
-  You may add Your own copyright statement to Your modifications and
-  may provide additional or different license terms and conditions
-  for use, reproduction, or distribution of Your modifications, or
-  for any such Derivative Works as a whole, provided Your use,
-  reproduction, and distribution of the Work otherwise complies with
-  the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-  any Contribution intentionally submitted for inclusion in the Work
-  by You to the Licensor shall be under the terms and conditions of
-  this License, without any additional terms or conditions.
-  Notwithstanding the above, nothing herein shall supersede or modify
-  the terms of any separate license agreement you may have executed
-  with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-  names, trademarks, service marks, or product names of the Licensor,
-  except as required for reasonable and customary use in describing the
-  origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-  agreed to in writing, Licensor provides the Work (and each
-  Contributor provides its Contributions) on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-  implied, including, without limitation, any warranties or conditions
-  of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-  PARTICULAR PURPOSE. You are solely responsible for determining the
-  appropriateness of using or redistributing the Work and assume any
-  risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-  whether in tort (including negligence), contract, or otherwise,
-  unless required by applicable law (such as deliberate and grossly
-  negligent acts) or agreed to in writing, shall any Contributor be
-  liable to You for damages, including any direct, indirect, special,
-  incidental, or consequential damages of any character arising as a
-  result of this License or out of the use or inability to use the
-  Work (including but not limited to damages for loss of goodwill,
-  work stoppage, computer failure or malfunction, or any and all
-  other commercial damages or losses), even if such Contributor
-  has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-  the Work or Derivative Works thereof, You may choose to offer,
-  and charge a fee for, acceptance of support, warranty, indemnity,
-  or other liability obligations and/or rights consistent with this
-  License. However, in accepting such obligations, You may act only
-  on Your own behalf and on Your sole responsibility, not on behalf
-  of any other Contributor, and only if You agree to indemnify,
-  defend, and hold each Contributor harmless for any liability
-  incurred by, or claims asserted against, such Contributor by reason
-  of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-  To apply the Apache License to your work, attach the following
-  boilerplate notice, with the fields enclosed by brackets "[]"
-  replaced with your own identifying information. (Don't include
-  the brackets!)  The text should be enclosed in the appropriate
-  comment syntax for the file format. We also recommend that a
-  file or class name and description of purpose be included on the
-  same "printed page" as the copyright notice for easier
-  identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.

+ 0 - 3
pioneer/packages/joy-help/README.md

@@ -1,3 +0,0 @@
-# Help module for Joystream node
-
-Here you can find a help and the latest news related to Joystream community and software.

+ 0 - 15
pioneer/packages/joy-help/package.json

@@ -1,15 +0,0 @@
-{
-  "name": "@polkadot/joy-help",
-  "version": "0.1.1",
-  "description": "Help module for Joystream node",
-  "main": "index.js",
-  "scripts": {},
-  "author": "Joystream contributors",
-  "maintainers": [],
-  "dependencies": {
-    "@babel/runtime": "^7.7.1",
-    "@polkadot/react-components": "0.37.0-beta.63",
-    "@polkadot/react-query": "0.37.0-beta.63",
-    "@polkadot/joy-utils": "^0.1.1"
-  }
-}

+ 0 - 53
pioneer/packages/joy-help/src/Help.tsx

@@ -1,53 +0,0 @@
-
-import React from 'react';
-import { Grid } from 'semantic-ui-react';
-
-import { I18nProps } from '@polkadot/react-components/types';
-
-// our app-specific styles
-import './index.css';
-
-// local imports and components
-import translate from './translate';
-import MemoView from '@polkadot/joy-utils/memo/MemoView';
-import { Link } from 'react-router-dom';
-
-const validatorsAccId = '5EoFVV4HrmyxF8xWNYL7rYJPEcDrW8kv3bHkb1ueGchBcZ1k';
-const electionsAccId = '5CFW8VgJiM4jKSwskNzVVYfytcPcU7ppRtGKVBLgwpddTSjK';
-const bugsAccId = '5H4RgAjmTBoNMrysDXJpac5KRURFnNYBHKC2FNmGoLXvv1LK';
-const newsAccId = '5FvjTdBbyk7QqHcGHbwtc1RLiw6SUkzegdCWbppdtb63tmzi';
-
-type Props = I18nProps & {};
-
-const renderMemo = (accId: string) => {
-  return <>
-    <MemoView accountId={accId} preview={false} />
-    <em className='AccountId'>
-      <span>Memo of account </span>
-      <Link to={`/addressbook/memo/${accId}`}>{accId}</Link>
-    </em>
-  </>;
-};
-
-export const Component = (_props: Props) => {
-  return (<>
-    <div style={{ marginBottom: '1rem' }}>
-      Visit our <a href='https://github.com/Joystream/helpdesk' target='_blank' rel="noopener noreferrer">helpdesk</a>{' '}
-      for instructions and guides to get started!
-    </div>
-    <Grid divided='vertically'>
-      <Grid.Row columns={2}>
-        <Grid.Column>{renderMemo(newsAccId)}</Grid.Column>
-        <Grid.Column>{renderMemo(validatorsAccId)}</Grid.Column>
-      </Grid.Row>
-      <Grid.Row columns={2}>
-        <Grid.Column>{renderMemo(electionsAccId)}</Grid.Column>
-        <Grid.Column>{renderMemo(bugsAccId)}</Grid.Column>
-      </Grid.Row>
-    </Grid>
-  </>);
-};
-
-export default translate(
-  Component
-);

Некоторые файлы не были показаны из-за большого количества измененных файлов