Bläddra i källkod

Merge branch 'iznik' into joystream-types-register-missing

Leszek Wiesner 4 år sedan
förälder
incheckning
d3e8bd9e43
100 ändrade filer med 669 tillägg och 4560 borttagningar
  1. 1 1
      cli/package.json
  2. 1 1
      devops/eslint-config/index.js
  3. 5 4
      devops/eslint-config/package.json
  4. 6 4
      package.json
  5. 2 1
      pioneer/.123trigger
  6. 2 0
      pioneer/.dockerignore
  7. 4 0
      pioneer/.env-example
  8. 13 0
      pioneer/.eslintignore
  9. 2 2
      pioneer/.eslintrc.js
  10. 4 1
      pioneer/.gitignore
  11. 7 0
      pioneer/.stylelintrc
  12. 370 16
      pioneer/CHANGELOG.md
  13. 22 0
      pioneer/I18N.md
  14. 11 10
      pioneer/README.md
  15. 5 4
      pioneer/babel.config.js
  16. 27 0
      pioneer/docker/nginx.conf
  17. 20 0
      pioneer/env.sh
  18. 51 67
      pioneer/i18next-scanner.config.js
  19. 18 9
      pioneer/jest.config.js
  20. 1 1
      pioneer/lerna.json
  21. 54 45
      pioneer/package.json
  22. 0 22
      pioneer/packages/app-123code/README.md
  23. 0 16
      pioneer/packages/app-123code/package.json
  24. 0 49
      pioneer/packages/app-123code/src/AccountSelector.tsx
  25. 0 28
      pioneer/packages/app-123code/src/Summary.tsx
  26. 0 65
      pioneer/packages/app-123code/src/SummaryBar.tsx
  27. 0 47
      pioneer/packages/app-123code/src/Transfer.tsx
  28. 0 38
      pioneer/packages/app-123code/src/index.tsx
  29. 0 7
      pioneer/packages/app-123code/src/translate.ts
  30. 0 17
      pioneer/packages/app-claims/package.json
  31. 0 107
      pioneer/packages/app-claims/src/Claim.tsx
  32. 0 259
      pioneer/packages/app-claims/src/index.tsx
  33. 0 8
      pioneer/packages/app-claims/src/secp256k1.d.ts
  34. 0 7
      pioneer/packages/app-claims/src/translate.ts
  35. 0 19
      pioneer/packages/app-claims/src/util.spec.ts
  36. 0 111
      pioneer/packages/app-claims/src/util.ts
  37. 0 17
      pioneer/packages/app-council/package.json
  38. 0 104
      pioneer/packages/app-council/src/Motions/Motion.tsx
  39. 0 147
      pioneer/packages/app-council/src/Motions/Propose.tsx
  40. 0 44
      pioneer/packages/app-council/src/Motions/index.tsx
  41. 0 34
      pioneer/packages/app-council/src/Overview/Candidate.tsx
  42. 0 33
      pioneer/packages/app-council/src/Overview/Member.tsx
  43. 0 85
      pioneer/packages/app-council/src/Overview/Members.tsx
  44. 0 51
      pioneer/packages/app-council/src/Overview/SubmitCandidacy.tsx
  45. 0 53
      pioneer/packages/app-council/src/Overview/Summary.tsx
  46. 0 303
      pioneer/packages/app-council/src/Overview/Vote.tsx
  47. 0 38
      pioneer/packages/app-council/src/Overview/VoteValue.tsx
  48. 0 38
      pioneer/packages/app-council/src/Overview/Voters.tsx
  49. 0 56
      pioneer/packages/app-council/src/Overview/index.tsx
  50. 0 17
      pioneer/packages/app-council/src/Overview/types.ts
  51. 0 44
      pioneer/packages/app-council/src/index.tsx
  52. 0 7
      pioneer/packages/app-council/src/translate.ts
  53. 0 22
      pioneer/packages/app-dashboard/README.md
  54. 0 17
      pioneer/packages/app-dashboard/package.json
  55. 0 39
      pioneer/packages/app-dashboard/src/Entry.tsx
  56. 0 13
      pioneer/packages/app-dashboard/src/Spacer.tsx
  57. 0 68
      pioneer/packages/app-dashboard/src/index.tsx
  58. 0 7
      pioneer/packages/app-dashboard/src/translate.ts
  59. 0 17
      pioneer/packages/app-democracy/package.json
  60. 0 84
      pioneer/packages/app-democracy/src/Overview/Proposal.tsx
  61. 0 42
      pioneer/packages/app-democracy/src/Overview/Proposals.tsx
  62. 0 122
      pioneer/packages/app-democracy/src/Overview/Propose.tsx
  63. 0 165
      pioneer/packages/app-democracy/src/Overview/Referendum.tsx
  64. 0 46
      pioneer/packages/app-democracy/src/Overview/Referendums.tsx
  65. 0 92
      pioneer/packages/app-democracy/src/Overview/Seconding.tsx
  66. 0 68
      pioneer/packages/app-democracy/src/Overview/Summary.tsx
  67. 0 100
      pioneer/packages/app-democracy/src/Overview/Voting.tsx
  68. 0 24
      pioneer/packages/app-democracy/src/Overview/index.tsx
  69. 0 46
      pioneer/packages/app-democracy/src/index.tsx
  70. 0 7
      pioneer/packages/app-democracy/src/translate.ts
  71. 0 16
      pioneer/packages/app-generic-asset/package.json
  72. 0 47
      pioneer/packages/app-generic-asset/src/AssetCard.tsx
  73. 0 66
      pioneer/packages/app-generic-asset/src/AssetRow.tsx
  74. 0 68
      pioneer/packages/app-generic-asset/src/Assets.tsx
  75. 0 150
      pioneer/packages/app-generic-asset/src/Transfer.tsx
  76. 0 44
      pioneer/packages/app-generic-asset/src/assetsRegistry.tsx
  77. 0 45
      pioneer/packages/app-generic-asset/src/index.tsx
  78. 0 76
      pioneer/packages/app-generic-asset/src/modals/Create.tsx
  79. 0 7
      pioneer/packages/app-generic-asset/src/translate.ts
  80. 0 17
      pioneer/packages/app-parachains/package.json
  81. 0 11
      pioneer/packages/app-parachains/src/Overview/Chain.tsx
  82. 0 71
      pioneer/packages/app-parachains/src/Overview/Parachain.tsx
  83. 0 42
      pioneer/packages/app-parachains/src/Overview/Parachains.tsx
  84. 0 50
      pioneer/packages/app-parachains/src/Overview/Summary.tsx
  85. 0 22
      pioneer/packages/app-parachains/src/Overview/index.tsx
  86. 0 38
      pioneer/packages/app-parachains/src/index.tsx
  87. 0 7
      pioneer/packages/app-parachains/src/translate.ts
  88. 0 18
      pioneer/packages/app-treasury/package.json
  89. 0 115
      pioneer/packages/app-treasury/src/Overview/Approve.tsx
  90. 0 92
      pioneer/packages/app-treasury/src/Overview/Proposal.tsx
  91. 0 89
      pioneer/packages/app-treasury/src/Overview/Proposals.tsx
  92. 0 106
      pioneer/packages/app-treasury/src/Overview/Propose.tsx
  93. 0 54
      pioneer/packages/app-treasury/src/Overview/Summary.tsx
  94. 0 27
      pioneer/packages/app-treasury/src/Overview/index.tsx
  95. 0 212
      pioneer/packages/app-treasury/src/Settings.tsx
  96. 0 47
      pioneer/packages/app-treasury/src/index.tsx
  97. 0 7
      pioneer/packages/app-treasury/src/translate.ts
  98. 0 0
      pioneer/packages/apps-config/.skip-npm
  99. 0 0
      pioneer/packages/apps-config/LICENSE
  100. 43 0
      pioneer/packages/apps-config/README.md

