API updates with exposures (#2845)

* API updates with exposures

* Rewrite yarn.lock
This commit is contained in:
Jaco Greeff 2020-05-28 13:38:10 +02:00 committed by GitHub
parent 9a89b37a74
commit 644bfb00b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 1040 additions and 1028 deletions

View File

@ -28,10 +28,10 @@
}
},
"resolutions": {
"@polkadot/api": "^1.16.1",
"@polkadot/api-contract": "^1.16.1",
"@polkadot/api": "^1.17.0-beta.5",
"@polkadot/api-contract": "^1.17.0-beta.5",
"@polkadot/keyring": "^2.11.1",
"@polkadot/types": "^1.16.1",
"@polkadot/types": "^1.17.0-beta.5",
"@polkadot/util": "^2.11.1",
"@polkadot/util-crypto": "^2.11.1",
"babel-core": "^7.0.0-bridge.0"
@ -71,18 +71,18 @@
"start:electron": "yarn clean:electronBuild && concurrently 'yarn build:devElectronMain && cd packages/apps-electron && electron ./build/electron.js' 'yarn build:devElectronRenderer'"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@babel/register": "^7.9.0",
"@babel/runtime": "^7.9.6",
"@babel/core": "^7.10.1",
"@babel/register": "^7.10.1",
"@babel/runtime": "^7.10.1",
"@pinata/sdk": "^1.1.9",
"@polkadot/dev": "^0.54.1",
"@polkadot/ts": "^0.3.23",
"@polkadot/dev": "^0.54.2",
"@polkadot/ts": "^0.3.24",
"@types/bn.js": "^4.11.6",
"@types/chart.js": "^2.9.21",
"@types/file-saver": "^2.0.1",
"@types/i18next": "^13.0.0",
"@types/jest": "^25.2.3",
"@types/react-beautiful-dnd": "^12.1.2",
"@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",
@ -101,7 +101,7 @@
"stylelint": "^13.5.0",
"stylelint-config-recommended": "^3.0.0",
"stylelint-config-styled-components": "^0.1.1",
"terser-webpack-plugin": "^3.0.1",
"terser-webpack-plugin": "^3.0.2",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11",
"webpack-merge": "^4.2.2",

View File

@ -11,7 +11,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"edgeware-node-types": "^2.1.0"
}
}

View File

@ -4,8 +4,8 @@
"private": true,
"version": "0.44.0-beta.12",
"dependencies": {
"@babel/polyfill": "^7.8.7",
"@polkadot/dev": "^0.54.1",
"@babel/polyfill": "^7.10.1",
"@polkadot/dev": "^0.54.2",
"@polkadot/react-components": "0.44.0-beta.12"
},
"devDependencies": {

View File

@ -11,6 +11,6 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6"
"@babel/runtime": "^7.10.1"
}
}

View File

@ -13,9 +13,9 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/polyfill": "^7.8.7",
"@babel/runtime": "^7.9.6",
"@polkadot/dev": "^0.54.1",
"@babel/polyfill": "^7.10.1",
"@babel/runtime": "^7.10.1",
"@polkadot/dev": "^0.54.2",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-signer": "0.44.0-beta.12",
"query-string": "^6.12.1"

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -11,7 +11,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-qr": "^0.54.0-beta.3",
"@polkadot/vanitygen": "^0.13.1",

View File

@ -12,7 +12,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"secp256k1": "^3.8.0"
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@polkadot/api-contract": "^1.16.1"
"@babel/runtime": "^7.10.1",
"@polkadot/api-contract": "^1.17.0-beta.5"
}
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-query": "0.44.0-beta.12"
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/apps-routing": "0.44.0-beta.12",
"@polkadot/react-components": "0.44.0-beta.12"
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-query": "0.44.0-beta.12"
}

View File

@ -11,7 +11,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -11,7 +11,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-params": "0.44.0-beta.12",
"@polkadot/react-signer": "0.44.0-beta.12"

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-query": "0.44.0-beta.12"
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/apps-config": "0.44.0-beta.12",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-query": "0.44.0-beta.12",

View File

@ -8,7 +8,7 @@
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/app-explorer": "0.44.0-beta.12",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-query": "0.44.0-beta.12"

View File

@ -50,7 +50,7 @@ function ChartStake ({ validatorId }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
const { api } = useApi();
const [{ chart, labels }, setChart] = useState<ChartInfo>({ chart: [], labels: [] });
const ownExposure = useCall<DeriveOwnExposure[]>(api.derive.staking.ownExposure, [validatorId, true]);
const ownExposures = useCall<DeriveOwnExposure[]>(api.derive.staking.ownExposures, [validatorId, true]);
const { currency, divisor } = useMemo((): { currency: string; divisor: BN } => ({
currency: formatBalance.getDefaults().unit,
divisor: new BN('1'.padEnd(formatBalance.getDefaults().decimals + 1, '0'))
@ -62,10 +62,10 @@ function ChartStake ({ validatorId }: Props): React.ReactElement<Props> {
], [currency, t]);
useEffect((): void => {
ownExposure && setChart(
extractStake(ownExposure, divisor)
ownExposures && setChart(
extractStake(ownExposures, divisor)
);
}, [divisor, ownExposure]);
}, [divisor, ownExposures]);
return (
<div className='staking--Chart'>

View File

@ -11,7 +11,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-params": "0.44.0-beta.12"
}

View File

@ -12,7 +12,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -11,7 +11,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-query": "0.44.0-beta.12"
}

View File

@ -11,7 +11,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -12,7 +12,7 @@
],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-query": "0.44.0-beta.12"
}

View File

@ -30,8 +30,8 @@
},
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@polkadot/api": "^1.16.1",
"@babel/runtime": "^7.10.1",
"@polkadot/api": "^1.17.0-beta.5",
"@polkadot/extension-dapp": "^0.26.0-beta.6",
"rxjs-compat": "^6.5.5"
}

View File

@ -10,7 +10,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/keyring": "^2.11.1",
"@polkadot/react-api": "0.44.0-beta.12",
"@polkadot/react-identicon": "^0.54.0-beta.3",
@ -19,7 +19,7 @@
"@polkadot/ui-settings": "^0.54.0-beta.3",
"chart.js": "^2.9.3",
"codeflask": "^1.4.1",
"i18next": "^19.4.4",
"i18next": "^19.4.5",
"i18next-browser-languagedetector": "^4.2.0",
"react": "^16.13.1",
"react-beautiful-dnd": "^13.0.0",

View File

@ -30,7 +30,7 @@
},
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"memoizee": "^0.4.14"
},
"devDependencies": {

View File

@ -10,7 +10,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12"
}
}

View File

@ -30,6 +30,6 @@
},
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
"dependencies": {
"@babel/runtime": "^7.9.6"
"@babel/runtime": "^7.10.1"
}
}

View File

@ -10,7 +10,7 @@
"contributors": [],
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.9.6",
"@babel/runtime": "^7.10.1",
"@polkadot/react-components": "0.44.0-beta.12",
"@polkadot/react-qr": "^0.54.0-beta.3"
}

1966
yarn.lock

File diff suppressed because it is too large Load Diff