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

v1.1.5 #64

Merged
merged 53 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
efdbb47
chore(main): release 1.1.4 (#1859)
github-actions[bot] Jan 29, 2024
633abe5
chore(deps): bump i18next from 23.7.20 to 23.8.1 (#1907)
dependabot[bot] Jan 29, 2024
04d3f73
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 6.19.1 to…
dependabot[bot] Jan 29, 2024
9010e28
chore(deps-dev): bump @typescript-eslint/parser from 6.19.1 to 6.20.0…
dependabot[bot] Jan 29, 2024
5256591
chore(deps-dev): bump vite-bundle-visualizer from 1.0.0 to 1.0.1 (#1910)
dependabot[bot] Jan 30, 2024
c453dd1
fix: stricter member count fetching (#1911)
Jan 31, 2024
42c0638
feat(refactor): create pool accounts to hooks (#1913)
Jan 31, 2024
4e46904
feat(refactor): Hooks to own folder (#1914)
Jan 31, 2024
764a880
feat(refactor): Pool memberships to active balances (#1915)
Jan 31, 2024
f55f70f
feat(refactor): Use identities hook (#1916)
Jan 31, 2024
ca23775
chore(deps): bump @ledgerhq/hw-transport-webhid from 6.28.2 to 6.28.3…
dependabot[bot] Jan 31, 2024
e4d1a30
chore(deps-dev): bump @vitejs/plugin-react-swc from 3.5.0 to 3.6.0 (#…
dependabot[bot] Jan 31, 2024
457b95a
chore(deps): bump i18next from 23.8.1 to 23.8.2 (#1919)
dependabot[bot] Jan 31, 2024
9324073
chore(deps-dev): bump vite-plugin-checker from 0.6.2 to 0.6.3 (#1920)
dependabot[bot] Jan 31, 2024
02104f4
chore(deps): bump usehooks-ts from 2.10.0 to 2.11.0 (#1921)
dependabot[bot] Jan 31, 2024
ba15327
chore: add peer dep
Feb 1, 2024
58b5856
chore: remove unused hook
Feb 1, 2024
654352f
chore(deps): bump usehooks-ts from 2.11.0 to 2.12.1 (#1922)
dependabot[bot] Feb 1, 2024
e7684eb
chore(deps): bump react-router-dom from 6.21.3 to 6.22.0 (#1923)
dependabot[bot] Feb 1, 2024
8530103
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 6.20.0 to…
dependabot[bot] Feb 5, 2024
bcd1053
chore(deps): bump react-i18next from 14.0.1 to 14.0.3 (#1925)
dependabot[bot] Feb 5, 2024
1a3b873
chore(deps-dev): bump prettier from 3.2.4 to 3.2.5 (#1926)
dependabot[bot] Feb 5, 2024
bfb8ae1
chore(deps-dev): bump @typescript-eslint/parser from 6.20.0 to 6.21.0…
dependabot[bot] Feb 5, 2024
f4ddbe4
chore(deps-dev): bump @types/react from 18.2.51 to 18.2.54 (#1927)
dependabot[bot] Feb 5, 2024
d2446e1
feat(refactor): Active pools and syncing state redesign (#1929)
Feb 6, 2024
9145cb8
chore(deps): bump react-i18next from 14.0.3 to 14.0.5 (#1930)
dependabot[bot] Feb 6, 2024
75384eb
chore(deps): bump usehooks-ts from 2.12.1 to 2.13.0 (#1931)
dependabot[bot] Feb 6, 2024
3ee2589
chore(deps-dev): bump @types/react from 18.2.54 to 18.2.55 (#1932)
dependabot[bot] Feb 6, 2024
c905258
feat(refactor): Misc project tidy ups (#1933)
Feb 7, 2024
bb17e88
chore: fix onClick
Feb 7, 2024
070dca4
chore: amend tsconfig
Feb 7, 2024
3bbde20
chore(deps-dev): bump @types/react-dom from 18.2.18 to 18.2.19 (#1934)
dependabot[bot] Feb 7, 2024
61645b1
feat(refactor): Syncing improvements (#1935)
Feb 8, 2024
1910616
chore: add Provider type
Feb 8, 2024
6745186
chore: comment
Feb 8, 2024
00b5d6c
chore(deps-dev): bump vite from 5.0.12 to 5.1.0 (#1936)
dependabot[bot] Feb 8, 2024
05923ab
chore(deps-dev): bump @types/chroma-js from 2.4.3 to 2.4.4 (#1937)
dependabot[bot] Feb 8, 2024
af53aff
chore(deps-dev): bump vite from 5.1.0 to 5.1.1 (#1939)
dependabot[bot] Feb 9, 2024
b8ed792
chore(deps): bump usehooks-ts from 2.13.0 to 2.14.0 (#1940)
dependabot[bot] Feb 9, 2024
37d2377
chore: rm deprecated StakingProvider values
Feb 10, 2024
c6a293a
Merge branch 'main' of https://github.com/paritytech/polkadot-staking…
Feb 10, 2024
9c49bf5
chore: remove unused SetupProvider value
Feb 10, 2024
850c0d9
feat(ux): View & copy pool addresses (#1941)
Feb 11, 2024
d40c148
chore: sync tidy up
Feb 11, 2024
78c8300
feat(refactor): nominatons to BalancesController
Feb 11, 2024
b6312e6
feat(refactor): persist Subscan results to class (#1942)
Feb 11, 2024
607ec6d
chore: fix unlock values
Feb 11, 2024
b168bdd
chore: remove unsub code
Feb 11, 2024
bf856d0
feat(refactor): Menu refresh with mouse-based position (#1945)
Feb 13, 2024
9b0de22
chore: bumps
Feb 13, 2024
78f99a4
Merge branch 'main' into w3f-deploy-1.1.5
Feb 13, 2024
57b2434
fix import
Feb 13, 2024
4406273
fix changelog
Feb 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ podman run --d -p 8080:80 localhost/polkadot-staking-dashboard
```

<!-- markdown-link-check-disable -->

And access the **Staking Dashboard** at http://localhost:8080/.

<!-- markdown-link-check-enable-->

## Presentations
Expand Down
9 changes: 7 additions & 2 deletions check-markdown-links-config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"httpHeaders": [
{
"urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"],
"urls": [
"https://github.com/",
"https://guides.github.com/",
"https://help.github.com/",
"https://docs.github.com/"
],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}
]
}
}
26 changes: 26 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## [1.1.4](https://github.com/paritytech/polkadot-staking-dashboard/compare/v1.1.3...v1.1.4) (2024-01-28)


### Features

* **ci:** add markdown-link-check ([#1865](https://github.com/paritytech/polkadot-staking-dashboard/issues/1865)) ([7e7134e](https://github.com/paritytech/polkadot-staking-dashboard/commit/7e7134ea2a42ec56d095e0809a4eaa05f94ad793))
* **fix:** account for staking rate in average reward rate ([#1886](https://github.com/paritytech/polkadot-staking-dashboard/issues/1886)) ([9938620](https://github.com/paritytech/polkadot-staking-dashboard/commit/9938620ee417bd42761a6e63828e3dd3ab8e7ee2))
* **refacor:** Pool config to bootstrap app state ([#1900](https://github.com/paritytech/polkadot-staking-dashboard/issues/1900)) ([8f51a86](https://github.com/paritytech/polkadot-staking-dashboard/commit/8f51a8672b843b7cd7172144e2157148d03325ca))
* **refactor:** Move balance syncing to static class, `activeBalances` in UI only. ([#1858](https://github.com/paritytech/polkadot-staking-dashboard/issues/1858)) ([a372487](https://github.com/paritytech/polkadot-staking-dashboard/commit/a3724879f377c38baf0e9b04e03749e0e2f65ee0))
* **refactor:** Move Polkawatch to inline instantiation ([#1890](https://github.com/paritytech/polkadot-staking-dashboard/issues/1890)) ([d7b88bd](https://github.com/paritytech/polkadot-staking-dashboard/commit/d7b88bd57701c16ad143a6e2b70897b5086f82f6))
* **refactor:** Move staking metrics `payee` to active balances ([#1904](https://github.com/paritytech/polkadot-staking-dashboard/issues/1904)) ([7b692e0](https://github.com/paritytech/polkadot-staking-dashboard/commit/7b692e06006448604929ec23fe510a7c7492141b))
* **refactor:** network metrics to static, bootstrap all state before subscribe ([#1896](https://github.com/paritytech/polkadot-staking-dashboard/issues/1896)) ([08a813c](https://github.com/paritytech/polkadot-staking-dashboard/commit/08a813c7d47d2055984f7d32c1d8b34bec9791f4))
* **refactor:** remove unneeded bonded getters ([7108e55](https://github.com/paritytech/polkadot-staking-dashboard/commit/7108e55d3f1aeeb07cdaa7cdb5608425b0d6641a))
* **refactor:** rm `ExtrinsicsProvider`, nonces to `TxMeta` ([4194150](https://github.com/paritytech/polkadot-staking-dashboard/commit/41941509cb0d930d53f3fc98a12736b0356c6846))
* **refactor:** Staking metrics to bootstrap and API ([#1905](https://github.com/paritytech/polkadot-staking-dashboard/issues/1905)) ([f6c0b93](https://github.com/paritytech/polkadot-staking-dashboard/commit/f6c0b93fc5fcaf2961c91cdeae770d5503766fe8))
* **refactor:** Subscan refactor, remove fetching from Providers ([#1878](https://github.com/paritytech/polkadot-staking-dashboard/issues/1878)) ([57e2a1b](https://github.com/paritytech/polkadot-staking-dashboard/commit/57e2a1bed952b41441635dc9eba02b79d63d3fc0))


### Bug Fixes

* balances no accounts sync ([#1889](https://github.com/paritytech/polkadot-staking-dashboard/issues/1889)) ([5316283](https://github.com/paritytech/polkadot-staking-dashboard/commit/5316283029f9a28003bb25814623f768f3294fb8))
* Render safe guards, pool useEffect fixes ([#1906](https://github.com/paritytech/polkadot-staking-dashboard/issues/1906)) ([7c0212f](https://github.com/paritytech/polkadot-staking-dashboard/commit/7c0212f428e56b2eba9c735a6299c3661dd47b25))
* roll back Substrate Connect ([#1899](https://github.com/paritytech/polkadot-staking-dashboard/issues/1899)) ([33b5671](https://github.com/paritytech/polkadot-staking-dashboard/commit/33b5671caf5ec09240e164e82618efb15deebe81))
* unlock Chunk unit type ([afe9b1c](https://github.com/paritytech/polkadot-staking-dashboard/commit/afe9b1c0256eb9840a375f1d7574895a07ba0f4a))


## [1.1.3](https://github.com/paritytech/polkadot-staking-dashboard/compare/v1.1.2...v1.1.3) (2024-01-15)


Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Going from the top-most component, the component hierarchy is set up as follows:

- `src/index.tsx`: DOM render, of little interest.
- `src/App.tsx`: wraps `<App />` in the theme provider context and determines the active network from local storage.
- `src/Providers.tsx`: imports and wraps `<Router />` with all the contexts using a withProviders hook. We also wrap styled component's theme provider context here to make the theme configuration work.
- `src/Providers.tsx`: imports and wraps `<Router />` with all the contexts using a `withProviders` hook. We also wrap styled component's theme provider context here to make the theme configuration work.
- `src/Router.tsx`: contains react router `<Route>`'s, in addition to the major app presentational components.

## Development Patterns
Expand Down
32 changes: 17 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@fortawesome/free-regular-svg-icons": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@ledgerhq/hw-transport-webhid": "^6.28.2",
"@ledgerhq/hw-transport-webhid": "^6.28.3",
"@polkadot-cloud/assets": "^0.3.4",
"@polkadot-cloud/core": "^1.2.4",
"@polkadot-cloud/react": "^0.3.8",
Expand All @@ -47,8 +47,9 @@
"date-fns": "^3.3.1",
"framer-motion": "^11.0.3",
"html5-qrcode": "^2.3.8",
"i18next": "^23.7.20",
"i18next": "^23.8.2",
"i18next-browser-languagedetector": "^7.2.0",
"lodash.debounce": "^4.0.8",
"lodash.throttle": "^4.1.1",
"qrcode-generator": "1.4.4",
"rc-slider": "^10.5.0",
Expand All @@ -57,24 +58,25 @@
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.12",
"react-helmet": "^6.1.0",
"react-i18next": "^14.0.1",
"react-router-dom": "^6.21.3",
"react-i18next": "^14.0.5",
"react-router-dom": "^6.22.0",
"react-scroll": "^1.9.0",
"styled-components": "^6.1.8",
"usehooks-ts": "2.10.0"
"usehooks-ts": "2.14.0"
},
"devDependencies": {
"@ledgerhq/logs": "^6.12.0",
"@types/chroma-js": "^2.4.3",
"@types/chroma-js": "^2.4.4",
"@types/lodash.debounce": "^4",
"@types/lodash.throttle": "^4.1.9",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.17",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/react-helmet": "^6.1.11",
"@types/react-scroll": "^1.8.10",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@vitejs/plugin-react-swc": "^3.5.0",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"@vitejs/plugin-react-swc": "^3.6.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
Expand All @@ -86,13 +88,13 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unused-imports": "^3.0.0",
"gh-pages": "^6.1.1",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"sass": "^1.70.0",
"typescript": "^5.3.3",
"vite": "^5.0.12",
"vite-bundle-visualizer": "^1.0.0",
"vite-plugin-checker": "^0.6.2",
"vite": "^5.1.1",
"vite-bundle-visualizer": "^1.0.1",
"vite-plugin-checker": "^0.6.3",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.1",
Expand Down
32 changes: 11 additions & 21 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,20 @@

import type { FC } from 'react';
import { I18nextProvider } from 'react-i18next';
import { DefaultNetwork } from 'consts';
import { ThemesProvider } from 'contexts/Themes';
import { i18next } from 'locale';
import { Providers } from 'Providers';
import { NetworkProvider } from 'contexts/Network';
import { ActiveAccountsProvider } from 'contexts/ActiveAccounts';

export const App: FC = () => {
let network = localStorage.getItem('network');

if (network === null) {
network = DefaultNetwork;
localStorage.setItem('network', network);
}

return (
<I18nextProvider i18n={i18next}>
<ThemesProvider>
<NetworkProvider>
<ActiveAccountsProvider>
<Providers />
</ActiveAccountsProvider>
</NetworkProvider>
</ThemesProvider>
</I18nextProvider>
);
};
export const App: FC = () => (
<I18nextProvider i18n={i18next}>
<ThemesProvider>
<NetworkProvider>
<ActiveAccountsProvider>
<Providers />
</ActiveAccountsProvider>
</NetworkProvider>
</ThemesProvider>
</I18nextProvider>
);
26 changes: 26 additions & 0 deletions src/Page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2023 @paritytech/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import { useNetwork } from 'contexts/Network';
import { Helmet } from 'react-helmet';
import type { PageItem } from 'types';
import { Page as PageWrapper } from '@polkadot-cloud/react';
import { useTranslation } from 'react-i18next';

export const Page = ({ page }: { page: PageItem }) => {
const { t } = useTranslation();
const { network } = useNetwork();
const { Entry, key } = page;

return (
<PageWrapper>
<Helmet>
<title>{`${t(key, { ns: 'base' })} : ${t('title', {
context: `${network}`,
ns: 'base',
})}`}</title>
</Helmet>
<Entry page={page} />
</PageWrapper>
);
};
26 changes: 11 additions & 15 deletions src/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ import { FiltersProvider } from 'contexts/Filters';
import { LedgerHardwareProvider } from 'contexts/Hardware/Ledger/LedgerHardware';
import { VaultAccountsProvider } from 'contexts/Hardware/Vault/VaultAccounts';
import { HelpProvider } from 'contexts/Help';
import { IdentitiesProvider } from 'contexts/Identities';
import { MenuProvider } from 'contexts/Menu';
import { MigrateProvider } from 'contexts/Migrate';
import { PromptProvider } from 'contexts/Prompt';
import { PluginsProvider } from 'contexts/Plugins';
import { ActivePoolsProvider } from 'contexts/Pools/ActivePools';
import { ActivePoolProvider } from 'contexts/Pools/ActivePool';
import { BondedPoolsProvider } from 'contexts/Pools/BondedPools';
import { PoolMembersProvider } from 'contexts/Pools/PoolMembers';
import { PoolMembershipsProvider } from 'contexts/Pools/PoolMemberships';
import { PoolsConfigProvider } from 'contexts/Pools/PoolsConfig';
import { FavoritePoolsProvider } from 'contexts/Pools/FavoritePools';
import { ProxiesProvider } from 'contexts/Proxies';
import { SetupProvider } from 'contexts/Setup';
import { StakingProvider } from 'contexts/Staking';
Expand All @@ -37,27 +35,27 @@ import { PayoutsProvider } from 'contexts/Payouts';
import { useNetwork } from 'contexts/Network';
import { APIProvider } from 'contexts/Api';
import { ThemedRouter } from 'Themes';
import type { AnyJson } from 'types';
import type { FC } from 'react';
import { withProviders } from 'library/Hooks';
import { OtherAccountsProvider } from 'contexts/Connect/OtherAccounts';
import { useActiveAccounts } from 'contexts/ActiveAccounts';
import { DappName } from 'consts';
import { ImportedAccountsProvider } from 'contexts/Connect/ImportedAccounts';
import { PoolPerformanceProvider } from 'contexts/Pools/PoolPerformance';
import { registerSaEvent } from 'Utils';
import { ExternalAccountsProvider } from 'contexts/Connect/ExternalAccounts';
import type { Provider } from 'hooks/withProviders';
import { withProviders } from 'hooks/withProviders';
import { CommunityProvider } from 'contexts/Community';

// Embed providers from hook.
export const Providers = () => {
const {
network,
networkData: { ss58 },
} = useNetwork();
const { activeAccount, setActiveAccount } = useActiveAccounts();

// !! Provider order matters
const providers: (FC<AnyJson> | [FC<AnyJson>, AnyJson])[] = [
// !! Provider order matters.
const providers: Provider[] = [
UIProvider,
[APIProvider, { network }],
VaultAccountsProvider,
LedgerHardwareProvider,
Expand Down Expand Up @@ -85,22 +83,19 @@ export const Providers = () => {
ProxiesProvider,
HelpProvider,
PluginsProvider,
IdentitiesProvider,
BondedProvider,
BalancesProvider,
StakingProvider,
PoolsConfigProvider,
FavoritePoolsProvider,
BondedPoolsProvider,
PoolMembershipsProvider,
PoolMembersProvider,
ActivePoolsProvider,
ActivePoolProvider,
TransferOptionsProvider,
ValidatorsProvider,
FavoriteValidatorsProvider,
FastUnstakeProvider,
PayoutsProvider,
PoolPerformanceProvider,
UIProvider,
SetupProvider,
MenuProvider,
TooltipProvider,
Expand All @@ -109,6 +104,7 @@ export const Providers = () => {
PromptProvider,
MigrateProvider,
FiltersProvider,
CommunityProvider,
];

return withProviders(providers, ThemedRouter);
Expand Down
Loading