Some useTranslation updates (#2097)
* Some useTranslation updates * AccountName caching
This commit is contained in:
parent
dd5e7506be
commit
1edab85522
12
package.json
12
package.json
@ -10,12 +10,12 @@
|
||||
"packages/*"
|
||||
],
|
||||
"resolutions": {
|
||||
"@polkadot/api": "^0.100.0-beta.18",
|
||||
"@polkadot/api-contract": "^0.100.0-beta.18",
|
||||
"@polkadot/keyring": "^1.7.1",
|
||||
"@polkadot/types": "^0.100.0-beta.18",
|
||||
"@polkadot/util": "^1.7.1",
|
||||
"@polkadot/util-crypto": "^1.7.1",
|
||||
"@polkadot/api": "^0.100.0-beta.21",
|
||||
"@polkadot/api-contract": "^0.100.0-beta.21",
|
||||
"@polkadot/keyring": "^1.8.1",
|
||||
"@polkadot/types": "^0.100.0-beta.21",
|
||||
"@polkadot/util": "^1.8.1",
|
||||
"@polkadot/util-crypto": "^1.8.1",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"typescript": "^3.7.4"
|
||||
},
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
/* eslint-disable @typescript-eslint/camelcase */
|
||||
// Copyright 2017-2020 @polkadot/app-123code 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 { DeriveStakingValidators } from '@polkadot/api-derive/types';
|
||||
import { BareProps, I18nProps } from '@polkadot/react-components/types';
|
||||
import { BareProps as Props } from '@polkadot/react-components/types';
|
||||
import { Balance, BlockNumber } from '@polkadot/types/interfaces';
|
||||
|
||||
import React from 'react';
|
||||
@ -12,12 +11,8 @@ import { Bubble, IdentityIcon } from '@polkadot/react-components';
|
||||
import { useApi, useCall } from '@polkadot/react-hooks';
|
||||
import { formatBalance, formatNumber } from '@polkadot/util';
|
||||
|
||||
import translate from './translate';
|
||||
|
||||
interface Props extends BareProps, I18nProps {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
function SummaryBar (props: Props): React.ReactElement<Props> {
|
||||
export default function SummaryBar (props: Props): React.ReactElement<Props> {
|
||||
const { api, systemChain, systemName, systemVersion } = useApi();
|
||||
const bestNumber = useCall<BlockNumber>(api.derive.chain.bestNumber, []);
|
||||
const bestNumberLag = useCall<BlockNumber>(api.derive.chain.bestNumberLag, []);
|
||||
@ -53,6 +48,3 @@ function SummaryBar (props: Props): React.ReactElement<Props> {
|
||||
</summary>
|
||||
);
|
||||
}
|
||||
|
||||
// inject the actual API calls automatically into props
|
||||
export default translate(SummaryBar);
|
||||
|
||||
@ -2,11 +2,8 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
// some types, AppProps for the app and I18nProps to indicate
|
||||
// translatable strings. Generally the latter is quite "light",
|
||||
// `t` is inject into props (see the HOC export) and `t('any text')
|
||||
// does the translation
|
||||
import { AppProps, I18nProps } from '@polkadot/react-components/types';
|
||||
// global app props
|
||||
import { AppProps as Props } from '@polkadot/react-components/types';
|
||||
|
||||
// external imports (including those found in the packages/*
|
||||
// of this repo)
|
||||
@ -16,12 +13,8 @@ import React, { useState } from 'react';
|
||||
import AccountSelector from './AccountSelector';
|
||||
import SummaryBar from './SummaryBar';
|
||||
import Transfer from './Transfer';
|
||||
import translate from './translate';
|
||||
|
||||
// define our internal types
|
||||
interface Props extends AppProps, I18nProps {}
|
||||
|
||||
function TemplateApp ({ className }: Props): React.ReactElement<Props> {
|
||||
export default function TemplateApp ({ className }: Props): React.ReactElement<Props> {
|
||||
const [accountId, setAccountId] = useState<string | null>(null);
|
||||
|
||||
return (
|
||||
@ -34,5 +27,3 @@ function TemplateApp ({ className }: Props): React.ReactElement<Props> {
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(TemplateApp);
|
||||
|
||||
@ -2,6 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import { useTranslation as useTranslationBase, UseTranslationResponse, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse {
|
||||
return useTranslationBase('app-123code');
|
||||
}
|
||||
|
||||
export default withTranslation(['app-123code']);
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ActionStatus } from '@polkadot/react-components/Status/types';
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Label } from 'semantic-ui-react';
|
||||
@ -17,9 +16,9 @@ import ChangePass from './modals/ChangePass';
|
||||
import Derive from './modals/Derive';
|
||||
import Identity from './modals/Identity';
|
||||
import Transfer from './modals/Transfer';
|
||||
import translate from './translate';
|
||||
import { useTranslation } from './translate';
|
||||
|
||||
interface Props extends I18nProps {
|
||||
interface Props {
|
||||
address: string;
|
||||
allowTags: string[];
|
||||
className?: string;
|
||||
@ -27,7 +26,8 @@ interface Props extends I18nProps {
|
||||
toggleFavorite: (address: string) => void;
|
||||
}
|
||||
|
||||
function Account ({ address, allowTags, className, isFavorite, t, toggleFavorite }: Props): React.ReactElement<Props> | null {
|
||||
function Account ({ address, allowTags, className, isFavorite, toggleFavorite }: Props): React.ReactElement<Props> | null {
|
||||
const { t } = useTranslation();
|
||||
const api = useApi();
|
||||
const [tags, setTags] = useState<string[]>([]);
|
||||
const [accName, setAccName] = useState('');
|
||||
@ -331,24 +331,22 @@ function Account ({ address, allowTags, className, isFavorite, t, toggleFavorite
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(Account)`
|
||||
.accounts--Account-buttons {
|
||||
text-align: right;
|
||||
}
|
||||
export default styled(Account)`
|
||||
.accounts--Account-buttons {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tags--toggle {
|
||||
.tags--toggle {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
min-height: 1.5rem;
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
min-height: 1.5rem;
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name--input {
|
||||
width: 16rem;
|
||||
}
|
||||
`
|
||||
);
|
||||
.name--input {
|
||||
width: 16rem;
|
||||
}
|
||||
`;
|
||||
|
||||
@ -2,15 +2,13 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
|
||||
import { detect } from 'detect-browser';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { isWeb3Injected } from '@polkadot/extension-dapp';
|
||||
import { stringUpperFirst } from '@polkadot/util';
|
||||
|
||||
import translate from './translate';
|
||||
import { useTranslation } from './translate';
|
||||
|
||||
// it would have been really good to import this from detect, however... not exported
|
||||
type Browser = 'chrome' | 'firefox';
|
||||
@ -21,7 +19,7 @@ interface Extension {
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface Props extends I18nProps {
|
||||
interface Props {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
@ -49,7 +47,9 @@ const browserInfo = detect();
|
||||
const browserName: Browser | null = (browserInfo && (browserInfo.name as Browser)) || null;
|
||||
const isSupported = browserName && Object.keys(available).includes(browserName);
|
||||
|
||||
function Banner ({ className, t }: Props): React.ReactElement<Props> | null {
|
||||
function Banner ({ className }: Props): React.ReactElement<Props> | null {
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (isWeb3Injected || !isSupported || !browserName) {
|
||||
return null;
|
||||
}
|
||||
@ -86,20 +86,18 @@ function Banner ({ className, t }: Props): React.ReactElement<Props> | null {
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(Banner)`
|
||||
padding: 0 0.5rem 0.5rem;
|
||||
export default styled(Banner)`
|
||||
padding: 0 0.5rem 0.5rem;
|
||||
|
||||
.box {
|
||||
background: #fff6e5;
|
||||
border-left: 0.25rem solid darkorange;
|
||||
border-radius: 0 0.25rem 0.25rem 0;
|
||||
box-sizing: border-box;
|
||||
padding: 1rem 1.5rem;
|
||||
.box {
|
||||
background: #fff6e5;
|
||||
border-left: 0.25rem solid darkorange;
|
||||
border-radius: 0 0.25rem 0.25rem 0;
|
||||
box-sizing: border-box;
|
||||
padding: 1rem 1.5rem;
|
||||
|
||||
.info {
|
||||
max-width: 50rem;
|
||||
}
|
||||
.info {
|
||||
max-width: 50rem;
|
||||
}
|
||||
`
|
||||
);
|
||||
}
|
||||
`;
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
import { ComponentProps } from './types';
|
||||
import { ComponentProps as Props } from './types';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
@ -17,10 +16,7 @@ import ImportModal from './modals/Import';
|
||||
import QrModal from './modals/Qr';
|
||||
import Account from './Account';
|
||||
import Banner from './Banner';
|
||||
import translate from './translate';
|
||||
|
||||
interface Props extends ComponentProps, I18nProps {
|
||||
}
|
||||
import { useTranslation } from './translate';
|
||||
|
||||
type SortedAccount = { address: string; isFavorite: boolean };
|
||||
|
||||
@ -39,7 +35,8 @@ async function queryLedger (): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
function Overview ({ className, onStatusChange, t }: Props): React.ReactElement<Props> {
|
||||
function Overview ({ className, onStatusChange }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { allAccounts, hasAccounts } = useAccounts();
|
||||
const [isCreateOpen, setIsCreateOpen] = useState(false);
|
||||
const [isImportOpen, setIsImportOpen] = useState(false);
|
||||
@ -153,16 +150,14 @@ function Overview ({ className, onStatusChange, t }: Props): React.ReactElement<
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(Overview)`
|
||||
.filter--tags {
|
||||
.ui--Dropdown {
|
||||
padding-left: 0;
|
||||
export default styled(Overview)`
|
||||
.filter--tags {
|
||||
.ui--Dropdown {
|
||||
padding-left: 0;
|
||||
|
||||
label {
|
||||
left: 1.55rem;
|
||||
}
|
||||
label {
|
||||
left: 1.55rem;
|
||||
}
|
||||
}
|
||||
`
|
||||
);
|
||||
}
|
||||
`;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AppProps, I18nProps } from '@polkadot/react-components/types';
|
||||
import { AppProps as Props } from '@polkadot/react-components/types';
|
||||
import { ComponentProps } from './types';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
@ -12,13 +12,11 @@ import { HelpOverlay, Tabs } from '@polkadot/react-components';
|
||||
|
||||
import basicMd from './md/basic.md';
|
||||
import Overview from './Overview';
|
||||
import translate from './translate';
|
||||
import { useTranslation } from './translate';
|
||||
import Vanity from './Vanity';
|
||||
|
||||
interface Props extends AppProps, I18nProps {
|
||||
}
|
||||
|
||||
function AccountsApp ({ basePath, onStatusChange, t }: Props): React.ReactElement<Props> {
|
||||
export default function AccountsApp ({ basePath, onStatusChange }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { hasAccounts } = useAccounts();
|
||||
const [hidden, setHidden] = useState<string[]>(['vanity']);
|
||||
|
||||
@ -64,5 +62,3 @@ function AccountsApp ({ basePath, onStatusChange, t }: Props): React.ReactElemen
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(AccountsApp);
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
import { ActionStatus } from '@polkadot/react-components/Status/types';
|
||||
import { CreateResult } from '@polkadot/ui-keyring/types';
|
||||
import { KeypairType } from '@polkadot/util-crypto/types';
|
||||
@ -19,10 +18,11 @@ import uiSettings from '@polkadot/ui-settings';
|
||||
import { isHex, u8aToHex } from '@polkadot/util';
|
||||
import { keyExtractSuri, mnemonicGenerate, mnemonicValidate, randomAsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
import translate from '../translate';
|
||||
import { useTranslation } from '../translate';
|
||||
import CreateConfirmation from './CreateConfirmation';
|
||||
|
||||
interface Props extends ModalProps, I18nProps {
|
||||
interface Props extends ModalProps {
|
||||
className?: string;
|
||||
seed?: string;
|
||||
type?: KeypairType;
|
||||
}
|
||||
@ -150,7 +150,8 @@ function createAccount (suri: string, pairType: KeypairType, name: string, passw
|
||||
return status;
|
||||
}
|
||||
|
||||
function Create ({ className, onClose, onStatusChange, seed: propsSeed, t, type: propsType }: Props): React.ReactElement<Props> {
|
||||
function Create ({ className, onClose, onStatusChange, seed: propsSeed, type: propsType }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { isDevelopment } = useApi();
|
||||
const [{ address, deriveError, derivePath, isSeedValid, pairType, seed, seedType }, setAddress] = useState<AddressState>(generateSeed(propsSeed, '', propsSeed ? 'raw' : 'bip', propsType));
|
||||
const [isConfirmationOpen, setIsConfirmationOpen] = useState(false);
|
||||
@ -309,10 +310,8 @@ function Create ({ className, onClose, onStatusChange, seed: propsSeed, t, type:
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(Create)`
|
||||
.accounts--Creator-advanced {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
`
|
||||
);
|
||||
export default styled(Create)`
|
||||
.accounts--Creator-advanced {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
`;
|
||||
|
||||
@ -2,21 +2,21 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
|
||||
import React from 'react';
|
||||
import { AddressRow, Button, Modal } from '@polkadot/react-components';
|
||||
|
||||
import translate from '../translate';
|
||||
import { useTranslation } from '../translate';
|
||||
|
||||
interface Props extends I18nProps {
|
||||
interface Props {
|
||||
address: string;
|
||||
name: string;
|
||||
onClose: () => void;
|
||||
onCommit: () => void;
|
||||
}
|
||||
|
||||
function CreateConfirmation ({ address, name, onClose, onCommit, t }: Props): React.ReactElement<Props> | null {
|
||||
export default function CreateConfirmation ({ address, name, onClose, onCommit }: Props): React.ReactElement<Props> | null {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Modal
|
||||
header={t('Important notice')}
|
||||
@ -53,5 +53,3 @@ function CreateConfirmation ({ address, name, onClose, onCommit, t }: Props): Re
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(CreateConfirmation);
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
import { KeyringPair } from '@polkadot/keyring/types';
|
||||
import { ActionStatus } from '@polkadot/react-components/Status/types';
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
import { KeypairType } from '@polkadot/util-crypto/types';
|
||||
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
@ -13,11 +12,12 @@ import { useDebounce } from '@polkadot/react-hooks';
|
||||
import keyring from '@polkadot/ui-keyring';
|
||||
import { keyExtractPath } from '@polkadot/util-crypto';
|
||||
|
||||
import translate from '../translate';
|
||||
import { useTranslation } from '../translate';
|
||||
import { downloadAccount } from './Create';
|
||||
import CreateConfirmation from './CreateConfirmation';
|
||||
|
||||
interface Props extends I18nProps {
|
||||
interface Props {
|
||||
className?: string;
|
||||
from: string;
|
||||
onClose: () => void;
|
||||
}
|
||||
@ -67,7 +67,8 @@ function createAccount (source: KeyringPair, suri: string, name: string, passwor
|
||||
return status;
|
||||
}
|
||||
|
||||
function Derive ({ className, from, onClose, t }: Props): React.ReactElement {
|
||||
export default function Derive ({ className, from, onClose }: Props): React.ReactElement {
|
||||
const { t } = useTranslation();
|
||||
const { queueAction } = useContext(StatusContext);
|
||||
const [source] = useState(keyring.getPair(from));
|
||||
const [{ address, deriveError }, setDerived] = useState<DerivedAddress>({ address: null, deriveError: null });
|
||||
@ -230,5 +231,3 @@ function Derive ({ className, from, onClose, t }: Props): React.ReactElement {
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(Derive);
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
import { ModalProps } from '../types';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
@ -11,18 +10,19 @@ import { AddressRow, Button, Input, InputAddress, Modal } from '@polkadot/react-
|
||||
import { QrScanAddress } from '@polkadot/react-qr';
|
||||
import keyring from '@polkadot/ui-keyring';
|
||||
|
||||
import translate from '../translate';
|
||||
import { useTranslation } from '../translate';
|
||||
|
||||
interface Scanned {
|
||||
address: string;
|
||||
genesisHash: string;
|
||||
}
|
||||
|
||||
interface Props extends I18nProps, ModalProps {
|
||||
interface Props extends ModalProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
function QrModal ({ className, onClose, onStatusChange, t }: Props): React.ReactElement<Props> {
|
||||
function QrModal ({ className, onClose, onStatusChange }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const [{ isNameValid, name }, setName] = useState({ isNameValid: false, name: '' });
|
||||
const [scanned, setScanned] = useState<Scanned | null>(null);
|
||||
|
||||
@ -103,11 +103,9 @@ function QrModal ({ className, onClose, onStatusChange, t }: Props): React.React
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(QrModal)`
|
||||
.qr-wrapper {
|
||||
margin: 0 auto;
|
||||
max-width: 30rem;
|
||||
}
|
||||
`
|
||||
);
|
||||
export default styled(QrModal)`
|
||||
.qr-wrapper {
|
||||
margin: 0 auto;
|
||||
max-width: 30rem;
|
||||
}
|
||||
`;
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/camelcase */
|
||||
// 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 { SubmittableExtrinsic } from '@polkadot/api/promise/types';
|
||||
import { DerivedFees } from '@polkadot/api-derive/types';
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
|
||||
import BN from 'bn.js';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
@ -15,10 +12,9 @@ import { useApi } from '@polkadot/react-hooks';
|
||||
import { Available } from '@polkadot/react-query';
|
||||
// import Checks from '@polkadot/react-signer/Checks';
|
||||
|
||||
import translate from '../translate';
|
||||
import { useTranslation } from '../translate';
|
||||
|
||||
interface Props extends I18nProps {
|
||||
balances_fees?: DerivedFees;
|
||||
interface Props {
|
||||
className?: string;
|
||||
onClose: () => void;
|
||||
recipientId?: string;
|
||||
@ -64,7 +60,8 @@ const ZERO = new BN(0);
|
||||
// return maxBalance;
|
||||
// }
|
||||
|
||||
function Transfer ({ className, onClose, recipientId: propRecipientId, senderId: propSenderId, t }: Props): React.ReactElement<Props> {
|
||||
function Transfer ({ className, onClose, recipientId: propRecipientId, senderId: propSenderId }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { api } = useApi();
|
||||
const [amount, setAmount] = useState<BN | undefined>(new BN(0));
|
||||
const [extrinsic, setExtrinsic] = useState<SubmittableExtrinsic | null>(null);
|
||||
@ -153,25 +150,23 @@ function Transfer ({ className, onClose, recipientId: propRecipientId, senderId:
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(Transfer)`
|
||||
article.padded {
|
||||
box-shadow: none;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
export default styled(Transfer)`
|
||||
article.padded {
|
||||
box-shadow: none;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.balance {
|
||||
margin-bottom: 0.5rem;
|
||||
text-align: right;
|
||||
padding-right: 1rem;
|
||||
.balance {
|
||||
margin-bottom: 0.5rem;
|
||||
text-align: right;
|
||||
padding-right: 1rem;
|
||||
|
||||
.label {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.label {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
label.with-help {
|
||||
flex-basis: 10rem;
|
||||
}
|
||||
`
|
||||
);
|
||||
label.with-help {
|
||||
flex-basis: 10rem;
|
||||
}
|
||||
`;
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
import { KeyringAddress } from '@polkadot/ui-keyring/types';
|
||||
import { ActionStatus } from '@polkadot/react-components/Status/types';
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Label } from 'semantic-ui-react';
|
||||
@ -12,12 +11,11 @@ import styled from 'styled-components';
|
||||
import { AddressSmall, AddressInfo, Button, ChainLock, Icon, InputTags, Input, LinkPolkascan, Forget, Menu, Popup } from '@polkadot/react-components';
|
||||
import { useApi } from '@polkadot/react-hooks';
|
||||
import keyring from '@polkadot/ui-keyring';
|
||||
|
||||
import Transfer from '@polkadot/app-accounts/modals/Transfer';
|
||||
|
||||
import translate from './translate';
|
||||
import { useTranslation } from './translate';
|
||||
|
||||
interface Props extends I18nProps {
|
||||
interface Props {
|
||||
address: string;
|
||||
allowTags: string[];
|
||||
className?: string;
|
||||
@ -30,7 +28,8 @@ const WITH_EXTENDED = { nonce: true };
|
||||
|
||||
const isEditable = true;
|
||||
|
||||
function Address ({ address, allowTags, className, isFavorite, t, toggleFavorite }: Props): React.ReactElement<Props> | null {
|
||||
function Address ({ address, allowTags, className, isFavorite, toggleFavorite }: Props): React.ReactElement<Props> | null {
|
||||
const { t } = useTranslation();
|
||||
const api = useApi();
|
||||
const [tags, setTags] = useState<string[]>([]);
|
||||
const [accName, setAccName] = useState('');
|
||||
@ -291,24 +290,22 @@ function Address ({ address, allowTags, className, isFavorite, t, toggleFavorite
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(Address)`
|
||||
.addresses--Address-buttons {
|
||||
text-align: right;
|
||||
}
|
||||
export default styled(Address)`
|
||||
.addresses--Address-buttons {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tags--toggle {
|
||||
.tags--toggle {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
min-height: 1.5rem;
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
min-height: 1.5rem;
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name--input {
|
||||
width: 16rem;
|
||||
}
|
||||
`
|
||||
);
|
||||
.name--input {
|
||||
width: 16rem;
|
||||
}
|
||||
`;
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
import { ComponentProps } from './types';
|
||||
import { ComponentProps as Props } from './types';
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
@ -12,16 +11,14 @@ import { useAddresses, useFavorites } from '@polkadot/react-hooks';
|
||||
|
||||
import CreateModal from './modals/Create';
|
||||
import Address from './Address';
|
||||
import translate from './translate';
|
||||
|
||||
interface Props extends ComponentProps, I18nProps {
|
||||
}
|
||||
import { useTranslation } from './translate';
|
||||
|
||||
type SortedAddress = { address: string; isFavorite: boolean };
|
||||
|
||||
const STORE_FAVS = 'accounts:favorites';
|
||||
|
||||
function Overview ({ className, onStatusChange, t }: Props): React.ReactElement<Props> {
|
||||
function Overview ({ className, onStatusChange }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const { hasAddresses, allAddresses } = useAddresses();
|
||||
const [isCreateOpen, setIsCreateOpen] = useState(false);
|
||||
const [favorites, toggleFavorite] = useFavorites(STORE_FAVS);
|
||||
@ -93,16 +90,14 @@ function Overview ({ className, onStatusChange, t }: Props): React.ReactElement<
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(Overview)`
|
||||
.filter--tags {
|
||||
.ui--Dropdown {
|
||||
padding-left: 0;
|
||||
export default styled(Overview)`
|
||||
.filter--tags {
|
||||
.ui--Dropdown {
|
||||
padding-left: 0;
|
||||
|
||||
label {
|
||||
left: 1.55rem;
|
||||
}
|
||||
label {
|
||||
left: 1.55rem;
|
||||
}
|
||||
}
|
||||
`
|
||||
);
|
||||
}
|
||||
`;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AppProps, I18nProps } from '@polkadot/react-components/types';
|
||||
import { AppProps } from '@polkadot/react-components/types';
|
||||
import { SubjectInfo } from '@polkadot/ui-keyring/observable/types';
|
||||
|
||||
import React from 'react';
|
||||
@ -12,14 +12,16 @@ import Tabs from '@polkadot/react-components/Tabs';
|
||||
|
||||
import basicMd from './md/basic.md';
|
||||
import Overview from './Overview';
|
||||
import translate from './translate';
|
||||
import { useTranslation } from './translate';
|
||||
|
||||
interface Props extends AppProps, I18nProps {
|
||||
interface Props extends AppProps {
|
||||
allAddresses?: SubjectInfo;
|
||||
location: any;
|
||||
}
|
||||
|
||||
function AddressBookApp ({ basePath, onStatusChange, t }: Props): React.ReactElement<Props> {
|
||||
export default function AddressBookApp ({ basePath, onStatusChange }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<main className='address-book--App'>
|
||||
<HelpOverlay md={basicMd} />
|
||||
@ -47,5 +49,3 @@ function AddressBookApp ({ basePath, onStatusChange, t }: Props): React.ReactEle
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(AddressBookApp);
|
||||
|
||||
@ -2,20 +2,18 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { I18nProps } from '@polkadot/react-components/types';
|
||||
import { ActionStatus } from '@polkadot/react-components/Status/types';
|
||||
import { ModalProps } from '../types';
|
||||
import { ModalProps as Props } from '../types';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { AddressRow, Button, Input, InputAddress, Modal } from '@polkadot/react-components';
|
||||
import keyring from '@polkadot/ui-keyring';
|
||||
|
||||
import translate from '../translate';
|
||||
import { useTranslation } from '../translate';
|
||||
|
||||
interface Props extends ModalProps, I18nProps {}
|
||||
|
||||
function Create ({ onClose, onStatusChange, t }: Props): React.ReactElement<Props> {
|
||||
export default function Create ({ onClose, onStatusChange }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const [{ isNameValid, name }, setName] = useState<{ isNameValid: boolean; name: string }>({ isNameValid: false, name: '' });
|
||||
const [{ address, isAddressExisting, isAddressValid }, setAddress] = useState<{ address: string; isAddressExisting: boolean; isAddressValid: boolean }>({ address: '', isAddressExisting: false, isAddressValid: false });
|
||||
const isValid = isAddressValid && isNameValid;
|
||||
@ -130,5 +128,3 @@ function Create ({ onClose, onStatusChange, t }: Props): React.ReactElement<Prop
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
export default translate(Create);
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.7.7",
|
||||
"@polkadot/api-contract": "^0.100.0-beta.18"
|
||||
"@polkadot/api-contract": "^0.100.0-beta.21"
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.7.6",
|
||||
"@polkadot/api": "^0.100.0-beta.18",
|
||||
"@polkadot/api": "^0.100.0-beta.21",
|
||||
"@polkadot/extension-dapp": "^0.15.0-beta.0",
|
||||
"edgeware-node-types": "^1.0.10",
|
||||
"rxjs-compat": "^6.5.3"
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.7.6",
|
||||
"@polkadot/keyring": "^1.7.1",
|
||||
"@polkadot/keyring": "^1.8.1",
|
||||
"@polkadot/react-api": "^0.39.0-beta.34",
|
||||
"@polkadot/react-identicon": "^0.48.0-beta.8",
|
||||
"@polkadot/react-query": "^0.39.0-beta.34",
|
||||
|
||||
@ -37,24 +37,21 @@ const nameCache: Map<string, [boolean, React.ReactNode]> = new Map();
|
||||
|
||||
function defaultOrAddr (defaultName = '', _address: AccountId | AccountIndex | Address | string | Uint8Array, _accountIndex?: AccountIndex | null): [React.ReactNode, boolean, boolean] {
|
||||
const accountId = _address.toString();
|
||||
const cached = nameCache.get(accountId);
|
||||
|
||||
if (cached) {
|
||||
const [isAddressCached, nameCached] = cached;
|
||||
|
||||
return [nameCached, false, isAddressCached];
|
||||
}
|
||||
|
||||
const accountIndex = (_accountIndex || '').toString();
|
||||
const [isAddress,, extracted] = getAddressName(accountId, null, defaultName);
|
||||
const [isAddressExtracted,, extracted] = getAddressName(accountId, null, defaultName);
|
||||
const [isAddressCached, nameCached] = nameCache.get(accountId) || [false, null];
|
||||
|
||||
if (isAddress && accountIndex) {
|
||||
if (extracted && isAddressCached && !isAddressExtracted) {
|
||||
// skip, default return
|
||||
} else if (nameCached) {
|
||||
return [nameCached, false, isAddressCached];
|
||||
} else if (isAddressExtracted && accountIndex) {
|
||||
nameCache.set(accountId, [true, accountIndex]);
|
||||
|
||||
return [accountIndex, false, true];
|
||||
}
|
||||
|
||||
return [extracted, !isAddress, isAddress];
|
||||
return [extracted, !isAddressExtracted, isAddressExtracted];
|
||||
}
|
||||
|
||||
function AccountName ({ children, className, defaultName, label, onClick, override, style, toggle, value, withShort }: Props): React.ReactElement<Props> {
|
||||
|
||||
164
yarn.lock
164
yarn.lock
@ -882,7 +882,7 @@
|
||||
core-js "^2.6.5"
|
||||
regenerator-runtime "^0.13.2"
|
||||
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.4", "@babel/runtime@^7.7.6", "@babel/runtime@^7.7.7":
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.6", "@babel/runtime@^7.7.7":
|
||||
version "7.7.7"
|
||||
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.7.tgz#194769ca8d6d7790ec23605af9ee3e42a0aa79cf"
|
||||
integrity sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA==
|
||||
@ -2093,36 +2093,36 @@
|
||||
dependencies:
|
||||
"@types/node" ">= 8"
|
||||
|
||||
"@polkadot/api-contract@^0.100.0-beta.18":
|
||||
version "0.100.0-beta.18"
|
||||
resolved "https://registry.npmjs.org/@polkadot/api-contract/-/api-contract-0.100.0-beta.18.tgz#cac3c0164145908da0cc2c57cc3417ccdef163d7"
|
||||
integrity sha512-KIEKRWay1hqKQoUYWlzl3oWj7TtRB01S7rPk9q2HxqY/QQosO1WSgGYPjI7VHBCHOQHwzq84/FDLqrhfMd7Jng==
|
||||
"@polkadot/api-contract@^0.100.0-beta.21":
|
||||
version "0.100.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-contract/-/api-contract-0.100.0-beta.21.tgz#ab8567606332aa5d8c7fde49ba90a54f977c66d1"
|
||||
integrity sha512-qMOnGoARaZ/OpJ8pRPg+Pw+kWFp69D7e7BTtRK5+OOwDBp0xTBISHhsWwby5j6ohfWNFIK68Oh59YetXXyV9pg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/types" "^0.100.0-beta.18"
|
||||
"@polkadot/types" "^0.100.0-beta.21"
|
||||
|
||||
"@polkadot/api-derive@^0.100.0-beta.18":
|
||||
version "0.100.0-beta.18"
|
||||
resolved "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-0.100.0-beta.18.tgz#c6d7e1fb5a9b49eb66bc59a3702edca396fed343"
|
||||
integrity sha512-SZMZHIEvkBBJBKZ8Ku5suIW2S9J1IVKpk96WJ9xfS3PXlD774YRYhbPEkobgy5R7Y/jU4J/Rao0/nk7nVfw3iQ==
|
||||
"@polkadot/api-derive@^0.100.0-beta.21":
|
||||
version "0.100.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.100.0-beta.21.tgz#5f343c715b4bb893345385ac214431278cb44d72"
|
||||
integrity sha512-gvqKWmMbauG+KCK35rK+es4sy2481WkQEZKcvR5U6O/bB/HoQaM6zn9q2pXiNHTN+yqdyW9mwZK7WOXkvK6eLQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/api" "^0.100.0-beta.18"
|
||||
"@polkadot/types" "^0.100.0-beta.18"
|
||||
"@polkadot/api" "^0.100.0-beta.21"
|
||||
"@polkadot/types" "^0.100.0-beta.21"
|
||||
|
||||
"@polkadot/api@^0.100.0-beta.18":
|
||||
version "0.100.0-beta.18"
|
||||
resolved "https://registry.npmjs.org/@polkadot/api/-/api-0.100.0-beta.18.tgz#91238807ab02cc398efef28d28ed0d0353660e01"
|
||||
integrity sha512-VaTKiUaQCcBkS+IXPxuC6oNZE1G3HueRU50ZODspIM1yXGxiE9Eu58KfKSJHzKB77RgDI2U77L7G4SaMt5PE0g==
|
||||
"@polkadot/api@^0.100.0-beta.21":
|
||||
version "0.100.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.100.0-beta.21.tgz#cf49d5930d28bd83fcde09a64100302ec1fda4f3"
|
||||
integrity sha512-Kjw3J5TsG3DcQFFd62yfzFFKo70NeZvt88Z3M2gSPpSm3yNcNSqP3ULrjIb4wDFXQwQ9aZWljFxZ6zcajG8pag==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/api-derive" "^0.100.0-beta.18"
|
||||
"@polkadot/keyring" "^1.7.1"
|
||||
"@polkadot/metadata" "^0.100.0-beta.18"
|
||||
"@polkadot/rpc-core" "^0.100.0-beta.18"
|
||||
"@polkadot/rpc-provider" "^0.100.0-beta.18"
|
||||
"@polkadot/types" "^0.100.0-beta.18"
|
||||
"@polkadot/util-crypto" "^1.7.1"
|
||||
"@polkadot/api-derive" "^0.100.0-beta.21"
|
||||
"@polkadot/keyring" "^1.8.1"
|
||||
"@polkadot/metadata" "^0.100.0-beta.21"
|
||||
"@polkadot/rpc-core" "^0.100.0-beta.21"
|
||||
"@polkadot/rpc-provider" "^0.100.0-beta.21"
|
||||
"@polkadot/types" "^0.100.0-beta.21"
|
||||
"@polkadot/util-crypto" "^1.8.1"
|
||||
|
||||
"@polkadot/dev-react@^0.32.14":
|
||||
version "0.32.14"
|
||||
@ -2226,31 +2226,31 @@
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
|
||||
"@polkadot/jsonrpc@^0.100.0-beta.18":
|
||||
version "0.100.0-beta.18"
|
||||
resolved "https://registry.npmjs.org/@polkadot/jsonrpc/-/jsonrpc-0.100.0-beta.18.tgz#8976c62d22e47a1ae3716c4f42f35e57ad65b312"
|
||||
integrity sha512-yFbyHv8YOl66yjxLuw5ltfXHKAJBS0sLnNwj2xQhJiBIs7KJPdaV/mSphNZItWrNUkpYXEEX1MTJJbtpb/UOcw==
|
||||
"@polkadot/jsonrpc@^0.100.0-beta.21":
|
||||
version "0.100.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.100.0-beta.21.tgz#4fa748c78399844a2008d326cd65a8ffa5f5bf57"
|
||||
integrity sha512-VlICgMofl+YMj32M1iQ2Pr7dZKsGEvC3Dvs3NvA0DRXEn9UEu6Gr+2gDwlf88VNREPodD7dQOPO6BZ94/IO74w==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
|
||||
"@polkadot/keyring@^1.7.1":
|
||||
version "1.7.1"
|
||||
resolved "https://registry.npmjs.org/@polkadot/keyring/-/keyring-1.7.1.tgz#53a3dd87e547aaee0a877e4fc5fdfc4757e60a0d"
|
||||
integrity sha512-CWCnU0zsaot0QvEiasKfhCiVlZCIVKOQGPzXiVE9JSjoqTQQJ0BEdaEfM4x0/bFFvvsn/8RcjLPpxBPSfe2eOg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.4"
|
||||
"@polkadot/util" "^1.7.1"
|
||||
"@polkadot/util-crypto" "^1.7.1"
|
||||
|
||||
"@polkadot/metadata@^0.100.0-beta.18":
|
||||
version "0.100.0-beta.18"
|
||||
resolved "https://registry.npmjs.org/@polkadot/metadata/-/metadata-0.100.0-beta.18.tgz#f53e4a9a02540fb3b00905d2928c2119ca8ea269"
|
||||
integrity sha512-QAWsPfb7WBVhzio5MHNWxN10EkBOiAh75xtMWYFFZ4k6CP3O/UsM5h701n1w2V0MKj7ORUyeTtoX+g5xBs8K7A==
|
||||
"@polkadot/keyring@^1.8.1":
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-1.8.1.tgz#69a9209f22b766a9e2d97d36bfca8bcdbc4daa18"
|
||||
integrity sha512-KeDbfP8biY3bXEhMv1ANp9d3kCuXj2oxseuDK0jvxRo7CehVME9UwAMGQK3Y9NCUuYWd+xTO2To0ZOqR7hdmuQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/types" "^0.100.0-beta.18"
|
||||
"@polkadot/util" "^1.7.1"
|
||||
"@polkadot/util-crypto" "^1.7.1"
|
||||
"@polkadot/util" "^1.8.1"
|
||||
"@polkadot/util-crypto" "^1.8.1"
|
||||
|
||||
"@polkadot/metadata@^0.100.0-beta.21":
|
||||
version "0.100.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-0.100.0-beta.21.tgz#ef2dfe30b20cf97f8ed8bd154f28515df45171c7"
|
||||
integrity sha512-q/7Yz4NJBQt/24mHDRlfyBhe7qYh6zgfSNJW/tIf63/KbzkwRNrAC/VzxPoqvzYp/qbgXhoR5YJOFN6AwJFO3Q==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/types" "^0.100.0-beta.21"
|
||||
"@polkadot/util" "^1.8.1"
|
||||
"@polkadot/util-crypto" "^1.8.1"
|
||||
|
||||
"@polkadot/react-identicon@^0.48.0-beta.8":
|
||||
version "0.48.0-beta.8"
|
||||
@ -2276,27 +2276,27 @@
|
||||
qrcode-generator "^1.4.4"
|
||||
react-qr-reader "^2.2.1"
|
||||
|
||||
"@polkadot/rpc-core@^0.100.0-beta.18":
|
||||
version "0.100.0-beta.18"
|
||||
resolved "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-0.100.0-beta.18.tgz#6a94971c2265a46cab4c78f5e9eac08c2c617d28"
|
||||
integrity sha512-mSZL7fpqb1S00yV1sxPgxs05TX3+3jB4kWXhZuYXF84pLGYCzKh3JtT04yu3W7wLY8HCFK8ubsH5Yd1yt4Hh2A==
|
||||
"@polkadot/rpc-core@^0.100.0-beta.21":
|
||||
version "0.100.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.100.0-beta.21.tgz#f7c8a0eabe6ed8ef1e3d72496e27fa148844efb0"
|
||||
integrity sha512-Zs9RWbT416dsR69rEVR66mE9ZX0QGcxWcqpP7KI7KyUOe6MxhB1YSdmKAxubQQL/HFHKIkTvuqEVP6/g+hDN6g==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/jsonrpc" "^0.100.0-beta.18"
|
||||
"@polkadot/rpc-provider" "^0.100.0-beta.18"
|
||||
"@polkadot/types" "^0.100.0-beta.18"
|
||||
"@polkadot/util" "^1.7.1"
|
||||
"@polkadot/jsonrpc" "^0.100.0-beta.21"
|
||||
"@polkadot/rpc-provider" "^0.100.0-beta.21"
|
||||
"@polkadot/types" "^0.100.0-beta.21"
|
||||
"@polkadot/util" "^1.8.1"
|
||||
rxjs "^6.5.4"
|
||||
|
||||
"@polkadot/rpc-provider@^0.100.0-beta.18":
|
||||
version "0.100.0-beta.18"
|
||||
resolved "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-0.100.0-beta.18.tgz#d55e257af140deb1fc85f63fb92a67c998d055fb"
|
||||
integrity sha512-1U0sH2JrUMUwf6ak63dDfbpt2sYcqpc3GnyIFip+BaDdSrgeaed2aNg5/W2iv0jc/I6qnW58k8a//TB683Wgzg==
|
||||
"@polkadot/rpc-provider@^0.100.0-beta.21":
|
||||
version "0.100.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.100.0-beta.21.tgz#c48cb93f67ea82240e8e957eee42e76711261c3e"
|
||||
integrity sha512-kqYMfnFuYsTa5MaVhvJMMhW4IP7guEyPMoQa/l/kWrdDTDbFrw9dUOVIMPhUB2WEpsNBZ8DX84cKVBpWjrTnAg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/metadata" "^0.100.0-beta.18"
|
||||
"@polkadot/util" "^1.7.1"
|
||||
"@polkadot/util-crypto" "^1.7.1"
|
||||
"@polkadot/metadata" "^0.100.0-beta.21"
|
||||
"@polkadot/util" "^1.8.1"
|
||||
"@polkadot/util-crypto" "^1.8.1"
|
||||
eventemitter3 "^4.0.0"
|
||||
isomorphic-fetch "^2.2.1"
|
||||
websocket "^1.0.31"
|
||||
@ -2308,15 +2308,15 @@
|
||||
dependencies:
|
||||
"@types/chrome" "^0.0.91"
|
||||
|
||||
"@polkadot/types@^0.100.0-beta.18":
|
||||
version "0.100.0-beta.18"
|
||||
resolved "https://registry.npmjs.org/@polkadot/types/-/types-0.100.0-beta.18.tgz#4818501caa6ca6a565d33d21c23faaa05310b170"
|
||||
integrity sha512-n6TtOi74ZHCYjQCzJVEAJkt7OBDXFquO4/5yYBUwerMMiUOxAQM5gkEmmTgPHVEyQEVwCWaccyjeHc2tui3gGQ==
|
||||
"@polkadot/types@^0.100.0-beta.21":
|
||||
version "0.100.0-beta.21"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.100.0-beta.21.tgz#facb98e1dff7fa3d968c5d9e04a9f620a1167b37"
|
||||
integrity sha512-vREsjQ7/ItjS5a5rZ5iaTwnpfs7n+Am7Z/GPDofojEiQH+4ZtIuEj+sSGxM2i/Y2u3l9pF3FA0NrbDf7IEuL5A==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/metadata" "^0.100.0-beta.18"
|
||||
"@polkadot/util" "^1.7.1"
|
||||
"@polkadot/util-crypto" "^1.7.1"
|
||||
"@polkadot/metadata" "^0.100.0-beta.21"
|
||||
"@polkadot/util" "^1.8.1"
|
||||
"@polkadot/util-crypto" "^1.8.1"
|
||||
"@types/memoizee" "^0.4.3"
|
||||
memoizee "^0.4.14"
|
||||
|
||||
@ -2364,13 +2364,13 @@
|
||||
"@types/color" "^3.0.1"
|
||||
color "^3.1.2"
|
||||
|
||||
"@polkadot/util-crypto@^1.7.1":
|
||||
version "1.7.1"
|
||||
resolved "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-1.7.1.tgz#6cb1ed1f7ecbea3b41100231830817e7fd116dc6"
|
||||
integrity sha512-g0JCciJLJXbkc/Q+2QuJgCgS0Xfl7tO97ALdsI00bgSDA7zlh2zhjpx03Ve47hMndmn7K8ClIGrj4nxHx/95Tw==
|
||||
"@polkadot/util-crypto@^1.8.1":
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-1.8.1.tgz#dbc3f75c4a780bd31cd37e63cf27bade54728646"
|
||||
integrity sha512-ypUs10hV1HPvYc0ZsEu+LTGSEh0rkr0as/FUh7+Z9v3Bxibn3aO+EOxJPQuDbZZ59FSMRmc9SeOSa0wn9ddrnw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.4"
|
||||
"@polkadot/util" "^1.7.1"
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@polkadot/util" "^1.8.1"
|
||||
"@polkadot/wasm-crypto" "^0.14.1"
|
||||
"@types/bip39" "^2.4.2"
|
||||
"@types/bs58" "^4.0.0"
|
||||
@ -2382,17 +2382,17 @@
|
||||
blakejs "^1.1.0"
|
||||
bs58 "^4.0.1"
|
||||
js-sha3 "^0.8.0"
|
||||
secp256k1 "^3.7.0"
|
||||
secp256k1 "^3.8.0"
|
||||
tweetnacl "^1.0.1"
|
||||
xxhashjs "^0.2.2"
|
||||
|
||||
"@polkadot/util@^1.7.1":
|
||||
version "1.7.1"
|
||||
resolved "https://registry.npmjs.org/@polkadot/util/-/util-1.7.1.tgz#cb262fa5a441097c0c093532f70d0b7e0503fbb1"
|
||||
integrity sha512-tWvh+vYDIiXDIWgAGd9zyJWlDKxQ5KYTKZ9uTlLxfuy1qXEdVOjlX9Qz5+FACU2742e8tTvtvM9KfK05VK5X/A==
|
||||
"@polkadot/util@^1.8.1":
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-1.8.1.tgz#7473383a1eb26bec59cca53643cf07bc078fe052"
|
||||
integrity sha512-sFpr+JLCG9d+epjboXsmJ1qcKa96r8ZYzXmVo8+aPzI/9jKKyez6Unox/dnfnpKppZB2nJuLcsxQm6nocp2Caw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.4"
|
||||
"@types/bn.js" "^4.11.5"
|
||||
"@babel/runtime" "^7.7.7"
|
||||
"@types/bn.js" "^4.11.6"
|
||||
bn.js "^4.11.8"
|
||||
camelcase "^5.3.1"
|
||||
chalk "^3.0.0"
|
||||
@ -2469,9 +2469,9 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/bn.js@^4.11.5":
|
||||
"@types/bn.js@^4.11.6":
|
||||
version "4.11.6"
|
||||
resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c"
|
||||
resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c"
|
||||
integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
@ -14161,9 +14161,9 @@ sdp@^2.10.0, sdp@^2.6.0:
|
||||
resolved "https://registry.npmjs.org/sdp/-/sdp-2.11.2.tgz#1851ce7ac2915295fa806abd0d861ca0327e9861"
|
||||
integrity sha512-Oly+pE5hwmshcyNCEep4AZ6P7C1UTAzqsXhPRefYVFzxsCcVdHFBqmi/b+KON0uoKXyQvf8avUT4Z2P2kmCfiQ==
|
||||
|
||||
secp256k1@^3.7.0:
|
||||
secp256k1@^3.8.0:
|
||||
version "3.8.0"
|
||||
resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d"
|
||||
resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d"
|
||||
integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==
|
||||
dependencies:
|
||||
bindings "^1.5.0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user