* Bump deps

* Rewrite
This commit is contained in:
Jaco Greeff 2019-12-05 13:18:38 +01:00 committed by GitHub
parent ad4752dd68
commit c0b9451b78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 370 additions and 405 deletions

View File

@ -10,14 +10,14 @@
"packages/*"
],
"resolutions": {
"@polkadot/api": "^0.99.0-beta.0",
"@polkadot/api-contract": "^0.99.0-beta.0",
"@polkadot/api": "^0.99.0-beta.1",
"@polkadot/api-contract": "^0.99.0-beta.1",
"@polkadot/keyring": "^1.7.1",
"@polkadot/types": "^0.99.0-beta.0",
"@polkadot/types": "^0.99.0-beta.1",
"@polkadot/util": "^1.7.1",
"@polkadot/util-crypto": "^1.7.1",
"babel-core": "^7.0.0-bridge.0",
"typescript": "^3.7.2"
"typescript": "^3.7.3"
},
"scripts": {
"analyze": "yarn run build && cd packages/apps && yarn run source-map-explorer build/main.*.js",
@ -36,8 +36,8 @@
"devDependencies": {
"@babel/core": "^7.7.4",
"@babel/runtime": "^7.7.4",
"@polkadot/dev-react": "^0.32.0-beta.15",
"@polkadot/ts": "^0.1.86",
"@polkadot/dev-react": "^0.32.0-beta.16",
"@polkadot/ts": "^0.1.87",
"autoprefixer": "^9.7.1",
"empty": "^0.10.1",
"html-loader": "^0.5.5",

View File

@ -12,7 +12,7 @@
"dependencies": {
"@babel/runtime": "^7.7.4",
"@polkadot/react-components": "^0.38.0-beta.35",
"@polkadot/react-qr": "^0.47.1",
"@polkadot/react-qr": "^0.48.0-beta.0",
"@types/file-saver": "^2.0.0",
"@types/yargs": "^13.0.2",
"babel-plugin-module-resolver": "^3.1.1",

View File

@ -11,7 +11,7 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.7.4",
"@polkadot/api-contract": "^0.99.0-beta.0",
"@polkadot/api-contract": "^0.99.0-beta.1",
"@polkadot/react-components": "^0.38.0-beta.35"
}
}

View File

@ -31,7 +31,7 @@ interface State {
validatorPayment: BN;
}
const COMM_MUL = new BN(10000000);
const COMM_MUL = new BN(10_000_000);
const MAX_COMM = new BN(100);
class Validate extends TxComponent<Props, State> {

View File

@ -74,7 +74,7 @@ function Address ({ address, authorsMap, className, filter, hasQueries, isElecte
setStakingState({
commission: commission
? `${(commission.toNumber() / 10000000).toFixed(2)}%`
? `${(commission.toNumber() / 10_000_000).toFixed(2)}%`
: undefined,
controllerId: controllerId?.toString(),
hasNominators: nominators.length !== 0,

View File

@ -78,7 +78,7 @@ function extractSplit (values: [Hash, Exposure][], validatorId: string): SplitDa
.map(({ accountId, isOwn, value }): SplitEntry => ({
colors: isOwn ? COLORS_MINE : COLORS_OTHER,
label: toShortAddress(accountId),
value: value.muln(10000).div(total).toNumber() / 100
value: value.muln(10_000).div(total).toNumber() / 100
}));
}

View File

@ -38,7 +38,7 @@ function Summary ({ lastReward, t, totalStaked }: Props): React.ReactElement<Pro
useEffect((): void => {
if (totalInsurance && totalStaked?.gtn(0)) {
setStakeInfo({
percentage: `${(totalStaked.muln(10000).div(totalInsurance).toNumber() / 100).toFixed(2)}%`,
percentage: `${(totalStaked.muln(10_000).div(totalInsurance).toNumber() / 100).toFixed(2)}%`,
staked: totalStaked.toString()
});
}

View File

@ -19,7 +19,7 @@ import translate from '../translate';
import Summary from './Summary';
import Validator from './Validator';
const PERBILL = new BN(1000000000);
const PERBILL = new BN(1_000_000_000);
interface Props extends I18nProps, ComponentProps {
}
@ -141,7 +141,7 @@ function Targets ({ className, sessionRewards, t }: Props): React.ReactElement<P
isFavorite: favorites.includes(key),
isNominating,
key,
commissionPer: (((prefs as ValidatorPrefs).commission?.unwrap() || new BN(0)).muln(10000).div(PERBILL).toNumber() / 100),
commissionPer: (((prefs as ValidatorPrefs).commission?.unwrap() || new BN(0)).muln(10_000).div(PERBILL).toNumber() / 100),
numNominators: exposure.others.length,
rankBonded: 0,
rankOverall: 0,

View File

@ -16,7 +16,7 @@
"@babel/runtime": "^7.7.4",
"@polkadot/react-components": "^0.38.0-beta.35",
"@polkadot/react-signer": "^0.38.0-beta.35",
"@polkadot/ui-assets": "^0.47.1",
"@polkadot/ui-assets": "^0.48.0-beta.0",
"query-string": "^6.8.3"
}
}

View File

@ -31,8 +31,8 @@
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
"dependencies": {
"@babel/runtime": "^7.7.4",
"@polkadot/api": "^0.99.0-beta.0",
"@polkadot/extension-dapp": "^0.14.0-beta.6",
"@polkadot/api": "^0.99.0-beta.1",
"@polkadot/extension-dapp": "^0.14.0-beta.7",
"edgeware-node-types": "^1.0.10",
"rxjs-compat": "^6.5.3"
}

View File

@ -13,10 +13,10 @@
"@babel/runtime": "^7.7.4",
"@polkadot/keyring": "^1.7.1",
"@polkadot/react-api": "^0.38.0-beta.35",
"@polkadot/react-identicon": "^0.47.1",
"@polkadot/react-identicon": "^0.48.0-beta.0",
"@polkadot/react-query": "^0.38.0-beta.35",
"@polkadot/ui-keyring": "^0.47.1",
"@polkadot/ui-settings": "^0.47.1",
"@polkadot/ui-keyring": "^0.48.0-beta.0",
"@polkadot/ui-settings": "^0.48.0-beta.0",
"@types/chart.js": "^2.8.10",
"@types/i18next": "^13.0.0",
"@types/react-copy-to-clipboard": "^4.3.0",

View File

@ -42,7 +42,7 @@ export interface ValidatorPrefsType {
validatorPayment?: boolean;
}
const PERBILL = new BN(1000000000);
const PERBILL = new BN(1_000_000_000);
interface Props extends BareProps, I18nProps {
address: string;
@ -228,7 +228,7 @@ function renderValidatorPrefs ({ stakingInfo, t, withValidatorPrefs = false }: P
: (
<>
<Label label={t('commission')} />
<span>{(stakingInfo.validatorPrefs.commission.unwrap().muln(10000).div(PERBILL).toNumber() / 100).toFixed(2)}%</span>
<span>{(stakingInfo.validatorPrefs.commission.unwrap().muln(10_000).div(PERBILL).toNumber() / 100).toFixed(2)}%</span>
</>
)
)}

View File

@ -37,7 +37,7 @@ interface FileState {
const BYTE_STR_0 = '0'.charCodeAt(0);
const BYTE_STR_X = 'x'.charCodeAt(0);
const NOOP = (): void => {};
const NOOP = (): void => undefined;
function convertResult (result: ArrayBuffer, convertHex?: boolean): Uint8Array {
const data = new Uint8Array(result);

View File

@ -26,7 +26,7 @@ export interface Props extends I18nProps {
withConstructors?: boolean;
}
const NOOP = (): void => {};
const NOOP = (): void => undefined;
function onSelect (props: Props, messageIndex: number): () => void {
return function (): void {

View File

@ -7,7 +7,9 @@ import { FormProps } from '@polkadot/react-components/types';
import { useRef } from 'react';
export default function useForm (onSubmit: () => void, onCancel: () => void = (): void => {}): FormProps {
const EMPTY_CALLBACK = (): void => undefined;
export default function useForm (onSubmit: () => void, onCancel: () => void = EMPTY_CALLBACK): FormProps {
const onCancelRef = useRef<Button$OnClick>(onCancel);
const onSubmitRef = useRef<Button$OnClick>(onSubmit);

View File

@ -12,6 +12,6 @@
"dependencies": {
"@babel/runtime": "^7.7.4",
"@polkadot/react-components": "^0.38.0-beta.35",
"@polkadot/react-qr": "^0.47.1"
"@polkadot/react-qr": "^0.48.0-beta.0"
}
}

721
yarn.lock

File diff suppressed because it is too large Load Diff