Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #70 from paritytech/w3f-deploy-1.3.0
Browse files Browse the repository at this point in the history
v1.3.0 - 1.4.0
  • Loading branch information
miabarbir authored Apr 9, 2024
2 parents 5d0b524 + a2247ea commit 4e9a3ab
Show file tree
Hide file tree
Showing 177 changed files with 4,485 additions and 1,820 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog

## [1.3.0](https://github.com/paritytech/polkadot-staking-dashboard/compare/v1.2.1...v1.3.0) (2024-04-08)


### Features

* Create pool canvas ([#2061](https://github.com/paritytech/polkadot-staking-dashboard/issues/2061)) ([de3ad50](https://github.com/paritytech/polkadot-staking-dashboard/commit/de3ad50ed2eda49a0378a26c22fb8a48fdc9e305))
* Join pool progress bar on performance fetch. ([#2064](https://github.com/paritytech/polkadot-staking-dashboard/issues/2064)) ([e5027ff](https://github.com/paritytech/polkadot-staking-dashboard/commit/e5027fffc3151dbdf0c4b7cce09f37aaeb184971))
* Open `JoinPool` canvas immediately, preloader, prioritise low member pools. ([#2059](https://github.com/paritytech/polkadot-staking-dashboard/issues/2059)) ([5360eaa](https://github.com/paritytech/polkadot-staking-dashboard/commit/5360eaa17ef08b6b602d21967d9174f2eed9cf83))
* Pool performance data to batches. Per-page fetching, pool join subset. ([#2057](https://github.com/paritytech/polkadot-staking-dashboard/issues/2057)) ([965d3e1](https://github.com/paritytech/polkadot-staking-dashboard/commit/965d3e182c77e0b6d46c2d1c603e74a30cd7be92))
* **refactor:** Persist all imported accounts active pools. ([#2066](https://github.com/paritytech/polkadot-staking-dashboard/issues/2066)) ([1a1847d](https://github.com/paritytech/polkadot-staking-dashboard/commit/1a1847deb0d4763b893335293c85dbe8d3f330b1))
* Simple pool join & call to action UI ([#2050](https://github.com/paritytech/polkadot-staking-dashboard/issues/2050)) ([6d04429](https://github.com/paritytech/polkadot-staking-dashboard/commit/6d0442947b4322ec949bbb88e82b24720dce4143))
* Start nominating canvas ([#2062](https://github.com/paritytech/polkadot-staking-dashboard/issues/2062)) ([0208d5f](https://github.com/paritytech/polkadot-staking-dashboard/commit/0208d5fc5658bc375eeef3aa853954c05290796f))
* use `bondedPool.memberCounter`, deprecate `nomination_pool/pool` Subscan call ([#2054](https://github.com/paritytech/polkadot-staking-dashboard/issues/2054)) ([b536faf](https://github.com/paritytech/polkadot-staking-dashboard/commit/b536faf8fc410c8291dea84fa2b96189ab2c8e76))
* **ux:** `JoinPool`: Inline sync for provided pool ([#2067](https://github.com/paritytech/polkadot-staking-dashboard/issues/2067)) ([e146bfc](https://github.com/paritytech/polkadot-staking-dashboard/commit/e146bfcb15df96cd0a10fe1d268e3eab343ef1d1))
* **ux:** Disconnect from extension ([#2069](https://github.com/paritytech/polkadot-staking-dashboard/issues/2069)) ([c5c2ecb](https://github.com/paritytech/polkadot-staking-dashboard/commit/c5c2ecb54d31b59cc4db3bdb20b55e48cc01160a))
* **ux:** Improve Join Pool preloader ([#2063](https://github.com/paritytech/polkadot-staking-dashboard/issues/2063)) ([69d716e](https://github.com/paritytech/polkadot-staking-dashboard/commit/69d716e2e99a6f32e45407362d951352fd6a884f))
* **ux:** Pool display polishes, pre-release fixes ([#2065](https://github.com/paritytech/polkadot-staking-dashboard/issues/2065)) ([89e5f98](https://github.com/paritytech/polkadot-staking-dashboard/commit/89e5f98dd146d4838b9580a857eddfa73090762f))
* **ux:** use secondary accent color for status UI ([#2055](https://github.com/paritytech/polkadot-staking-dashboard/issues/2055)) ([bf16d80](https://github.com/paritytech/polkadot-staking-dashboard/commit/bf16d80a661ca1d1cd0cf038bcff4525fbff19c8))


### Bug Fixes

* Search bar initial value on Pools/Validators page ([#2032](https://github.com/paritytech/polkadot-staking-dashboard/issues/2032)) ([c4749c6](https://github.com/paritytech/polkadot-staking-dashboard/commit/c4749c6e7ca338a9f3fd3299ebb53bbf45c3de07))
25 changes: 25 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## [1.3.0](https://github.com/paritytech/polkadot-staking-dashboard/compare/v1.2.1...v1.3.0) (2024-04-08)


### Features

* Create pool canvas ([#2061](https://github.com/paritytech/polkadot-staking-dashboard/issues/2061)) ([de3ad50](https://github.com/paritytech/polkadot-staking-dashboard/commit/de3ad50ed2eda49a0378a26c22fb8a48fdc9e305))
* Join pool progress bar on performance fetch. ([#2064](https://github.com/paritytech/polkadot-staking-dashboard/issues/2064)) ([e5027ff](https://github.com/paritytech/polkadot-staking-dashboard/commit/e5027fffc3151dbdf0c4b7cce09f37aaeb184971))
* Open `JoinPool` canvas immediately, preloader, prioritise low member pools. ([#2059](https://github.com/paritytech/polkadot-staking-dashboard/issues/2059)) ([5360eaa](https://github.com/paritytech/polkadot-staking-dashboard/commit/5360eaa17ef08b6b602d21967d9174f2eed9cf83))
* Pool performance data to batches. Per-page fetching, pool join subset. ([#2057](https://github.com/paritytech/polkadot-staking-dashboard/issues/2057)) ([965d3e1](https://github.com/paritytech/polkadot-staking-dashboard/commit/965d3e182c77e0b6d46c2d1c603e74a30cd7be92))
* **refactor:** Persist all imported accounts active pools. ([#2066](https://github.com/paritytech/polkadot-staking-dashboard/issues/2066)) ([1a1847d](https://github.com/paritytech/polkadot-staking-dashboard/commit/1a1847deb0d4763b893335293c85dbe8d3f330b1))
* Simple pool join & call to action UI ([#2050](https://github.com/paritytech/polkadot-staking-dashboard/issues/2050)) ([6d04429](https://github.com/paritytech/polkadot-staking-dashboard/commit/6d0442947b4322ec949bbb88e82b24720dce4143))
* Start nominating canvas ([#2062](https://github.com/paritytech/polkadot-staking-dashboard/issues/2062)) ([0208d5f](https://github.com/paritytech/polkadot-staking-dashboard/commit/0208d5fc5658bc375eeef3aa853954c05290796f))
* use `bondedPool.memberCounter`, deprecate `nomination_pool/pool` Subscan call ([#2054](https://github.com/paritytech/polkadot-staking-dashboard/issues/2054)) ([b536faf](https://github.com/paritytech/polkadot-staking-dashboard/commit/b536faf8fc410c8291dea84fa2b96189ab2c8e76))
* **ux:** `JoinPool`: Inline sync for provided pool ([#2067](https://github.com/paritytech/polkadot-staking-dashboard/issues/2067)) ([e146bfc](https://github.com/paritytech/polkadot-staking-dashboard/commit/e146bfcb15df96cd0a10fe1d268e3eab343ef1d1))
* **ux:** Disconnect from extension ([#2069](https://github.com/paritytech/polkadot-staking-dashboard/issues/2069)) ([c5c2ecb](https://github.com/paritytech/polkadot-staking-dashboard/commit/c5c2ecb54d31b59cc4db3bdb20b55e48cc01160a))
* **ux:** Improve Join Pool preloader ([#2063](https://github.com/paritytech/polkadot-staking-dashboard/issues/2063)) ([69d716e](https://github.com/paritytech/polkadot-staking-dashboard/commit/69d716e2e99a6f32e45407362d951352fd6a884f))
* **ux:** Pool display polishes, pre-release fixes ([#2065](https://github.com/paritytech/polkadot-staking-dashboard/issues/2065)) ([89e5f98](https://github.com/paritytech/polkadot-staking-dashboard/commit/89e5f98dd146d4838b9580a857eddfa73090762f))
* **ux:** use secondary accent color for status UI ([#2055](https://github.com/paritytech/polkadot-staking-dashboard/issues/2055)) ([bf16d80](https://github.com/paritytech/polkadot-staking-dashboard/commit/bf16d80a661ca1d1cd0cf038bcff4525fbff19c8))


### Bug Fixes

* Search bar initial value on Pools/Validators page ([#2032](https://github.com/paritytech/polkadot-staking-dashboard/issues/2032)) ([c4749c6](https://github.com/paritytech/polkadot-staking-dashboard/commit/c4749c6e7ca338a9f3fd3299ebb53bbf45c3de07))
* Fixes an issue where Polkagate Snap enablement would also enable other extensions .


## [1.2.1](https://github.com/paritytech/polkadot-staking-dashboard/compare/v1.2.0...v1.2.1) (2024-03-14)

Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"visualizer": "vite-bundle-visualizer"
},
"dependencies": {
"@dotlottie/player-component": "^2.7.10",
"@dotlottie/player-component": "^2.7.12",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-brands-svg-icons": "^6.5.1",
"@fortawesome/free-regular-svg-icons": "^6.5.1",
Expand All @@ -34,24 +34,24 @@
"@polkadot/util-crypto": "^12.6.2",
"@polkawatch/ddp-client": "^2.0.11",
"@substrate/connect": "0.7.35",
"@w3ux/extension-assets": "^0.2.3",
"@w3ux/extension-assets": "0.2.6",
"@w3ux/hooks": "^0.0.3",
"@w3ux/react-connect-kit": "^0.1.2",
"@w3ux/react-connect-kit": "0.1.8",
"@w3ux/react-odometer": "^0.0.3",
"@w3ux/react-polkicon": "^0.0.2",
"@w3ux/utils": "^0.0.2",
"@w3ux/validator-assets": "^0.0.4",
"@zondax/ledger-substrate": "^0.41.3",
"@zondax/ledger-substrate": "^0.41.4",
"bignumber.js": "^9.1.2",
"bn.js": "^5.2.1",
"buffer": "^6.0.3",
"chart.js": "^4.4.2",
"chroma-js": "^2.4.2",
"date-fns": "^3.3.1",
"framer-motion": "^11.0.18",
"framer-motion": "^11.0.24",
"html5-qrcode": "^2.3.8",
"i18next": "^23.10.0",
"i18next-browser-languagedetector": "^7.2.0",
"i18next-browser-languagedetector": "^7.2.1",
"lodash.debounce": "^4.0.8",
"lodash.throttle": "^4.1.1",
"qrcode-generator": "1.4.4",
Expand All @@ -65,20 +65,20 @@
"react-router-dom": "^6.22.3",
"react-scroll": "^1.9.0",
"styled-components": "^6.1.8",
"usehooks-ts": "^3.0.1"
"usehooks-ts": "^3.0.2"
},
"devDependencies": {
"@ledgerhq/logs": "^6.12.0",
"@types/chroma-js": "^2.4.4",
"@types/lodash.debounce": "^4.0.9",
"@types/lodash.throttle": "^4.1.9",
"@types/react": "^18.2.67",
"@types/react-dom": "^18.2.22",
"@types/react": "^18.2.73",
"@types/react-dom": "^18.2.23",
"@types/react-helmet": "^6.1.11",
"@types/react-scroll": "^1.8.10",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.4.0",
"@vitejs/plugin-react-swc": "^3.6.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -94,8 +94,8 @@
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"sass": "^1.72.0",
"typescript": "^5.3.3",
"vite": "^5.2.2",
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vite-bundle-visualizer": "^1.1.0",
"vite-plugin-checker": "^0.6.4",
"vite-plugin-eslint": "^1.8.1",
Expand Down
7 changes: 6 additions & 1 deletion src/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import type { Provider } from 'hooks/withProviders';
import { withProviders } from 'hooks/withProviders';
import { CommunityProvider } from 'contexts/Community';
import { OverlayProvider } from 'kits/Overlay/Provider';
import { JoinPoolsProvider } from 'contexts/Pools/JoinPools';

export const Providers = () => {
const {
Expand All @@ -59,7 +60,10 @@ export const Providers = () => {
[APIProvider, { network }],
VaultAccountsProvider,
LedgerHardwareProvider,
ExtensionsProvider,
[
ExtensionsProvider,
{ options: { chainSafeSnapEnabled: true, polkagateSnapEnabled: true } },
],
[
ExtensionAccountsProvider,
{
Expand Down Expand Up @@ -96,6 +100,7 @@ export const Providers = () => {
FastUnstakeProvider,
PayoutsProvider,
PoolPerformanceProvider,
JoinPoolsProvider,
SetupProvider,
MenuProvider,
TooltipProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Header } from 'library/SetupSteps/Header';
import { MotionContainer } from 'library/SetupSteps/MotionContainer';
import type { SetupStepProps } from 'library/SetupSteps/types';
import { useActiveAccounts } from 'contexts/ActiveAccounts';
import { Roles } from '../../Roles';
import { Roles } from 'pages/Pools/Roles';
import type { PoolProgress } from 'contexts/Setup/types';
import type { PoolRoles as PoolRolesInterface } from 'contexts/Pools/ActivePool/types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { useApi } from 'contexts/Api';
import { useActiveAccounts } from 'contexts/ActiveAccounts';
import { useImportedAccounts } from 'contexts/Connect/ImportedAccounts';
import { SummaryWrapper } from './Wrapper';
import { useOverlay } from 'kits/Overlay/Provider';

export const Summary = ({ section }: SetupStepProps) => {
const { t } = useTranslation('pages');
Expand All @@ -33,11 +34,12 @@ export const Summary = ({ section }: SetupStepProps) => {
networkData: { units, unit },
} = useNetwork();
const { newBatchCall } = useBatchCall();
const { closeCanvas } = useOverlay().canvas;
const { accountHasSigner } = useImportedAccounts();
const { getPoolSetup, removeSetupProgress } = useSetup();
const { activeAccount, activeProxy } = useActiveAccounts();
const { queryPoolMember, addToPoolMembers } = usePoolMembers();
const { queryBondedPool, addToBondedPools } = useBondedPools();
const { activeAccount, activeProxy } = useActiveAccounts();

const poolId = lastPoolId.plus(1);
const setup = getPoolSetup(activeAccount);
Expand Down Expand Up @@ -75,17 +77,20 @@ export const Summary = ({ section }: SetupStepProps) => {
from: activeAccount,
shouldSubmit: true,
callbackInBlock: async () => {
// query and add created pool to bondedPools list
// Close canvas.
closeCanvas();

// Query and add created pool to bondedPools list.
const pool = await queryBondedPool(poolId.toNumber());
addToBondedPools(pool);

// query and add account to poolMembers list
// Query and add account to poolMembers list.
const member = await queryPoolMember(activeAccount);
if (member) {
addToPoolMembers(member);
}

// reset localStorage setup progress
// Reset setup progress.
removeSetupProgress('pool', activeAccount);
},
});
Expand Down
70 changes: 70 additions & 0 deletions src/canvas/CreatePool/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { useTranslation } from 'react-i18next';
import { Element } from 'react-scroll';
import { CardWrapper } from 'library/Card/Wrappers';
import { Nominate } from 'library/SetupSteps/Nominate';
import { Summary } from 'canvas/CreatePool/Summary';
import { Bond } from 'canvas/CreatePool/Bond';
import { PoolName } from 'canvas/CreatePool/PoolName';
import { PoolRoles } from 'canvas/CreatePool/PoolRoles';
import { CanvasFullScreenWrapper, CanvasTitleWrapper } from 'canvas/Wrappers';
import { ButtonPrimary } from 'kits/Buttons/ButtonPrimary';
import { useOverlay } from 'kits/Overlay/Provider';

export const CreatePool = () => {
const { t } = useTranslation();
const { closeCanvas } = useOverlay().canvas;

return (
<CanvasFullScreenWrapper>
<div className="head">
<ButtonPrimary
text={t('pools.back', { ns: 'pages' })}
lg
onClick={() => closeCanvas()}
iconLeft={faTimes}
style={{ marginLeft: '1.1rem' }}
/>
</div>

<CanvasTitleWrapper>
<div className="inner standalone">
<div className="empty"></div>
<div className="standalone">
<div className="title">
<h1>{t('pools.createAPool', { ns: 'pages' })}</h1>
</div>
</div>
</div>
</CanvasTitleWrapper>

<CardWrapper className="canvas">
<Element name="metadata" style={{ position: 'absolute' }} />
<PoolName section={1} />
</CardWrapper>

<CardWrapper className="canvas">
<Element name="nominate" style={{ position: 'absolute' }} />
<Nominate bondFor="pool" section={2} />
</CardWrapper>

<CardWrapper className="canvas">
<Element name="roles" style={{ position: 'absolute' }} />
<PoolRoles section={3} />
</CardWrapper>

<CardWrapper className="canvas">
<Element name="bond" style={{ position: 'absolute' }} />
<Bond section={4} />
</CardWrapper>

<CardWrapper className="canvas">
<Element name="summary" style={{ position: 'absolute' }} />
<Summary section={5} />
</CardWrapper>
</CanvasFullScreenWrapper>
);
};
Loading

0 comments on commit 4e9a3ab

Please sign in to comment.