Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/app-staking/src/Actions/Account/Validate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-staking/src/Overview/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/app-staking/src/Query/Validator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}));
}

Expand Down
2 changes: 1 addition & 1 deletion packages/app-staking/src/Targets/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
});
}
Expand Down
4 changes: 2 additions & 2 deletions packages/app-staking/src/Targets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
}
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 2 additions & 2 deletions packages/react-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-components/src/AddressInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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>
</>
)
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/src/InputFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/src/Messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 3 additions & 1 deletion packages/react-hooks/src/useForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion packages/react-signer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Loading