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 #65 from paritytech/w3f-deploy-1.1.6
Browse files Browse the repository at this point in the history
v1.1.6
  • Loading branch information
miabarbir authored Feb 15, 2024
2 parents f97332d + 3c8ddfd commit b1d4674
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 364 deletions.
30 changes: 30 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## [1.1.5](https://github.com/paritytech/polkadot-staking-dashboard/compare/v1.1.4...v1.1.5) (2024-02-14)

### Features

* **refactor:** Active pools and syncing state redesign ([#1929](https://github.com/paritytech/polkadot-staking-dashboard/issues/1929)) ([d2446e1](https://github.com/paritytech/polkadot-staking-dashboard/commit/d2446e1140fff47424984ec37e6233388b9f542b))
* **refactor:** create pool accounts to hooks ([#1913](https://github.com/paritytech/polkadot-staking-dashboard/issues/1913)) ([42c0638](https://github.com/paritytech/polkadot-staking-dashboard/commit/42c0638f464662e741085966a886bb2fdf00c4b2))
* **refactor:** Hooks to own folder ([#1914](https://github.com/paritytech/polkadot-staking-dashboard/issues/1914)) ([4e46904](https://github.com/paritytech/polkadot-staking-dashboard/commit/4e469041aeafcddd51e2abbc36d2a453529a4bff))
* **refactor:** Menu refresh with mouse-based position ([#1945](https://github.com/paritytech/polkadot-staking-dashboard/issues/1945)) ([bf856d0](https://github.com/paritytech/polkadot-staking-dashboard/commit/bf856d0610a7dc2df844440ea895496e39666148))
* **refactor:** Misc project tidy ups ([#1933](https://github.com/paritytech/polkadot-staking-dashboard/issues/1933)) ([c905258](https://github.com/paritytech/polkadot-staking-dashboard/commit/c905258ddc5587b41febfa4266fd388bf00ee75e))
* **refactor:** nominatons to BalancesController ([78c8300](https://github.com/paritytech/polkadot-staking-dashboard/commit/78c8300dd1046a261dfda888f9d5ac4d0c916e20))
* **refactor:** persist Subscan results to class ([#1942](https://github.com/paritytech/polkadot-staking-dashboard/issues/1942)) ([b6312e6](https://github.com/paritytech/polkadot-staking-dashboard/commit/b6312e60c62daef57f4fe14aaa0cc04db03eeaba))
* **refactor:** Pool memberships to active balances ([#1915](https://github.com/paritytech/polkadot-staking-dashboard/issues/1915)) ([764a880](https://github.com/paritytech/polkadot-staking-dashboard/commit/764a880e0640416a5ad88b69d2e84887624b8f11))
* **refactor:** Syncing improvements ([#1935](https://github.com/paritytech/polkadot-staking-dashboard/issues/1935)) ([61645b1](https://github.com/paritytech/polkadot-staking-dashboard/commit/61645b17cb8efb0a1a72532930583ab2c671c1af))
* **refactor:** Use identities hook ([#1916](https://github.com/paritytech/polkadot-staking-dashboard/issues/1916)) ([f55f70f](https://github.com/paritytech/polkadot-staking-dashboard/commit/f55f70f165a26615ad3046f30ad4ca50ca62ba96))
* **ux:** View & copy pool addresses ([#1941](https://github.com/paritytech/polkadot-staking-dashboard/issues/1941)) ([850c0d9](https://github.com/paritytech/polkadot-staking-dashboard/commit/850c0d9d6c8d8f481a4a5ca59616b7b0ce34b14f))


### Bug Fixes

* stricter member count fetching ([#1911](https://github.com/paritytech/polkadot-staking-dashboard/issues/1911)) ([c453dd1](https://github.com/paritytech/polkadot-staking-dashboard/commit/c453dd1e07016b46425938a26615138d361819de))


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


Expand Down Expand Up @@ -92,6 +114,14 @@
* use ledger square logo ([#1593](https://github.com/paritytech/polkadot-staking-dashboard/issues/1593)) ([badcac5](https://github.com/paritytech/polkadot-staking-dashboard/commit/badcac5c639855519d99f72f63d2efa1465e05eb))
* **ux:** NaN on whole value with format ([021f90b](https://github.com/paritytech/polkadot-staking-dashboard/commit/021f90b138cf109bfa69a8bcef9ac8bcf173f496))

## [1.1.1](https://github.com/paritytech/polkadot-staking-dashboard/compare/v1.1.0...v1.1.1) (2023-10-31)

### Bug Fixes

* Fixes an issue where extensions would not be discovered due to a hanging asynchronous function when Enkrypt, which injects its own window.ethereum object, was enabled.
* Misc theming fix.


## [1.1.0](https://github.com/paritytech/polkadot-staking-dashboard/compare/v1.0.9...v1.1.0) (2023-10-30)


Expand Down
8 changes: 4 additions & 4 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.8",
"@dotlottie/player-component": "^2.7.9",
"@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 @@ -45,7 +45,7 @@
"chart.js": "^4.4.1",
"chroma-js": "^2.4.2",
"date-fns": "^3.3.1",
"framer-motion": "^11.0.3",
"framer-motion": "^11.0.5",
"html5-qrcode": "^2.3.8",
"i18next": "^23.8.2",
"i18next-browser-languagedetector": "^7.2.0",
Expand Down Expand Up @@ -86,13 +86,13 @@
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unused-imports": "^3.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"gh-pages": "^6.1.1",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"sass": "^1.70.0",
"typescript": "^5.3.3",
"vite": "^5.1.1",
"vite": "^5.1.2",
"vite-bundle-visualizer": "^1.0.1",
"vite-plugin-checker": "^0.6.3",
"vite-plugin-eslint": "^1.8.1",
Expand Down
5 changes: 3 additions & 2 deletions src/library/GenerateNominations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,16 @@ export const GenerateNominations = ({
// Update nominations on account switch, or if `defaultNominations` change.
useEffect(() => {
if (
nominations !== defaultNominations.nominations &&
JSON.stringify(nominations) !==
JSON.stringify(defaultNominations.nominations) &&
defaultNominationsCount > 0
) {
setNominations([...(defaultNominations.nominations || [])]);
if (defaultNominationsCount) {
setMethod('manual');
}
}
}, [activeAccount]);
}, [activeAccount, defaultNominations]);

// refetch if fetching is triggered
useEffect(() => {
Expand Down
42 changes: 21 additions & 21 deletions src/library/ValidatorList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,6 @@ export const ValidatorListInner = ({
ListItemsPerPage
);

// Reset list when validator list changes.
useEffect(() => {
if (alwaysRefetchValidators) {
if (
JSON.stringify(initialValidators.map((v) => v.address)) !==
JSON.stringify(validatorsDefault.map((v) => v.address))
) {
setFetched(false);
}
} else {
setFetched(false);
}
}, [initialValidators, nominator]);

// handle filter / order update
const handleValidatorsFilterUpdate = (
filteredValidators = Object.assign(validatorsDefault)
Expand Down Expand Up @@ -251,6 +237,13 @@ export const ValidatorListInner = ({
setSearchTerm('validators', newValue);
};

// Handle validator list bootstrapping.
const setupValidatorList = () => {
setValidatorsDefault(prepareInitialValidators());
setValidators(prepareInitialValidators());
setFetched(true);
};

// Set default filters. Should re-render if era stakers re-syncs as era points effect the
// performance order.
useEffect(() => {
Expand Down Expand Up @@ -286,19 +279,26 @@ export const ValidatorListInner = ({
};
}, [syncing]);

// Handle validator list bootstrapping.
const setupValidatorList = () => {
setValidatorsDefault(prepareInitialValidators());
setValidators(prepareInitialValidators());
setFetched(true);
};
// Reset list when validator list changes.
useEffect(() => {
if (alwaysRefetchValidators) {
if (
JSON.stringify(initialValidators.map((v) => v.address)) !==
JSON.stringify(validatorsDefault.map((v) => v.address))
) {
setFetched(false);
}
} else {
setFetched(false);
}
}, [initialValidators, nominator]);

// Configure validator list when network is ready to fetch.
useEffect(() => {
if (isReady && isNotZero(activeEra.index)) {
setupValidatorList();
}
}, [isReady, activeEra.index, syncing]);
}, [isReady, activeEra.index, syncing, fetched]);

// Control render throttle.
useEffect(() => {
Expand Down
Loading

0 comments on commit b1d4674

Please sign in to comment.