+ 1 - 1
cli/package.json

@@ -35,7 +35,7 @@
     "@types/mocha": "^5.2.7",
     "@types/node": "^10.17.18",
     "chai": "^4.2.0",
-    "eslint": "^5.16.0",
+    "eslint": "^7.6.0",
     "eslint-config-oclif": "^3.1.0",
     "eslint-config-oclif-typescript": "^0.1.0",
     "globby": "^10.0.2",

+ 1 - 1
devops/eslint-config/index.js

@@ -43,7 +43,7 @@ module.exports = {
     // should prefer using 'debug' package at least to allow control of
     // output verbosity if logging to console.
     'no-console': 'off',
-    '@typescript-eslint/camelcase': 'off',
+    'camelcase': 'off',
     '@typescript-eslint/class-name-casing': 'off',
     "@typescript-eslint/naming-convention": [
       "error",

+ 5 - 4
devops/eslint-config/package.json

@@ -17,14 +17,15 @@
   },
   "homepage": "https://github.com/joystream/joystream#readme",
   "peerDependencies": {
-    "eslint": ">= 5"
+    "eslint": "^7.6.0"
   },
   "dependencies": {
-    "@typescript-eslint/parser": "^2.34.0",
+    "@typescript-eslint/eslint-plugin": "3.8.0",
+    "@typescript-eslint/parser": "3.8.0",
     "eslint-config-prettier": "^6.11.0",
     "eslint-plugin-prettier": "^3.1.3",
-    "eslint-plugin-react": "^7.16.0",
-    "eslint-plugin-react-hooks": "^2.3.0",
+    "eslint-plugin-react": "^7.20.5",
+    "eslint-plugin-react-hooks": "^4.0.8",
     "eslint-config-standard": "^14.1.1",
     "eslint-plugin-standard": "^4.0.1",
     "eslint-plugin-promise": "^4.2.1",

+ 6 - 4
package.json

@@ -15,12 +15,14 @@
     "tests/network-tests",
     "cli",
     "types",
-    "pioneer",
-    "pioneer/packages/*",
     "storage-node",
     "storage-node/packages/*",
     "devops/eslint-config",
-    "devops/prettier-config"
+    "devops/prettier-config",
+    "pioneer",
+    "pioneer/packages/apps*",
+    "pioneer/packages/page*",
+    "pioneer/packages/react*"
   ],
   "resolutions": {
     "@polkadot/api": "1.26.1",
@@ -36,7 +38,7 @@
   "devDependencies": {
     "husky": "^4.2.5",
     "prettier": "2.0.2",
-    "eslint": "^5.16.0"
+    "eslint": "^7.6.0"
   },
   "husky": {
     "hooks": {

+ 2 - 1
pioneer/.123trigger

@@ -1 +1,2 @@
-5
+11
+0.45.2

+ 2 - 0
pioneer/.dockerignore

@@ -1 +1,3 @@
 node_modules
+build
+.git

+ 4 - 0
pioneer/.env-example

@@ -0,0 +1,4 @@
+# You can define all your ENV in such a file and run docker as:
+# docker run ... --env-file .env ...
+WS_URL=ws://localhost:9944
+POLKADOT_UI_SAMPLE=42

+ 13 - 0
pioneer/.eslintignore

@@ -1,4 +1,17 @@
 **/build/*
 **/coverage/*
 **/node_modules/*
+packages/old-apps/*
+packages/joy-members/*
+packages/joy-election/*
+packages/joy-forum/*
+packages/joy-help/*
+packages/joy-media/*
+packages/joy-pages/*
+packages/joy-proposals/*
+packages/joy-roles/*
+packages/joy-settings/*
+packages/joy-utils/*
+packages/joy-utils-old/*
+.eslintrc.js
 i18next-scanner.config.js

+ 2 - 2
pioneer/.eslintrc.js

@@ -1,5 +1,5 @@
 // At some point don't depend on @polkadot rules and use @joystream/eslint-config
-const base = require('@polkadot/dev-react/config/eslint');
+const base = require('@polkadot/dev/config/eslint');
 
 // add override for any (a metric ton of them, initial conversion)
 module.exports = {
@@ -13,7 +13,6 @@ module.exports = {
   rules: {
     ...base.rules,
     '@typescript-eslint/no-explicit-any': 'off',
-    '@typescript-eslint/camelcase': 'off',
     'react/prop-types': 'off',
     'new-cap': 'off',
     '@typescript-eslint/interface-name-prefix': 'off',
@@ -21,6 +20,7 @@ module.exports = {
     // why only required in VSCode!?!? is eslint plugin not working like eslint commandline?
     // Or are we having to add this because of new versions of eslint-config-* ?
     'no-console': 'off',
+    'header/header': 'off' // Temporary disable polkadot's rule
   },
   // isolate pioneer from monorepo eslint rules
   root: true

+ 4 - 1
pioneer/.gitignore

@@ -10,13 +10,16 @@ tmp/
 .env.test.local
 .env.production.local
 .npmrc
+.yarn/*
+!.yarn/releases
+!.yarn/plugins
+.pnp.*
 cc-test-reporter
 package-lock.json
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*
 !patches/**
-.idea/
 
 # Built Joystream types:
 packages/joy-types/lib/

+ 7 - 0
pioneer/.stylelintrc

@@ -0,0 +1,7 @@
+{
+  "extends": [
+    "stylelint-config-recommended",
+    "stylelint-config-styled-components"
+  ],
+  "defaultSeverity": "warning"
+}

+ 370 - 16
pioneer/CHANGELOG.md

@@ -1,4 +1,358 @@
-# 0.36.1
+# CHANGELOG
+
+## 0.51.1 Jul 27, 2020
+
+- Support for Acala chain and types (Thanks to https://github.com/aniiantt)
+- First batch of i18n for Arabic (Thanks to https://github.com/nightwolf3)
+- Update for Polkadot council thresholds
+- Council motion adjustment to cater for current and previous generations
+- Adjust imminent proposals to not need own type adjustments
+- Cleanup voting totals to only take free into account
+- Support JSON v3 formats with kdf
+- Always display time left in countdowns, not blocks
+- Adjust progress component to be circular
+- Rename "Deposit" button to "Send" button (less confusion)
+- Ensure new generation tip cancel works for council & users
+- Split council votes in backing & number of votes
+- Adjust council motions to have the correct max display for nay votes
+- Adjust payout toggles with increasing day increments
+- Adjust button formats & layouts
+- Adjust council slashing params to cater for current generation
+- Fixed for keyboard locale detection
+- Don't allow display in an iframe
+
+## 0.50.1 Jul 20, 2020
+
+- Adjust CSPs for Electron (Thanks to https://github.com/EthWorks)
+- Move delegation column to badge (Thanks to https://github.com/Tbaut)
+- Display costs for preimage calls
+- Add buttons for bid/unbid on Society
+- Allow tip endorsements while in countdown
+- Flatten events to group by same-kind in the same block
+- Adjust identity validation to check for whitespacing
+- Allow the use of VecFixed params with type detection/inputs
+- Adjust controller changing to filter when stash === controller (no error, but warn)
+- Allow the poll module via Governance proxy
+- Expand proxy detection to deep-inspect batched calls
+- Ensure various APIs are available (filtering) before attempting to render
+- Ensure tooltips are correctly displayed on account hovers
+- Cleanup council display for candidates
+- Cleanup and simplify QR import logic (& always set genesisHash, even when not supplied)
+- Always set genesisHash when accounts are derived
+- Adjust breakpoints for `AccountName` via `AddressShort`
+- Cleanup SUI dependencies with unused components, Progress, Responsive, Toggle
+- Adjust module bundling splits, remove unused libraries & fonts
+- Remove unmaintained page-123code (& references)
+- Don't display finalized blocks when grandpa is not available
+
+## 0.49.1 Jul 13, 2020
+
+- Update Subscan links with supported chains (https://github.com/carumusan)
+- Enhance Electron desktop with CSP & best practices (Thanks to https://github.com/EthWorks)
+- Activate Electron update feature by default (Thanks to https://github.com/EthWorks)
+- Use external browser for embedded links in Electron (Thanks to https://github.com/EthWorks)
+- Add testing around Electron features (Thanks to https://github.com/EthWorks)
+- Support democracy account delegation (Thanks to https://github.com/Tbaut)
+- Don't filter selected on multi account selector (Thanks to https://github.com/Tbaut)
+- Add support for Polkadot denomination poll
+- Allow input & display of OpaqueCall type from multisig
+- Indicate own nominees on targets page (re-added with badges)
+- Re-add indicator for own nominators in staking targets
+- Add `?filter=<string>` query param support on staking URLs
+- Add generator for Kusama society designs
+- Handle OpaqueCall in inputs and well as displays (multisig)
+- Small layout adjustments for address display components
+- Performance improvements on wrapped styles, component libraries
+- Add support for display detected ASCII bytes as text
+- Adjust type injection to override on-connect API defaults
+- Adjust attestation display with no-balance filters
+
+## 0.48.1 Jul 6, 2020
+
+- Fix for electron package build (Thanks to https://github.com/EthWorks)
+- Allow for setting of sub identities via account action
+- Adjust known account icons (Society & Treasury)
+- Add Westend chain to Subscan link generator
+- Display a warning with extensions and no injected accounts
+- Retrieve all tips at once and sort by closing
+- Fix identity set dialogs to never pass empty fields
+- Optimize favorites retrieval & selection for staking (shared between)
+- Support new registrar ProxyType in the signer
+- Hide funds unbonding when non bonded
+- Add withdraw action to staking menu (as available)
+- Fix InputAddress component with state change warnings
+- Bump to latest API and utilities
+
+## 0.47.1 Jul 1, 2020
+
+- Update zh translation (Thanks to https://github.com/dushaobindoudou)
+- Add DataHighway Harbour testnet endpoint (Thanks to https://github.com/ltfschoen)
+- Small I18N key fix (Thanks to https://github.com/ltfschoen)
+- Allow for Electron auto-update on Mac (Thanks to https://github.com/EthWorks)
+- Swap to default conviction of 1x (Thanks to https://github.com/Tbaut)
+- Make preimage hash selectable on FF (Thanks to https://github.com/Tbaut)
+- show unbonding value in staking actions (Thanks to https://github.com/Tbaut)
+- Default (via toggle) to only last 25% of eras for payouts
+- Allow retracting of tips by proposer
+- Allow tipping with new Substrate types (dual old/new support)
+- Enable the full retrieval of all Map/Doublemap entries
+- Support correct display of vesting with locks (& unlock via account)
+- Adjust on-chain identity inputs with field validation
+- Enable grouping of democracy locks by type
+- Resolve identity links starting with https://twitter
+- Display voted & unvoted council motions, referendums & tips
+- Adjust toggles for file/bytes uploads
+- Correct handling of recursive param structures in extrinsics
+- Swap icons to use font-awesome directly, including official components
+- Additional small UI cleanups and fixes
+
+## 0.46.1 Jun 22, 2020
+
+- I18n for es (Thanks to https://github.com/wimel)
+- Support for importing mini secrets via QR (Thanks to https://github.com/hanwencheng)
+- Update SubstrateTEE types (Thanks to https://github.com/brenzi)
+- Support for multisig calls with new weight parameters
+- Split sign and send updates in the signer modal for better UI tracking
+- Hide zero nonce of accounts/contracts pages
+- Display API extrinsic construction errors in the extrinsics app
+- Do not display signer proxies when there are none matching against accounts
+- Sort recovery addresses to align with the Substrate implementation
+- Check for funded controller on bonding
+- Suggest max values for bonding (& bonding extra), adjusting checks
+- Handle isForceEra to adjust era displays
+- Display candidacy bond on council submission
+- Adjust AddressMni & AddressSmall components to take advantage of bigger screens
+- Display referendum & treasury tips voting status
+- Add tips close buttons & countdown timer
+- Disabled nominations via targets when in election
+- Expand targets page to include waiting validators (full overview of all)
+- Apply shared filters (name, toggles) on all validator lists
+- Display balances in account view sidebar
+- Adjust signer dialog ith split sign/send (better status displays)
+- Adjust proxy checks for sudo calls to closer align with Polkadot
+- Apply i18n caching, with no reload on translation page
+- Add "Apply" i18n button to reflect editing changes in the UI
+- Support Tuple inputs (params/extrinsics) for custom names
+- `@polkadot/api` 1.20.1
+- `@polkadot/util` 2.15.1
+
+## 0.45.2 Jun 16, 2020
+
+- I18n for ja (Thanks to https://github.com/SotaWatanabe)
+- I18n for pt (thanks to https://github.com/laurogripa)
+- I18n for ru (Thanks to https://github.com/illlefr4u)
+- Update Encointer types (thanks to https://github.com/brenzi)
+- Improve Electron app security settings (Thanks to https://github.com/EthWorks)
+- Rework signer dialog to cater for proxies (and multisig/proxy combinations)
+- Construct payouts with oldest eras first (expire first)
+- Show outstanding multisig approvals on accounts page
+- Allow for addition of proxied accounts (access to proxy account only)
+- Change claims to handle no statements required (new module now on Kusama)
+- Publish docker image on release
+- update collective calls to handle weights enhancements for latest Substrate
+- Allow for tip endorsements with 0 value
+- add Centrifuge live as a connection option
+- Adjust Polkascan links with current active chains
+- When collective proposal is in close state, hide vote buttons
+- Cleanup technical committee display (header alignment)
+- Adjust IPFS/IPNS network extraction for local gateways
+- `@polkadot/api` 1.19.1
+- `@polkadot/util` 2.14.1
+
+## 0.44.1 Jun 10, 2020
+
+- Publish electron images on release (Thanks to https://github.com/EthWorks)
+- Adjust with latest Arcardia types (Thanks to https://github.com/ETeissonniere)
+- Extensions and fixes to the russian translations (Thanks to https://github.com/illlefr4u)
+- Rewrite of the contracts app (Thanks to https://github.com/kwingram25)
+- New types for SubstrateTEE (Thanks to https://github.com/brenzi)
+- Adjust for new Polkadot CC1 & Kusama types
+- Cater for new multisig module location
+- Filter multisig signatories based on approvals, set final state based on threshold
+- Adapt QR codes to cater for hashing on large payloads
+- Adjust collective extrinsics to cater for weight & lengths
+- Allow bonding with full free amount (this fixes bonding for vesting)
+- Fixes for Kusama as well as Polkadot claims
+- Allow Polkadot CC1 links to Polkascan & Subscan
+- Update Polkascan links with new formats
+- Don't display era progress when Forcing `isForceNone`
+- Overall styling adjustments
+- Cater for `{kusama,polkadot,westend}.dotapps.io` redirects
+- `@polkadot/api` 1.18.1
+- `@polkadot/util` 2.13.1
+
+## 0.43.1 May 26, 2020
+
+- Support for Polkadot CC1 Claims (Thanks to https://github.com/amaurymartiny & https://github.com/Tbaut)
+- Small typo fixes (Thanks to https://github.com/Swader)
+- updates to russian translation (Thanks to https://github.com/illlefr4u)
+- Adjustments to Electron build support (Thanks to https://github.com/EthWorks)
+- Support for Polkadot CC1 types & RPC endpoints
+- Detect & support new proposal close process in Substrate
+- Adjust checks for on-click validator (immediate isActive)
+- `@polkadot/api` 1.16.1
+- `@polkadot/util` 2.11.1
+
+## 0.42.1 May 22, 2020
+
+- Adjust Subscan proposal links (Thanks to https://github.com/illlefr4u)
+- Add environment suport for docker images (Thanks to https://github.com/chevdor)
+- Adjust overflows on small screens (Thanks to https://github.com/dushaobindoudou)
+- Add links to Polkaassembly (Thanks to https://github.com/Tbaut)
+- Address popup with detailed info (Thanks to https://github.com/kwingram25)
+- Add Russian translation (Thanks to https://github.com/gregzaitsev)
+- Russian translation adjustments (Thanks to https://github.com/illlefr4u)
+- Add Nodle RPC endpoint (Thanks to https://github.com/ETeissonniere)
+- Update Kulupu types (Thanks to https://github.com/sorpaas)
+- Update Edgeware types (Thanks to https://github.com/drewstone)
+- Update Encointer types (Thanks to https://github.com/brenzi)
+- Update node-template types (Thanks to https://github.com/shawntabrizi)
+- Update node-template types (Thanks to https://github.com/JoshOrndorff)
+- Higher default contracts gas limit (Thanks to https://github.com/Stefie)
+- Add block number display to event overview (Thanks to https://github.com/danforbes)
+- Basic Electron support (Thanks to https://github.com/EthWorks)
+- Documentation around IPFS pinning (Thanks to https://github.com/chevdor)
+- Added IPFS/IPNS publishing (ipns via dotapps.io)
+- Support for multisig wallets
+- Ledger address on-wallet display option
+- Add support for new per-staker payouts
+- Allow for "best" selection in staking
+- Simplified nominator & validator creation flows
+- Display >64 nominators on staking pages (clipped payouts)
+- Remove tooltips on staking and elsewhere (large number causes performance issues)
+- Council isMember checks uses council in addition to elections
+- Allow closing of council proposals
+- Expand Treasury proposal inline in council (for approve/reject)
+- Expand external proposals in council (preimage lookups)
+- Allow for sudo with unchecked weight
+- Adjust referendums to display turnout and sentiment
+- Add columar modals with extra info
+- Add table summaries with totals for free, bonded & stash payouts
+- Add images to metadata update dropdowns
+- Ecdsa keypair support
+- Display delegations in voting breakdowns
+- Adjust registrar modal with per-account filters
+- Add i18n linting script
+- Add i18n editor with translation file generator
+- Custom i18n loader with caching
+- Add JS sample for storage key generation
+- Misc UI fixes & adjustments throughout
+- Allow for tabes with aliasses (on renames) & redirects
+- Align types and calls with latest substrate
+
+## 0.41.1 Apr 20, 2020
+
+- Fix for searching child identities on parent name (Thanks to https://github.com/krogla)
+- Support chains with no balances module (Thanks to https://github.com/Voxelot)
+- Add out-of-the-box support for Encointer (Thanks to https://github.com/brenzi)
+- Add ava.do endpoint for Kusama (Thanks to https://github.com/Swader)
+- Show remaining time on staking payout actions, link payouts from actions
+- Display per-validator nominators on waiting list
+- Add support for Treasury tipping (display of available & creation)
+- Adjust display of passing/failing calcs in democracy (incl. no display when other side is 0)
+- Enable use of `system_chainType` to detect development chains
+- Adjust Expander display for balances as used in accounts
+- Adjust formatting outputs (via cleanup) for state queries
+- Cleanup nowrap on Extender as part of tables
+- Optimize retrieval of old-style validator/nominator payouts (not full historyDepth)
+- Optimize AccountName with caching & when used in lists (no lookup information attached, but not shown)
+- Optimize IdentityIcon with removal of extra queries
+- Optimize Transfers, no unneeded useEffect
+- Cleanups, remove unused components with no references (dropped in earlier refactoring)
+- More components to functional, specific focus on TxModal extends
+- Bumps to all @polkadot/* packages for latest support everywhere
+
+## 0.40.1 Apr 9, 2020
+
+- Swap voting to aye/nay toggles (Thanks to https://github.com/Lowhearth)
+- Cater for chains where no tip is present (Thanks to https://github.com/Sushisource)
+- Export chain-specific settings via QR (thanks to https://github.com/hanwencheng)
+- Improve support for WS_URL usage (Thanks to https://github.com/chevdor)
+- Add out-of-the-box support for Centrifuge (Thanks to https://github.com/philipstanislaus)
+- Cleanup docker image construction (Thanks to https://github.com/philipstanislaus)
+- Add out-of-the-box support for node template (Thanks to https://github.com/JoshOrndorff)
+- Text cleanups (Thanks to https://github.com/x5engine)
+- Text cleanups (Thanks to https://github.com/ltfschoen)
+- update Parachains to support latest Polkadot (Thanks to https://github.com/kwingram25)
+- Rework multi address inputs (e.g. nominations & council) (Thanks to https://github.com/kwingram25)
+- Introduce apps-config as a single source of config information
+- Cater for metadata updates to extensions
+- Rework explorer layouts, combining extrinsics & events into a single view
+- Swap all layouts to be explicitly table-based (instead of table-like)
+- Cater for latest Substrate referendum updates
+- Allow for fast-tracking proposals
+- Time countdowns where applicable, e.g. referendums
+- Show referendum pass/fail status as well as change information
+- Combine Accounts & Contacts into a single app
+- Support for display of parent/child relationships in accounts
+- Add ErrorBoundary around components
+- Update Westend after reset
+- Enable Subscan explorer
+- Support for simple payouts on Substrate, with Payouts screen
+- Extensive use of useCallback & React.memo for functional components
+- Add Expander component for consistent UI
+- Loading spinners used consistently
+- Specific names for society & treasury addresses
+- Cleanup all voting lock, consistent display
+- ... loads of other under-the-hood improvements and cleanups
+
+## 0.39.1 Jan 31, 2020
+
+- **Breaking** Drop support for V1 Substrate chains
+- Translation into Chinese (Thanks to https://github.com/dushaobindoudou)
+- Support for sign-only transactions (Thanks to https://github.com/mzolkiewski)
+- Add support for WestEnd testnet
+- Add support for social recovery in accounts
+- Add counters for all proposal-based apps
+- Disable spellcheck on all input fields (privacy)
+- Query the paymentInfo API to get weight fee information
+- Remove FF warning with https:// -> ws://localhost
+- Staking now supports where the controller or stash accounts are not local
+- Social app
+- Add support for identity setting (via identity module)
+- Add support for registrars to hand out identity judgements
+- Use both internal and lib hooks as applicable (refactoring)
+- Support QR codes (accounts) with optional names
+- Cleanup all Modals, simplify
+- Adjust balance display formats
+- Update to latest libraries (incl. util 2.0 & api 1.0)
+
+## 0.38.1
+
+- Fix summarybar in 123-code (Thanks to https://github.com/anakornk)
+- Update Edgeware with correct keys (Thanks to https://github.com/drewstone)
+- Add InputAddressMulti inputs, both to council and staking nominators
+- Rework all layouts, removing cards for table-ike-layouts
+- Technical comittee app
+- Allow for external proposal and queued for dispatch in democracy
+- Add pre-image support to democracy proposals (including imminent)
+- Improved staking page rendering (background)
+- Update to latest libraries
+
+## 0.37.1
+
+- Support for Kusama CC3
+- Support for contracts with new ABI v2 (Thanks to https://github.com/kwingram25)
+- Support for on-chain nicks
+- Speed improvements for the staking pages
+- Add account derivation from existing account
+- Council voting with runner up & phragmen
+- Allow favorites in validators pages
+- Rework nominations to take favorites & current into account
+- Enhance AddressCard with additional info (incl. vested)
+- Move account/address actions to popup menu
+- Convert a large number of components to use hooks
+- Display validator graphs
+- Refactor of backup modal (Thanks to @LukeSugiura)
+- Enable language setting options (Thanks to @LukeSugiura)
+- Allow for signRaw to be used in the signing toolbox (injected accounts)
+- Display account names in status events
+- Nomination targets dashboard
+- Validator preferences are expressed as commission % as supported by chains
+- Account locks are applied on a genesis range (e.g. CC2 & CC3 allow availability)
+- ... lots of smaller enhancements & bug fixes
+
+## 0.36.1
 
 - Api 0.95.1, Util 1.6.1, Extension 0.13.1
 - Support latest contracts ABI (via API), incl. rework of contracts UI
@@ -20,7 +374,7 @@
 - Make the network selection clickable on network name (via bounty)
 - ... and a number of cleanups all around
 
-# 0.35.1
+## 0.35.1
 
 - Api 0.91.1, Util 1.2.1, Extension 0.10.1
 - Support for accounts added via Qr (for instance, the Parity Signer)
@@ -33,7 +387,7 @@
 - Fix account derivation with `///password`
 - Lots of component & maintainability cleanups
 
-# 0.34.1
+## 0.34.1
 
 - Kusama support
 - Full support for Substrate 2.x & Polkadot 0.5.0 networks
@@ -42,7 +396,7 @@
 - Basic Council, Parachains & Treasury apps
 - Moved ui-* packages to react-*
 
-# 0.33.1
+## 0.33.1
 
 - Allow for externally injected accounts (i.e. via extension, polkadot-js & SingleSource)
 - Links to extrnisics & addresses on Polkascan
@@ -60,39 +414,39 @@
 - Latest @polkadot/util & @polkadot/api
 - A large number of optimizations and smaller fixes
 
-# 0.32.1
+## 0.32.1
 
 - Support for Substrate 1.0 release & metadata v4
 - @polkadot/api 0.77.1
 
-# 0.31.1
+## 0.31.1
 
 - Cleanups, fixes and features around the poc-4 staking module
 - Number of UI enhancements
 
-# 0.30.1
+## 0.30.1
 
 - Staking page indicator for offline nodes (count & block)
 - Rework page tabs and content layouts
 - Cleanup of all UI summary headers
 - Emberic Elem support (replaces Dried Danta)
 
-# 0.29.1
+## 0.29.1
 
 - @polkadot/util & @polkadot/api 0.75.1
 
-# 0.28.1
+## 0.28.1
 
 - Support for substrate 1.0-rc
 
-# 0.27.1
+## 0.27.1
 
 - Bring in new staking & nominating functions
 - Swap default keyring accounts (on creation) to sr25519
 - New faster crypto algorithms
 - Misc. bug fixes all around
 
-# 0.26.1
+## 0.26.1
 
 - Swap keyring to HDKD derivation, mnemonic keys are now not backwards compatible with those created earlier. (Defaults are still for ed25519)
 - Swap crypto to new WASM-backed version (and remove libsodium dependency)
@@ -100,23 +454,23 @@
 - New mobile-friendly sidebar
 - Fix issues with nominating (old non-bonds interface)
 
-# 0.25.1
+## 0.25.1
 
 - Swap to publishing -beta.x on merge (non-breaking testing)
 
- # 0.24.1
+ ## 0.24.1
 
  Storage now handles Option type properly
 
- # 0.23.1
+ ## 0.23.1
 
  JavaScript console introduced
 
-# 0.22.1
+## 0.22.1
 
 - Use new Compact<Index> transaction format - this requires the latest binaries from either Polkadot or Substrate
 
-# 0.21.1
+## 0.21.1
 
 - PoC-3 support with latest Substrate master & Polkadot master
 - Add support for Charred Cherry (Substrate) and Alexander (Polkadot) testnets

+ 22 - 0
pioneer/I18N.md

@@ -0,0 +1,22 @@
+# I18N
+
+The apps UI allows all strings to be translated. Additionally it has a basic UI that allows for the creation of the required translation files, which will give an overview on the progress for a specific language.
+
+## Updating translations
+
+To update translations, the following process is required.
+
+- launch the apps UI, either locally or via https://polkadot.js.org/apps
+- explicitly navigate to the i18n page, https://polkadot.js.org/apps/#/settings/i18n
+
+Here you will find a dropdown of all the available languages and all the modules that maps to the UI. On a single screen you will be able to see all the available strings for a specific module.
+
+- adjust any strings as required
+- once completed with the changes, click the `Generate translation.json` button to download the translation file
+- this file can now be added to the repo with a PR to https://github.com/polkadot-js/apps/tree/master/packages/apps/public/locales
+
+## Adding a new language (if not in dropdown above)
+
+The process is similar for the above, but does require a new folder with the language identifier to be added. Create [packages/apps/public/locales/<id>](https://github.com/polkadot-js/apps/tree/master/packages/apps/public/locales) folder with an empty `translation.json` (containing only `{}`). After addition of the folder, run `yarn build:i18n` and then the new language will be available for update as per the process in the previous section.
+
+In addition to the language folder, the language also needs to be added to the dropdown for available languages, this can be found in [packages/apps-config/src/settings.languages.ts](https://github.com/polkadot-js/apps/blob/master/packages/apps-config/src/settings/languages.ts)

+ 11 - 10
pioneer/README.md

@@ -11,16 +11,17 @@ This can be accessed as a hosted application via [https://testnet.joystream.org]
 The repo is split into a number of packages, each representing an application. These are -
 
 - [apps](packages/apps/) This is the main entry point. It handles the selection sidebar and routing to the specific application being displayed.
-- [app-accounts](packages/app-accounts/) A basic account management app.
-- [app-address-book](packages/app-address-book/) A basic address management app.
-- [app-explorer](packages/app-explorer/) A simple block explorer. It only shows the most recent blocks, updating as they become available.
-- [app-extrinsics](packages/app-extrinsics/) Submission of extrinsics to a node.
-- [app-js](packages/app-js/) An online code editor with [@polkadot-js/api](https://github.com/polkadot-js/api/tree/master/packages/api) access to the currently connected node.
-- [app-settings](packages/app-settings/) A basic settings management app, allowing choice of language, node to connect to, and theme
-- [app-staking](packages/app-staking/) A basic staking management app, allowing staking and nominations.
-- [app-storage](packages/app-storage/) A simple node storage query application. Multiple queries can be queued and updates as new values become available.
-- [app-toolbox](packages/app-toolbox/) Submission of raw data to RPC endpoints and utility hashing functions.
-- [app-transfer](packages/app-transfer/) A basic account management app, allowing transfer of Units/DOTs between accounts.
+- [apps-electron](packages/apps-electron/) Desktop app running [apps](packages/apps/).
+- [page-accounts](packages/page-accounts/) A basic account management app.
+- [page-address-book](packages/page-address-book/) A basic address management app.
+- [page-explorer](packages/page-explorer/) A simple block explorer. It only shows the most recent blocks, updating as they become available.
+- [page-extrinsics](packages/page-extrinsics/) Submission of extrinsics to a node.
+- [page-js](packages/page-js/) An online code editor with [@polkadot-js/api](https://github.com/polkadot-js/api/tree/master/packages/api) access to the currently connected node.
+- [page-settings](packages/page-settings/) A basic settings management app, allowing choice of language, node to connect to, and theme
+- [page-staking](packages/page-staking/) A basic staking management app, allowing staking and nominations.
+- [page-storage](packages/page-storage/) A simple node storage query application. Multiple queries can be queued and updates as new values become available.
+- [page-toolbox](packages/page-toolbox/) Submission of raw data to RPC endpoints and utility hashing functions.
+- [page-transfer](packages/page-transfer/) A basic account management app, allowing transfer of Units/DOTs between accounts.
 
 In addition the following libraries are also included in the repo. These are to be moved to the [@polkadot/ui](https://github.com/polkadot-js/ui/) repository once it reaches a base level of stability and usability. (At this point with the framework being tested on the apps above, it makes development easier having it close)
 

+ 5 - 4
pioneer/babel.config.js

@@ -1,4 +1,5 @@
-module.exports = {
-  extends: '@polkadot/dev-react/config/babel',
-  sourceType: 'unambiguous'
-};
+// Copyright 2017-2020 @polkadot/apps authors & contributors
+// This software may be modified and distributed under the terms
+// of the Apache-2.0 license. See the LICENSE file for details.
+
+module.exports = require('@polkadot/dev/config/babel');

+ 27 - 0
pioneer/docker/nginx.conf

@@ -0,0 +1,27 @@
+user  nginx;
+worker_processes  1;
+
+error_log  /var/log/nginx/error.log warn;
+pid        /var/run/nginx.pid;
+
+events {
+    worker_connections  1024;
+}
+
+http {
+    include       /etc/nginx/mime.types;
+    default_type  application/octet-stream;
+
+    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+                      '$status $body_bytes_sent "$http_referer" '
+                      '"$http_user_agent" "$http_x_forwarded_for"';
+
+    access_log  /var/log/nginx/access.log  main;
+
+    sendfile        on;
+    #tcp_nopush     on;
+
+    keepalive_timeout  65;
+    gzip  on;
+    include /etc/nginx/conf.d/*.conf;
+}

+ 20 - 0
pioneer/env.sh

@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# This script is used when the docker container starts and does the magic to
+# bring the ENV variables to the generated static UI.
+
+TARGET=./env-config.js
+
+# Recreate config file
+echo -n > $TARGET
+
+declare -a vars=(
+  "WS_URL"
+  "SAMPLE"
+)
+
+echo "window.process_env = {" >> $TARGET
+for VAR in ${vars[@]}; do
+  echo "  $VAR: \"${!VAR}\"," >> $TARGET
+done
+echo "}" >> $TARGET

+ 51 - 67
pioneer/i18next-scanner.config.js

@@ -1,7 +1,44 @@
+// Copyright 2017-2020 @polkadot/apps authors & contributors
+// This software may be modified and distributed under the terms
+// of the Apache-2.0 license. See the LICENSE file for details.
+
 const fs = require('fs');
 const path = require('path');
 const typescript = require('typescript');
 
+const findPackages = require('./scripts/findPackages');
+
+function transform (file, enc, done) {
+  const { ext } = path.parse(file.path);
+
+  if (ext === '.tsx') {
+    const content = fs.readFileSync(file.path, enc);
+
+    const { outputText } = typescript.transpileModule(content, {
+      compilerOptions: {
+        target: 'es2018'
+      },
+      fileName: path.basename(file.path)
+    });
+
+    const parserHandler = (key, options) => {
+      options.defaultValue = key;
+
+      if (process.platform !== 'win32') {
+        options.ns = /packages\/(.*?)\/src/g.exec(file.path)[1].replace('page-', 'app-');
+      } else {
+        options.ns = /packages\\(.*?)\\src/g.exec(file.path)[1].replace('page-', 'app-');
+      }
+
+      this.parser.set(key, options);
+    };
+
+    this.parser.parseFuncFromString(outputText, parserHandler);
+  }
+
+  done();
+}
+
 module.exports = {
   input: [
     'packages/*/src/**/*.{ts,tsx}',
@@ -10,80 +47,27 @@ module.exports = {
     '!packages/*/src/i18n/**',
     '!**/node_modules/**'
   ],
-  output: './',
   options: {
     debug: true,
+    defaultLng: 'en',
     func: {
-      list: ['t', 'i18next.t', 'i18n.t'],
-      extensions: ['.tsx']
-    },
-    trans: {
-      component: 'Trans'
+      extensions: ['.tsx', '.ts'],
+      list: ['t', 'i18next.t', 'i18n.t']
     },
+    keySeparator: false, // key separator
     lngs: ['en'],
-    defaultLng: 'en',
-    ns: [
-      'app-123code',
-      'app-accounts',
-      'app-address-book',
-      'app-claims',
-      'app-contracts',
-      'app-council',
-      'app-dashboard',
-      'app-democracy',
-      'app-explorer',
-      'app-extrinsics',
-      'app-generic-asset',
-      'app-js',
-      'app-parachains',
-      'app-settings',
-      'app-staking',
-      'app-storage',
-      'app-sudo',
-      'app-toolbox',
-      'app-transfer',
-      'app-treasury',
-      'apps',
-      'apps-routing',
-      'react-api',
-      'react-components',
-      'react-params',
-      'react-query',
-      'react-signer',
-      'ui'
-    ],
-    defaultNs: 'ui',
+    ns: findPackages().map(({ dir }) => dir.replace('page-', 'app-')),
+    nsSeparator: false, // namespace separator
     resource: {
-      loadPath: 'packages/apps/public/locales/{{lng}}/{{ns}}.json',
-      savePath: 'packages/apps/public/locales/{{lng}}/{{ns}}.json',
       jsonIndent: 2,
-      lineEnding: '\n'
+      lineEnding: '\n',
+      loadPath: 'packages/apps/public/locales/{{lng}}/{{ns}}.json',
+      savePath: 'packages/apps/public/locales/{{lng}}/{{ns}}.json'
     },
-    nsSeparator: false, // namespace separator
-    keySeparator: false // key separator
-  },
-  transform: function transform (file, enc, done) {
-    const { ext } = path.parse(file.path);
-
-    if (ext === '.tsx') {
-      const content = fs.readFileSync(file.path, enc);
-
-      const { outputText } = typescript.transpileModule(content, {
-        compilerOptions: {
-          target: 'es2018'
-        },
-        fileName: path.basename(file.path)
-      });
-
-      const parserHandler = (key, options) => {
-        options.defaultValue = key;
-        options.ns = /packages\/(.*?)\/src/g.exec(file.path)[1];
-        this.parser.set(key, options);
-      };
-
-      this.parser.parseFuncFromString(outputText, parserHandler);
+    trans: {
+      component: 'Trans'
     }
-
-    done();
-  }
+  },
+  output: './',
+  transform
 };

+ 18 - 9
pioneer/jest.config.js

@@ -1,17 +1,26 @@
-/* eslint-disable @typescript-eslint/no-var-requires */
-const config = require('@polkadot/dev-react/config/jest');
+// Copyright 2017-2020 @polkadot/apps authors & contributors
+// This software may be modified and distributed under the terms
+// of the Apache-2.0 license. See the LICENSE file for details.
+
+const config = require('@polkadot/dev/config/jest');
+
 const findPackages = require('./scripts/findPackages');
 
-const internalModules = findPackages().reduce((modules, { dir, name }) => {
-  modules[`${name}(.*)$`] = `<rootDir>/packages/${dir}/src/$1`;
+const internalModules = findPackages()
+  .filter(({ name }) => !['@polkadot/apps'].includes(name))
+  .reduce((modules, { dir, name }) => {
+    modules[`${name}(.*)$`] = `<rootDir>/packages/${dir}/src/$1`;
 
-  return modules;
-}, {});
+    return modules;
+  }, {});
 
 module.exports = Object.assign({}, config, {
   moduleNameMapper: {
     ...internalModules,
-    '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object',
-    '\\.(css|less)$': 'empty/object'
-  }
+    '\\.(css|less)$': 'empty/object',
+    '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object'
+  },
+  transformIgnorePatterns: [
+    '<rootDir>/node_modules'
+  ]
 });

+ 1 - 1
pioneer/lerna.json

@@ -10,5 +10,5 @@
   "packages": [
     "packages/*"
   ],
-  "version": "0.37.0-beta.63"
+  "version": "0.51.1"
 }

+ 54 - 45
pioneer/package.json

@@ -1,5 +1,6 @@
 {
-  "version": "0.37.0-beta.63",
+  "version": "0.51.1",
+  "license": "Apache-2",
   "private": true,
   "engines": {
     "node": ">=12.18.0",
@@ -8,70 +9,78 @@
   "homepage": ".",
   "name": "pioneer",
   "scripts": {
-    "analyze": "yarn run build && cd packages/apps && yarn run source-map-explorer build/main.*.js",
-    "build": "yarn run build:code && yarn run build:i18n",
-    "build:code": "NODE_ENV=production polkadot-dev-build-ts",
-    "build:i18n": "i18next-scanner --config i18next-scanner.config.js",
+    "analyze": "yarn clean && BUILD_ANALYZE=1 yarn run build:code && yarn source-map-explorer packages/apps/build/main.*.js",
+    "build": "yarn run build:i18n && yarn run build:code",
+    "build:code": "NODE_ENV=production node ./scripts/dev-build-ts.js",
+    "build:i18n": "i18next-scanner --config i18next-scanner.config.js && node ./scripts/i18nSort.js",
+    "build:www": "rm -rf packages/apps/build && mkdir -p packages/apps/build && yarn run build:i18n && cd packages/apps && NODE_ENV=production webpack --config webpack.config.js",
     "docs": "echo \"skipping docs\"",
     "clean": "polkadot-dev-clean-build",
     "clean:i18n": "rm -rf packages/apps/public/locales/en && mkdir -p packages/apps/public/locales/en",
     "lint": "eslint --ext .js,.jsx,.ts,.tsx . && tsc --noEmit --pretty",
+    "lint:css": "stylelint './packages/**/src/**/*.tsx'",
     "lint-only-errors": "eslint --quiet --ext .js,.jsx,.ts,.tsx . && tsc --noEmit --pretty",
     "lint-autofix": "eslint --fix --ext .js,.jsx,.ts,.tsx . && tsc --noEmit --pretty",
     "postinstall": "polkadot-dev-yarn-only",
     "test": "echo \"skipping tests\"",
     "vanitygen": "node packages/app-accounts/scripts/vanitygen.js",
-    "start": "cd packages/apps && webpack --config webpack.config.js",
+    "start": "yarn clean && cd packages/apps && webpack --config webpack.config.js",
     "generate-schemas": "json2ts -i packages/joy-types/src/schemas/role.schema.json -o packages/joy-types/src/schemas/role.schema.ts",
     "build-storybook": "build-storybook -c .storybook",
     "storybook": "start-storybook -s ./packages/apps/public -p 3001"
   },
   "devDependencies": {
-    "@babel/core": "^7.7.0",
-    "@babel/runtime": "^7.7.1",
-    "@babel/cli": "^7.7.4",
-    "@polkadot/dev-react": "^0.32.0-beta.13",
-    "@polkadot/ts": "^0.1.84",
-    "@polkadot/dev": "^0.32.0-beta.15",
+    "@babel/core": "^7.10.5",
+    "@babel/register": "^7.10.5",
+    "@babel/runtime": "^7.10.5",
+    "@pinata/sdk": "^1.1.10",
+    "@polkadot/dev": "^0.55.28",
+    "@polkadot/ts": "^0.3.29",
+    "@types/bn.js": "^4.11.6",
+    "@types/chart.js": "^2.9.23",
+    "@types/file-saver": "^2.0.1",
+    "@types/i18next": "^13.0.0",
+    "@types/jest": "^26.0.7",
+    "@types/react-beautiful-dnd": "^13.0.0",
+    "@types/react-copy-to-clipboard": "^4.3.0",
+    "@types/react-dom": "^16.9.8",
+    "@types/react-router-dom": "^5.1.5",
+    "@types/react-tooltip": "^4.2.4",
+    "@types/store": "^2.0.2",
+    "@types/styled-components": "^5.1.1",
+    "@types/styled-theming": "^2.2.4",
+    "concurrently": "^5.2.0",
+    "devtron": "^1.4.0",
+    "dnslink-cloudflare": "^2.0.4",
+    "electron": "^9.1.1",
+    "electron-builder": "^22.8.0",
+    "electron-builder-notarize": "^1.2.0",
+    "i18next-scanner": "^2.11.0",
+    "react": "^16.13.1",
+    "react-dom": "^16.13.1",
+    "source-map-explorer": "^2.4.2",
+    "stylelint": "^13.6.1",
+    "stylelint-config-recommended": "^3.0.0",
+    "stylelint-config-styled-components": "^0.1.1",
+    "terser-webpack-plugin": "^3.0.7",
+    "webpack": "^4.44.0",
+    "webpack-cli": "^3.3.12",
+    "webpack-merge": "^4.2.2",
+    "webpack-plugin-serve": "^1.0.1",
+    "//": "Joystream-specific",
+    "react-i18next": "^11.7.0",
     "@storybook/addon-knobs": "^5.2.5",
     "@storybook/addon-storysource": "^5.2.5",
-    "@types/jest": "^24.0.22",
-    "@types/react-router-dom": "^5.1.4",
-    "@types/yup": "^0.26.36",
-    "autoprefixer": "^9.7.1",
-    "empty": "^0.10.1",
-    "html-loader": "^0.5.5",
-    "i18next-scanner": "^2.10.3",
+    "@storybook/addon-actions": "^5.2.5",
+    "@storybook/addon-console": "^1.2.1",
+    "@storybook/react": "^5.2.5",
     "json-schema-to-typescript": "^7.1.0",
-    "markdown-loader": "^5.1.0",
-    "postcss": "^7.0.21",
-    "postcss-clean": "^1.1.0",
-    "postcss-flexbugs-fixes": "^4.1.0",
-    "postcss-import": "^12.0.0",
-    "postcss-loader": "^3.0.0",
-    "postcss-nested": "^4.2.1",
-    "postcss-sass": "^0.4.1",
-    "postcss-simple-vars": "^5.0.0",
-    "precss": "^4.0.0",
-    "source-map-explorer": "^2.0.1",
     "storybook-react-router": "^1.0.8",
-    "ts-jest": "^24.1.0",
-    "tsconfig-paths-webpack-plugin": "^3.2.0",
-    "webpack": "^4.33.0",
-    "typescript": "3.7.2",
-    "cpx": "^1.5.0",
-    "eslint-config-semistandard": "^15.0.0",
-    "eslint-config-standard": "^14.1.1",
-    "eslint-plugin-import": "^2.20.2",
-    "eslint-plugin-node": "^11.1.0",
-    "eslint-plugin-promise": "^4.2.1",
-    "eslint-plugin-standard": "^4.0.1"
+    "typescript": "^3.9.7",
+    "eslint-plugin-header": "^3.0.0",
+    "eslint-plugin-sort-destructure-keys": "^1.3.5"
   },
   "dependencies": {
-    "@polkadot/ui-settings": "^0.47.0-beta.3",
-    "@storybook/addon-actions": "^5.2.5",
-    "@storybook/addon-console": "^1.2.1",
-    "@storybook/react": "^5.2.5",
     "@types/lodash": "^4.14.138",
     "@types/marked": "^0.7.0",
     "ajv": "^6.10.2",

+ 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 0
pioneer/packages/apps-config/.skip-npm


+ 0 - 0
pioneer/packages/app-123code/LICENSE → pioneer/packages/apps-config/LICENSE


+ 43 - 0
pioneer/packages/apps-config/README.md

@@ -0,0 +1,43 @@
+# @polkadot/apps-config
+
+General config for various services, including settings, external links & types. This is a central source of all the configuration settings that can be tweaked. This also means that it can be customized (via PR) to support any additional chains. The internals are split into a number of settings -
+
+- [api](./src/api) - Here you can add any chain or node-type specific types configuration. When added, it means that when the UI connects to either a runtime with a spec name, or a chain with a specific name, the types will be automatically added to the API as used in the app.
+- [links](./src/links) - These are all links to external providers such as explorers. This information is used anywhere where there is an external link to determine the providers for these links.
+- [settings](./src/settings) - These are used in dropdowns, specifically under the settings page.
+- [ui](./src/ui) - Logos & color settings for chain and node spec specific overrides. This means that when the runtime/chain is detected, the specific logo would be used.
+
+Customization for each of these are discussed next.
+
+## Api
+
+The API config can be done in one of two ways -
+
+- [chain](./src/api/chain) - Here we are mapping to a specific chain name. Generally the next type would be preferred, however if you are supporting multiple chains with individual configs, you would probably want to add the chain-specific information in here.
+- [spec](./src/api/spec) - Here we are mapping from the runtime spec name of the chain to specific types. This means that when connected to a specific spec, these types will be injected.
+
+The actual type definitions you should be familiar with, it is exactly the same as you would upload via the settings page in JSON, or as detailed in the [API types pages](https://polkadot.js.org/api/start/types.extend.html#extending-types).
+
+## Links
+
+We are not going to spend too much time here, since it is generally applicable to explorers and like services. However, should you run one of these services, you can take a look at the existing configs and customize for your setup.
+
+## Settings
+
+There are 2 general areas of interest here -
+
+- [endpoints](./src/settings) - This is where we can add additional endpoints to appear in the dropdowns. We would like to keep this to mostly live networks, although based on demand can probably extend to a testing-only section as well.
+- [ss58](./src/settings) - Should you wish to add your ss58Format to the settings dropdown, this is where the configuration take place
+
+## UI
+
+These are self-explanatory and config here actually does get used in other parts as well. Basically the information here is broken down into a couple of categories -
+
+- [general](./src/ui/general)
+  - color configuration based on chain
+- [identityIcon](./src/ui/identityIcons)
+  - specific identityIcon to use based on node name
+- [logos](./src/ui/logos)
+  - chains - Specific logos when connecting to a specific chain
+  - nodes - Logos that are used when connecting to a specific runtime spec type (catch-all)
+  - named - These logos are used as overrides when we pass an explicit logo name 

Vissa filer visades inte eftersom för många filer har ändrats