diff --git a/.eslintrc.js b/.eslintrc.js index f4dd8b2a6b..b7309d31b6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -11,6 +11,9 @@ module.exports = { }, rules: { ...base.rules, + // needs to be switched on at some point '@typescript-eslint/no-explicit-any': 'off', + // this seems very broken atm, false positives + '@typescript-eslint/unbound-method': 'off' } }; diff --git a/package.json b/package.json index 4ec9cee06a..61528c4da4 100644 --- a/package.json +++ b/package.json @@ -33,13 +33,13 @@ "afterSign": "electron-builder-notarize" }, "resolutions": { - "@polkadot/api": "^1.30.1", - "@polkadot/api-contract": "^1.30.1", - "@polkadot/keyring": "^3.3.1", - "@polkadot/types": "^1.30.1", - "@polkadot/util": "^3.3.1", - "@polkadot/util-crypto": "^3.3.1", - "@polkadot/wasm-crypto": "^1.3.1", + "@polkadot/api": "^1.31.0-beta.7", + "@polkadot/api-contract": "^1.31.0-beta.7", + "@polkadot/keyring": "^3.4.0-beta.1", + "@polkadot/types": "^1.31.0-beta.7", + "@polkadot/util": "^3.4.0-beta.1", + "@polkadot/util-crypto": "^3.4.0-beta.1", + "@polkadot/wasm-crypto": "^1.4.0-beta.7", "babel-core": "^7.0.0-bridge.0" }, "scripts": { @@ -82,8 +82,8 @@ "@babel/register": "^7.10.5", "@babel/runtime": "^7.11.2", "@pinata/sdk": "^1.1.11", - "@polkadot/dev": "^0.55.39", - "@polkadot/ts": "^0.3.39", + "@polkadot/dev": "^0.55.43", + "@polkadot/ts": "^0.3.40", "@types/bn.js": "^4.11.6", "@types/chart.js": "^2.9.24", "@types/file-saver": "^2.0.1", diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index b30103d948..bab068942e 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -6,7 +6,7 @@ "dependencies": { "@babel/core": "^7.11.4", "@babel/polyfill": "^7.10.4", - "@polkadot/dev": "^0.55.39", + "@polkadot/dev": "^0.55.43", "@polkadot/react-components": "0.56.0-beta.10", "electron-log": "^4.2.4", "electron-updater": "^4.3.5" diff --git a/packages/apps/package.json b/packages/apps/package.json index 7b60e25670..ae6cdead09 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -16,7 +16,7 @@ "@babel/core": "^7.11.4", "@babel/polyfill": "^7.10.4", "@babel/runtime": "^7.11.2", - "@polkadot/dev": "^0.55.39", + "@polkadot/dev": "^0.55.43", "@polkadot/react-components": "0.56.0-beta.10", "@polkadot/react-signer": "0.56.0-beta.10", "punycode": "^2.1.1", diff --git a/packages/page-accounts/src/Accounts/BannerDOT.tsx b/packages/page-accounts/src/Accounts/BannerDOT.tsx deleted file mode 100644 index 5275d36c0c..0000000000 --- a/packages/page-accounts/src/Accounts/BannerDOT.tsx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2017-2020 @polkadot/app-accounts authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import BN from 'bn.js'; -import React, { useState } from 'react'; -import { Trans } from 'react-i18next'; -import { POLKADOT_DENOM_BLOCK, POLKADOT_GENESIS } from '@polkadot/apps-config/api/constants'; -import { useApi, useCall } from '@polkadot/react-hooks'; -import { BlockToTime } from '@polkadot/react-query'; -import { formatNumber } from '@polkadot/util'; - -import Banner from './Banner'; - -function BannerDOT (): React.ReactElement | null { - const { api } = useApi(); - const bestNumber = useCall(api.derive.chain.bestNumber); - const [isPolkadot] = useState(api.genesisHash.eq(POLKADOT_GENESIS)); - - if (!isPolkadot || !bestNumber) { - return null; - } - - const remaining = POLKADOT_DENOM_BLOCK.sub(bestNumber); - const endDate = remaining.gtn(0) - ? new Date(Date.now() + (remaining.toNumber() * 6000)) - .toUTCString() - .replace('GMT', 'UTC') - .replace(/^[a-zA-Z]{3}, /, '') - .replace(/:[0-9]{2} UTC/, ' UTC') - : null; - - return ( - -

{ - endDate - ? On approximately {endDate} (block number {formatNumber(POLKADOT_DENOM_BLOCK)} in ), the DOT token will undergo a redenomination from its original sale. - : At block number {formatNumber(POLKADOT_DENOM_BLOCK)} the DOT token underwent a redenomination from its original sale. - }

-

{ - endDate - ? New DOT will be 100x smaller than DOT (old). Therefore, your DOT balance will be 100x higher and the price per DOT will be 100x lower. The percentage of the DOT you own relative to total supply will be unchanged. This will not affect the total value of your position. - : New DOT are 100x smaller than DOT (old). Therefore, your DOT balance is 100x higher and the price per DOT is 100x lower. The percentage of the DOT you own relative to total supply is unchanged. This does not affect the total value of your position. - }

-

See the Polkadot blog post for more information.

-
- ); -} - -export default React.memo(BannerDOT); diff --git a/packages/page-accounts/src/Accounts/index.tsx b/packages/page-accounts/src/Accounts/index.tsx index 7166fb503f..7ed106d15e 100644 --- a/packages/page-accounts/src/Accounts/index.tsx +++ b/packages/page-accounts/src/Accounts/index.tsx @@ -24,7 +24,6 @@ import Proxy from '../modals/ProxiedAdd'; import Qr from '../modals/Qr'; import Account from './Account'; import BannerClaims from './BannerClaims'; -import BannerDOT from './BannerDOT'; import BannerExtension from './BannerExtension'; import { sortAccounts } from '../util'; @@ -170,7 +169,6 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen return (
- {isCreateOpen && ( diff --git a/packages/page-accounts/src/modals/Create.tsx b/packages/page-accounts/src/modals/Create.tsx index 629b0d97db..785acbdad2 100644 --- a/packages/page-accounts/src/modals/Create.tsx +++ b/packages/page-accounts/src/modals/Create.tsx @@ -316,10 +316,16 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ + password={password} + /> + {!isElectron && ( +
+

{t('Consider storing your account in a signer such as a browser extension, hardware device, QR-capable phone wallet (non-connected) or desktop application for optimal account security.')} {t('Future versions of the web-only interface will drop support for non-external accounts, much like the IPFS version.')}

+
+ )} ('Advanced creation options')} > @@ -364,11 +370,6 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ - {!isElectron && ( -
-

{t('Consider storing your account in a signer such as a browser extension, hardware device, QR-capable phone wallet (non-connected) or desktop application for optimal account security.')} {t('Future versions of the web-only interface will drop support for non-external accounts, much like the IPFS version.')}

-
- )}