Rework context with HOCs (#16)
* Rework context with HOCs * Type for signing requests list
This commit is contained in:
parent
0b63f9e7fe
commit
cdf5579b8e
@ -2,65 +2,62 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { OnActionFromCtx } from '../../components/types';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { ActionBar, Address } from '../../components';
|
||||
import { ActionContext } from '../../components/contexts';
|
||||
import { ActionBar, Address, withAction } from '../../components';
|
||||
import { editAccount } from '../../messaging';
|
||||
import { Name } from '../../partials';
|
||||
|
||||
type Props = {
|
||||
address: string,
|
||||
className?: string
|
||||
className?: string,
|
||||
onAction: OnActionFromCtx
|
||||
};
|
||||
|
||||
export default function Account ({ address, className }: Props) {
|
||||
function Account ({ address, className, onAction }: Props) {
|
||||
const [isEditing, setEditing] = useState(false);
|
||||
const [editedname, setName] = useState(null as string | null);
|
||||
|
||||
const toggleEdit = (): void => {
|
||||
setEditing(!isEditing);
|
||||
};
|
||||
const saveChanges = (): void => {
|
||||
if (editedname && editedname !== name) {
|
||||
editAccount(address, editedname)
|
||||
.then(() => onAction())
|
||||
.catch(console.error);
|
||||
}
|
||||
|
||||
toggleEdit();
|
||||
};
|
||||
|
||||
return (
|
||||
<ActionContext.Consumer>
|
||||
{(onAction) => {
|
||||
const saveChanges = (): void => {
|
||||
if (editedname && editedname !== name) {
|
||||
editAccount(address, editedname)
|
||||
.then(() => onAction())
|
||||
.catch(console.error);
|
||||
}
|
||||
|
||||
toggleEdit();
|
||||
};
|
||||
|
||||
return (
|
||||
<Address
|
||||
address={address}
|
||||
className={className}
|
||||
name={
|
||||
isEditing
|
||||
? (
|
||||
<Name
|
||||
address={address}
|
||||
isFocussed
|
||||
label={null}
|
||||
onBlur={saveChanges}
|
||||
onChange={setName}
|
||||
/>
|
||||
)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<ActionBar>
|
||||
<a href='#' onClick={toggleEdit}>Edit</a>
|
||||
<Link to={`/account/forget/${address}`}>Forget</Link>
|
||||
</ActionBar>
|
||||
</Address>
|
||||
);
|
||||
}}
|
||||
</ActionContext.Consumer>
|
||||
<Address
|
||||
address={address}
|
||||
className={className}
|
||||
name={
|
||||
isEditing
|
||||
? (
|
||||
<Name
|
||||
address={address}
|
||||
isFocussed
|
||||
label={null}
|
||||
onBlur={saveChanges}
|
||||
onChange={setName}
|
||||
/>
|
||||
)
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<ActionBar>
|
||||
<a href='#' onClick={toggleEdit}>Edit</a>
|
||||
<Link to={`/account/forget/${address}`}>Forget</Link>
|
||||
</ActionBar>
|
||||
</Address>
|
||||
);
|
||||
}
|
||||
|
||||
export default withAction(Account);
|
||||
|
||||
@ -2,40 +2,41 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { AccountsFromCtx } from '../../components/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { Button, Header, Tip } from '../../components';
|
||||
import { AccountContext } from '../../components/contexts';
|
||||
import { Button, Header, Tip, withAccounts } from '../../components';
|
||||
import Account from './Account';
|
||||
|
||||
type Props = {};
|
||||
type Props = {
|
||||
accounts: AccountsFromCtx
|
||||
};
|
||||
|
||||
export default function Accounts (props: Props) {
|
||||
function Accounts ({ accounts }: Props) {
|
||||
return (
|
||||
<AccountContext.Consumer>
|
||||
{(accounts) => (
|
||||
<div>
|
||||
<Header label='accounts' />
|
||||
{
|
||||
(accounts.length === 0)
|
||||
? <Tip header='add accounts' type='warn'>You currently don't have any accounts. Either create a new account or if you have an existing account you wish to use, import it with the seed phrase</Tip>
|
||||
: accounts.map(({ address }) => (
|
||||
<Account
|
||||
address={address}
|
||||
key={address}
|
||||
/>
|
||||
))
|
||||
}
|
||||
<Button
|
||||
label='I want to create a new account with a new seed'
|
||||
to='/account/create'
|
||||
/>
|
||||
<Button
|
||||
label='I have a pre-existing seed, import the account'
|
||||
to='/account/import'
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</AccountContext.Consumer>
|
||||
<div>
|
||||
<Header label='accounts' />
|
||||
{
|
||||
(accounts.length === 0)
|
||||
? <Tip header='add accounts' type='warn'>You currently don't have any accounts. Either create a new account or if you have an existing account you wish to use, import it with the seed phrase</Tip>
|
||||
: accounts.map(({ address }) => (
|
||||
<Account
|
||||
address={address}
|
||||
key={address}
|
||||
/>
|
||||
))
|
||||
}
|
||||
<Button
|
||||
label='I want to create a new account with a new seed'
|
||||
to='/account/create'
|
||||
/>
|
||||
<Button
|
||||
label='I have a pre-existing seed, import the account'
|
||||
to='/account/import'
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default withAccounts(Accounts);
|
||||
|
||||
@ -2,16 +2,19 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { OnActionFromCtx } from '../components/types';
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
|
||||
import { Address, Button, Header, Loading, TextArea } from '../components';
|
||||
import { ActionContext } from '../components/contexts';
|
||||
import { Address, Button, Header, Loading, TextArea, withAction } from '../components';
|
||||
import { createAccount, createSeed } from '../messaging';
|
||||
import { Back, Name, Password } from '../partials';
|
||||
|
||||
type Props = {};
|
||||
type Props = {
|
||||
onAction: OnActionFromCtx
|
||||
};
|
||||
|
||||
export default function Create (props: Props) {
|
||||
function Create ({ onAction }: Props) {
|
||||
const [account, setAccount] = useState(null as null | { address: string, seed: string });
|
||||
const [name, setName] = useState(null as string | null);
|
||||
const [password, setPassword] = useState(null as string | null);
|
||||
@ -22,52 +25,48 @@ export default function Create (props: Props) {
|
||||
.catch(console.error);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ActionContext.Consumer>
|
||||
{(onAction) => {
|
||||
// FIXME Duplicated between here and Import.tsx
|
||||
const onCreate = (): void => {
|
||||
// this should always be the case
|
||||
if (name && password && account) {
|
||||
createAccount(name, password, account.seed)
|
||||
.then(() => onAction('/'))
|
||||
.catch(console.error);
|
||||
}
|
||||
};
|
||||
// FIXME Duplicated between here and Import.tsx
|
||||
const onCreate = (): void => {
|
||||
// this should always be the case
|
||||
if (name && password && account) {
|
||||
createAccount(name, password, account.seed)
|
||||
.then(() => onAction('/'))
|
||||
.catch(console.error);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Header label='create account' />
|
||||
<Back />
|
||||
<Loading>{account && (
|
||||
<>
|
||||
<TextArea
|
||||
isReadOnly
|
||||
label={`generated 12-word mnemonic seed`}
|
||||
value={account.seed}
|
||||
/>
|
||||
<Name
|
||||
isFocussed
|
||||
onChange={setName}
|
||||
/>
|
||||
{name && <Password onChange={setPassword} />}
|
||||
{name && password && (
|
||||
<>
|
||||
<Address
|
||||
address={account.address}
|
||||
name={name}
|
||||
/>
|
||||
<Button
|
||||
label='Add the account with the generated seed'
|
||||
onClick={onCreate}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}</Loading>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
</ActionContext.Consumer>
|
||||
return (
|
||||
<div>
|
||||
<Header label='create account' />
|
||||
<Back />
|
||||
<Loading>{account && (
|
||||
<>
|
||||
<TextArea
|
||||
isReadOnly
|
||||
label={`generated 12-word mnemonic seed`}
|
||||
value={account.seed}
|
||||
/>
|
||||
<Name
|
||||
isFocussed
|
||||
onChange={setName}
|
||||
/>
|
||||
{name && <Password onChange={setPassword} />}
|
||||
{name && password && (
|
||||
<>
|
||||
<Address
|
||||
address={account.address}
|
||||
name={name}
|
||||
/>
|
||||
<Button
|
||||
label='Add the account with the generated seed'
|
||||
onClick={onCreate}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}</Loading>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default withAction(Create);
|
||||
|
||||
@ -2,44 +2,39 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { OnActionFromCtx } from '../components/types';
|
||||
|
||||
import React from 'react';
|
||||
import { RouteComponentProps, withRouter } from 'react-router';
|
||||
|
||||
import { Address, Button, Header, Tip } from '../components';
|
||||
import { Address, Button, Header, Tip, withAction } from '../components';
|
||||
import { forgetAccount } from '../messaging';
|
||||
import { Back } from '../partials';
|
||||
import { ActionContext } from '../components/contexts';
|
||||
|
||||
type Props = RouteComponentProps<{ address: string }> & {};
|
||||
type Props = RouteComponentProps<{ address: string }> & {
|
||||
onAction: OnActionFromCtx
|
||||
};
|
||||
|
||||
function Forget (props: Props) {
|
||||
const { match: { params: { address } } } = props;
|
||||
function Forget ({ match: { params: { address } }, onAction }: Props) {
|
||||
const onClick = (): void => {
|
||||
forgetAccount(address)
|
||||
.then(() => onAction('/'))
|
||||
.catch(console.error);
|
||||
};
|
||||
|
||||
return (
|
||||
<ActionContext.Consumer>
|
||||
{(onAction) => {
|
||||
const onClick = (): void => {
|
||||
forgetAccount(address)
|
||||
.then(() => onAction('/'))
|
||||
.catch(console.error);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Header label='forget account' />
|
||||
<Back />
|
||||
<Address address={address} />
|
||||
<Tip header='danger' type='error'>You are about to remove the account. This means that you will not be able to access it via this extension anymore. If you wish to recover it, you would need to use the seed.</Tip>
|
||||
<Button
|
||||
isDanger
|
||||
label='I want to forget this account'
|
||||
onClick={onClick}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
</ActionContext.Consumer>
|
||||
<div>
|
||||
<Header label='forget account' />
|
||||
<Back />
|
||||
<Address address={address} />
|
||||
<Tip header='danger' type='error'>You are about to remove the account. This means that you will not be able to access it via this extension anymore. If you wish to recover it, you would need to use the seed.</Tip>
|
||||
<Button
|
||||
isDanger
|
||||
label='I want to forget this account'
|
||||
onClick={onClick}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default withRouter(Forget);
|
||||
export default withAction(withRouter(Forget));
|
||||
|
||||
@ -2,16 +2,19 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { OnActionFromCtx } from '../components/types';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { Address, Button, Header, TextArea } from '../components';
|
||||
import { ActionContext } from '../components/contexts';
|
||||
import { Address, Button, Header, TextArea, withAction } from '../components';
|
||||
import { createAccount, validateSeed } from '../messaging';
|
||||
import { Back, Name, Password } from '../partials';
|
||||
|
||||
type Props = {};
|
||||
type Props = {
|
||||
onAction: OnActionFromCtx
|
||||
};
|
||||
|
||||
export default function Import (props: Props) {
|
||||
function Import ({ onAction }: Props) {
|
||||
const [account, setAccount] = useState(null as null | { address: string, seed: string });
|
||||
const [name, setName] = useState(null as string | null);
|
||||
const [password, setPassword] = useState(null as string | null);
|
||||
@ -26,46 +29,42 @@ export default function Import (props: Props) {
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<ActionContext.Consumer>
|
||||
{(onAction) => {
|
||||
// FIXME Duplicated between here and Create.tsx
|
||||
const onCreate = (): void => {
|
||||
// this should always be the case
|
||||
if (name && password && account) {
|
||||
createAccount(name, password, account.seed)
|
||||
.then(() => onAction('/'))
|
||||
.catch(console.error);
|
||||
}
|
||||
};
|
||||
// FIXME Duplicated between here and Create.tsx
|
||||
const onCreate = (): void => {
|
||||
// this should always be the case
|
||||
if (name && password && account) {
|
||||
createAccount(name, password, account.seed)
|
||||
.then(() => onAction('/'))
|
||||
.catch(console.error);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Header label='import account' />
|
||||
<Back />
|
||||
<TextArea
|
||||
isError={!account}
|
||||
isFocussed
|
||||
label={`existing 12 or 24-word mnemonic seed`}
|
||||
onChange={onChangeSeed}
|
||||
/>
|
||||
{account && <Name onChange={setName} />}
|
||||
{account && name && <Password onChange={setPassword} />}
|
||||
{account && name && password && (
|
||||
<>
|
||||
<Address
|
||||
address={account.address}
|
||||
name={name}
|
||||
/>
|
||||
<Button
|
||||
label='Add the account with the supplied seed'
|
||||
onClick={onCreate}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
</ActionContext.Consumer>
|
||||
return (
|
||||
<div>
|
||||
<Header label='import account' />
|
||||
<Back />
|
||||
<TextArea
|
||||
isError={!account}
|
||||
isFocussed
|
||||
label={`existing 12 or 24-word mnemonic seed`}
|
||||
onChange={onChangeSeed}
|
||||
/>
|
||||
{account && <Name onChange={setName} />}
|
||||
{account && name && <Password onChange={setPassword} />}
|
||||
{account && name && password && (
|
||||
<>
|
||||
<Address
|
||||
address={account.address}
|
||||
name={name}
|
||||
/>
|
||||
<Button
|
||||
label='Add the account with the supplied seed'
|
||||
onClick={onCreate}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default withAction(Import);
|
||||
|
||||
@ -37,7 +37,7 @@ export default styled(Details)`
|
||||
border: 0;
|
||||
display: block;
|
||||
font-size: 0.75rem;
|
||||
margin-left: 4.75rem;
|
||||
margin-top: 0.75rem;
|
||||
|
||||
td.data {
|
||||
max-width: 0;
|
||||
|
||||
@ -3,50 +3,45 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { MessageExtrinsicSign } from '@polkadot/extension/background/types';
|
||||
import { OnActionFromCtx } from '../../components/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { ActionBar, Address } from '../../components';
|
||||
import { ActionContext } from '../../components/contexts';
|
||||
import { cancelRequest } from '../../messaging';
|
||||
import { ActionBar, Address, withAction } from '../../components';
|
||||
import { approveRequest, cancelRequest } from '../../messaging';
|
||||
import Details from './Details';
|
||||
import Unlock from './Unlock';
|
||||
|
||||
type Props = {
|
||||
className?: string,
|
||||
isFirst: boolean,
|
||||
onAction: OnActionFromCtx,
|
||||
request: MessageExtrinsicSign,
|
||||
signId: number,
|
||||
url: string
|
||||
};
|
||||
|
||||
export default function Request ({ isFirst, request: { address, method, nonce }, signId, url }: Props) {
|
||||
return (
|
||||
<ActionContext.Consumer>
|
||||
{(onAction) => {
|
||||
const onCancel = (): void => {
|
||||
cancelRequest(signId)
|
||||
.then(() => onAction())
|
||||
.catch(console.error);
|
||||
};
|
||||
function Request ({ isFirst, onAction, request: { address, method, nonce }, signId, url }: Props) {
|
||||
const onCancel = (): void => {
|
||||
cancelRequest(signId)
|
||||
.then(() => onAction())
|
||||
.catch(console.error);
|
||||
};
|
||||
const onSign = (password: string): Promise<void> =>
|
||||
approveRequest(signId, password).then(() => onAction());
|
||||
|
||||
return (
|
||||
<Address address={address}>
|
||||
<Details
|
||||
method={method}
|
||||
nonce={nonce}
|
||||
url={url}
|
||||
/>
|
||||
<ActionBar>
|
||||
<a href='#' onClick={onCancel}>Cancel</a>
|
||||
</ActionBar>
|
||||
<Unlock
|
||||
isVisible={isFirst}
|
||||
signId={signId}
|
||||
/>
|
||||
</Address>
|
||||
);
|
||||
}}
|
||||
</ActionContext.Consumer>
|
||||
return (
|
||||
<Address address={address}>
|
||||
<Details
|
||||
method={method}
|
||||
nonce={nonce}
|
||||
url={url}
|
||||
/>
|
||||
<ActionBar>
|
||||
<a href='#' onClick={onCancel}>Cancel</a>
|
||||
</ActionBar>
|
||||
{isFirst && <Unlock onSign={onSign} />}
|
||||
</Address>
|
||||
);
|
||||
}
|
||||
|
||||
export default withAction(Request);
|
||||
|
||||
@ -3,23 +3,25 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Button, Input } from '../../components';
|
||||
import { ActionContext } from '../../components/contexts';
|
||||
import { approveRequest } from '../../messaging';
|
||||
|
||||
type Props = {
|
||||
signId: number,
|
||||
isVisible: boolean
|
||||
className?: string,
|
||||
onSign: (password: string) => Promise<void>
|
||||
};
|
||||
|
||||
export default function Unlock ({ isVisible, signId }: Props) {
|
||||
function Unlock ({ className, onSign }: Props) {
|
||||
const [error, setError] = useState('');
|
||||
const [password, setPassword] = useState('');
|
||||
|
||||
if (!isVisible) {
|
||||
return null;
|
||||
}
|
||||
const onClick = (): void => {
|
||||
onSign(password).catch((error) => {
|
||||
console.error(error);
|
||||
setError(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (error) {
|
||||
@ -28,33 +30,22 @@ export default function Unlock ({ isVisible, signId }: Props) {
|
||||
}, [password]);
|
||||
|
||||
return (
|
||||
<ActionContext.Consumer>
|
||||
{(onAction) => {
|
||||
const onSign = (): void => {
|
||||
approveRequest(signId, password)
|
||||
.then(() => onAction())
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
setError(error.message);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Input
|
||||
isError={!password || !!error}
|
||||
isFocussed
|
||||
label='password for this account'
|
||||
onChange={setPassword}
|
||||
type='password'
|
||||
/>
|
||||
<Button
|
||||
label='Sign the extrinsic'
|
||||
onClick={onSign}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}}
|
||||
</ActionContext.Consumer>
|
||||
<div className={className}>
|
||||
<Input
|
||||
isError={!password || !!error}
|
||||
isFocussed
|
||||
label='password for this account'
|
||||
onChange={setPassword}
|
||||
type='password'
|
||||
/>
|
||||
<Button
|
||||
label='Sign the extrinsic'
|
||||
onClick={onClick}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default styled(Unlock)`
|
||||
margin-bottom: -0.75rem;
|
||||
`;
|
||||
|
||||
@ -2,31 +2,32 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { RequestsFromCtx } from '../../components/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { Header } from '../../components';
|
||||
import { SigningContext } from '../../components/contexts';
|
||||
import { Header, withRequests } from '../../components';
|
||||
import Request from './Request';
|
||||
|
||||
type Props = {};
|
||||
type Props = {
|
||||
requests: RequestsFromCtx
|
||||
};
|
||||
|
||||
export default function Signing (props: Props) {
|
||||
function Signing ({ requests }: Props) {
|
||||
return (
|
||||
<SigningContext.Consumer>
|
||||
{(requests) => (
|
||||
<div>
|
||||
<Header label='requests' />
|
||||
{requests.map(([id, request, url], index) => (
|
||||
<Request
|
||||
isFirst={index === 0}
|
||||
key={id}
|
||||
request={request}
|
||||
signId={id}
|
||||
url={url}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</SigningContext.Consumer>
|
||||
<div>
|
||||
<Header label='requests' />
|
||||
{requests.map(([id, request, url], index) => (
|
||||
<Request
|
||||
isFirst={index === 0}
|
||||
key={id}
|
||||
request={request}
|
||||
signId={id}
|
||||
url={url}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default withRequests(Signing);
|
||||
|
||||
@ -2,15 +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 { AccountsFromCtx } from './types';
|
||||
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import Identicon from '@polkadot/ui-identicon';
|
||||
|
||||
import Box from './Box';
|
||||
import { AccountContext } from './contexts';
|
||||
import { withAccounts } from './contexts';
|
||||
import defaults from './defaults';
|
||||
|
||||
type Props = {
|
||||
accounts: AccountsFromCtx,
|
||||
address?: string | null,
|
||||
children?: React.ReactNode;
|
||||
className?: string,
|
||||
@ -19,37 +22,31 @@ type Props = {
|
||||
theme?: 'polkadot' | 'substrate'
|
||||
};
|
||||
|
||||
function Address ({ address, children, className, isHidden, name, theme = 'polkadot' }: Props) {
|
||||
function Address ({ accounts, address, children, className, isHidden, name, theme = 'polkadot' }: Props) {
|
||||
if (isHidden) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<AccountContext.Consumer>
|
||||
{(accounts) => {
|
||||
const account = accounts.find((account) => account.address === address);
|
||||
const account = accounts.find((account) => account.address === address);
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<Box className='details'>
|
||||
<div className='name'>{name || (account && account.meta.name) || '<unknown>'}</div>
|
||||
<div className='address'>{address || '<unknown>'}</div>
|
||||
<div className='children'>{children}</div>
|
||||
</Box>
|
||||
<Identicon
|
||||
className='icon'
|
||||
size={64}
|
||||
theme={theme}
|
||||
value={address}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
</AccountContext.Consumer>
|
||||
return (
|
||||
<div className={className}>
|
||||
<Box className='details'>
|
||||
<div className='name'>{name || (account && account.meta.name) || '<unknown>'}</div>
|
||||
<div className='address'>{address || '<unknown>'}</div>
|
||||
<div className='children'>{children}</div>
|
||||
</Box>
|
||||
<Identicon
|
||||
className='icon'
|
||||
size={64}
|
||||
theme={theme}
|
||||
value={address}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default styled(Address)`
|
||||
export default withAccounts(styled(Address)`
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
margin: ${defaults.boxMargin};
|
||||
@ -82,4 +79,4 @@ export default styled(Address)`
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
`;
|
||||
`);
|
||||
|
||||
@ -14,7 +14,7 @@ type Props = {
|
||||
isDisabled?: boolean,
|
||||
isSmall?: boolean,
|
||||
label?: string,
|
||||
onClick?: () => void,
|
||||
onClick?: () => any,
|
||||
to?: string
|
||||
};
|
||||
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
// Copyright 2019 @polkadot/extension-ui 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 { MessageExtrinsicSign } from '@polkadot/extension/background/types';
|
||||
import { KeyringJson } from '@polkadot/ui-keyring/types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
const noop = (to?: string) => {
|
||||
// do nothing
|
||||
};
|
||||
|
||||
const AccountContext = React.createContext([] as Array<KeyringJson>);
|
||||
const ActionContext = React.createContext(noop);
|
||||
const SigningContext = React.createContext([] as Array<[number, MessageExtrinsicSign, string]>);
|
||||
|
||||
export {
|
||||
AccountContext,
|
||||
ActionContext,
|
||||
SigningContext
|
||||
};
|
||||
69
packages/extension-ui/src/components/contexts.tsx
Normal file
69
packages/extension-ui/src/components/contexts.tsx
Normal file
@ -0,0 +1,69 @@
|
||||
// Copyright 2019 @polkadot/extension-ui 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 { AccountsFromCtx, OnActionFromCtx, RequestsFromCtx, SubtractProps } from './types';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
const noop = (to?: string) => {
|
||||
// do nothing
|
||||
};
|
||||
|
||||
const AccountContext = React.createContext([] as AccountsFromCtx);
|
||||
const ActionContext = React.createContext(noop as OnActionFromCtx);
|
||||
const SigningContext = React.createContext([] as RequestsFromCtx);
|
||||
|
||||
export {
|
||||
AccountContext,
|
||||
ActionContext,
|
||||
SigningContext
|
||||
};
|
||||
|
||||
export function withAccounts<P extends { accounts: AccountsFromCtx }> (Component: React.ComponentType<P>): React.ComponentType<SubtractProps<P, { accounts: AccountsFromCtx }>> {
|
||||
return (props: SubtractProps<P, { accounts: AccountsFromCtx }>) => {
|
||||
return (
|
||||
<AccountContext.Consumer>
|
||||
{(accounts) => (
|
||||
// @ts-ignore Something here with the props are going wonky
|
||||
<Component
|
||||
{...props}
|
||||
accounts={accounts}
|
||||
/>
|
||||
)}
|
||||
</AccountContext.Consumer>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function withAction<P extends { onAction: OnActionFromCtx }> (Component: React.ComponentType<P>): React.ComponentType<SubtractProps<P, { onAction: OnActionFromCtx }>> {
|
||||
return (props: SubtractProps<P, { onAction: OnActionFromCtx }>) => {
|
||||
return (
|
||||
<ActionContext.Consumer>
|
||||
{(onAction) => (
|
||||
// @ts-ignore Something here with the props are going wonky
|
||||
<Component
|
||||
{...props}
|
||||
onAction={onAction}
|
||||
/>
|
||||
)}
|
||||
</ActionContext.Consumer>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function withRequests<P extends { requests: RequestsFromCtx }> (Component: React.ComponentType<P>): React.ComponentType<SubtractProps<P, { requests: RequestsFromCtx }>> {
|
||||
return (props: SubtractProps<P, { requests: RequestsFromCtx }>) => {
|
||||
return (
|
||||
<SigningContext.Consumer>
|
||||
{(requests) => (
|
||||
// @ts-ignore Something here with the props are going wonky
|
||||
<Component
|
||||
{...props}
|
||||
requests={requests}
|
||||
/>
|
||||
)}
|
||||
</SigningContext.Consumer>
|
||||
);
|
||||
};
|
||||
}
|
||||
@ -13,5 +13,6 @@ export { default as TextArea } from './TextArea';
|
||||
export { default as Tip } from './Tip';
|
||||
export { default as View } from './View';
|
||||
|
||||
export * from './contexts';
|
||||
export { default as defaults } from './defaults';
|
||||
export { default as unicode } from './unicode';
|
||||
|
||||
13
packages/extension-ui/src/components/types.ts
Normal file
13
packages/extension-ui/src/components/types.ts
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright 2019 @polkadot/extension-ui 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 { SigningRequest } from '@polkadot/extension/background/types';
|
||||
import { KeyringJson } from '@polkadot/ui-keyring/types';
|
||||
|
||||
export type OmitProps<T, K> = Pick<T, Exclude<keyof T, K>>;
|
||||
export type SubtractProps<T, K> = OmitProps<T, keyof K>;
|
||||
|
||||
export type AccountsFromCtx = Array<KeyringJson>;
|
||||
export type OnActionFromCtx = (to?: string) => void;
|
||||
export type RequestsFromCtx = Array<SigningRequest>;
|
||||
@ -5,7 +5,7 @@
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"license": "Apache-2",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "^0.79.0-beta.31",
|
||||
"@polkadot/api": "^0.79.0-beta.33",
|
||||
"@polkadot/extension-ui": "^0.1.1-beta.0",
|
||||
"@polkadot/ui-keyring": "^0.39.0-beta.5"
|
||||
},
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { KeyringJson } from '@polkadot/ui-keyring/types';
|
||||
import { MessageTypes, MessageAccountCreate, MessageAccountEdit, MessageExtrinsicSign, MessageExtrinsicSignApprove, MessageExtrinsicSignCancel, MessageSeedCreate, MessageSeedCreate$Response, MessageSeedValidate, MessageSeedValidate$Response, MessageAccountForget } from '../types';
|
||||
import { MessageTypes, MessageAccountCreate, MessageAccountEdit, MessageExtrinsicSignApprove, MessageExtrinsicSignCancel, MessageSeedCreate, MessageSeedCreate$Response, MessageSeedValidate, MessageSeedValidate$Response, MessageAccountForget, SigningRequest } from '../types';
|
||||
|
||||
import keyring from '@polkadot/ui-keyring';
|
||||
import accountsObservable from '@polkadot/ui-keyring/observable/accounts';
|
||||
@ -111,7 +111,7 @@ export default class Extension {
|
||||
return true;
|
||||
}
|
||||
|
||||
private signingRequests (): Array<[number, MessageExtrinsicSign, string]> {
|
||||
private signingRequests (): Array<SigningRequest> {
|
||||
return this.signing.requests;
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,8 @@ import { KeypairType } from '@polkadot/util-crypto/types';
|
||||
|
||||
export type MessageTypes = 'accounts.create' | 'accounts.edit' | 'accounts.forget' | 'accounts.list' | 'extrinsic.sign' | 'seed.create' | 'seed.validate' | 'signing.approve' | 'signing.cancel' | 'signing.requests';
|
||||
|
||||
export type SigningRequest = [number, MessageExtrinsicSign, string];
|
||||
|
||||
export type MessageRequest = {
|
||||
id: number,
|
||||
message: MessageTypes,
|
||||
|
||||
112
yarn.lock
112
yarn.lock
@ -2079,29 +2079,29 @@
|
||||
universal-user-agent "^2.0.0"
|
||||
url-template "^2.0.8"
|
||||
|
||||
"@polkadot/api-derive@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.79.0-beta.31.tgz#a8f4529cf9ee4200d4d8b8c4581e8deeb468be84"
|
||||
integrity sha512-vkge6cvnKWS0fwfiOKPYFyXvXWUiWC687prjQagJBRS3FCiD/JSYrSP4Sak9WN8rQDLBVBH8frkbwZLxTOvwBw==
|
||||
"@polkadot/api-derive@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-0.79.0-beta.33.tgz#951ac83a77f08da3b85968f0bd4f6155f5d156db"
|
||||
integrity sha512-3tEr4Yy232e7Mkni50rUTxKvJbsRZfAW4XtwjKFZkUYKJQ0z2k3l/HUbIGDeQO9CgJxNT4I94w6fp1mMs6e3LQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/api" "^0.79.0-beta.31"
|
||||
"@polkadot/types" "^0.79.0-beta.31"
|
||||
"@polkadot/api" "^0.79.0-beta.33"
|
||||
"@polkadot/types" "^0.79.0-beta.33"
|
||||
"@types/memoizee" "^0.4.2"
|
||||
memoizee "^0.4.14"
|
||||
|
||||
"@polkadot/api@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.79.0-beta.31.tgz#ded4b7e6aa9afcb0de766ba2e24f77521e838072"
|
||||
integrity sha512-0hEK1zL22+Yqqu3o6lqIMN4nAgwHbWbq9frPqLvWIkdUYpyA1tMp8EsmU3ZF1wWhxiR1s6aw1Gf2mFnYC0KKwg==
|
||||
"@polkadot/api@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.79.0-beta.33.tgz#077892c3c20232d87031ef452c31296d882ab22f"
|
||||
integrity sha512-VpAOYjFHXNu7+CSi3erJ+n/E4NEZMM3vEr9up5+eiN8N3YbVS7bNcs0Tf/6ZuKWMDudjNWeX8zvwqcgMJo3DAQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/api-derive" "^0.79.0-beta.31"
|
||||
"@polkadot/extrinsics" "^0.79.0-beta.31"
|
||||
"@polkadot/rpc-provider" "^0.79.0-beta.31"
|
||||
"@polkadot/rpc-rx" "^0.79.0-beta.31"
|
||||
"@polkadot/storage" "^0.79.0-beta.31"
|
||||
"@polkadot/types" "^0.79.0-beta.31"
|
||||
"@polkadot/api-derive" "^0.79.0-beta.33"
|
||||
"@polkadot/extrinsics" "^0.79.0-beta.33"
|
||||
"@polkadot/rpc-provider" "^0.79.0-beta.33"
|
||||
"@polkadot/rpc-rx" "^0.79.0-beta.33"
|
||||
"@polkadot/storage" "^0.79.0-beta.33"
|
||||
"@polkadot/types" "^0.79.0-beta.33"
|
||||
"@polkadot/util-crypto" "^0.91.0-beta.1"
|
||||
|
||||
"@polkadot/dev-react@^0.30.0-beta.4":
|
||||
@ -2177,19 +2177,19 @@
|
||||
typescript "^3.4.5"
|
||||
vuepress "^1.0.0-alpha.47"
|
||||
|
||||
"@polkadot/extrinsics@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.79.0-beta.31.tgz#febd1121e584b8fb1ab07c3ccec23f525577e4a3"
|
||||
integrity sha512-g9QJNRFSzSdH5zOdn8C+UHKbNl2B2YsREORHQ7ewwghAYlHiYBmkL4m4YS3XWQUP9jLL6gdoepQ8d1uh0UZzrA==
|
||||
"@polkadot/extrinsics@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.79.0-beta.33.tgz#9e498eebd48555ec4c518493b352450ac6a73a03"
|
||||
integrity sha512-vvNAON0FCN5q/vLCwwDfURIPOlHF+5q9uSqT/w+0cMjEJLnDCDhn6RaZPozsJJR4jnPsy2O5CCiW9X9+Ch8FIA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/types" "^0.79.0-beta.31"
|
||||
"@polkadot/types" "^0.79.0-beta.33"
|
||||
"@polkadot/util" "^0.91.0-beta.1"
|
||||
|
||||
"@polkadot/jsonrpc@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.79.0-beta.31.tgz#f619bd8f1f4574520c5bf1dc9d072fd9e6fa9ee2"
|
||||
integrity sha512-uTTdfIeE8u/YbH9/PvoDbl+EoAjlDZmIa0CfrZ5uizwA4yO9j/PBCfun9Ym9Fk3bDylVOECBM3XOlgS4/ZWC5g==
|
||||
"@polkadot/jsonrpc@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.79.0-beta.33.tgz#6c38b9e20c725d3605483043b01d49bf4c64b254"
|
||||
integrity sha512-N9wO7itlXImUENR8gTQh9n80lGjL/p+zBtuhPaLhwS8naTcJPLpAE+Hm6yWj7fUIc5VOJZpLTmVkfCcJpyRp2Q==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
|
||||
@ -2204,25 +2204,25 @@
|
||||
"@types/bs58" "^4.0.0"
|
||||
bs58 "^4.0.1"
|
||||
|
||||
"@polkadot/rpc-core@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.79.0-beta.31.tgz#5c2d7c86911275135114e23903a7a800384c8935"
|
||||
integrity sha512-kmxwRU3W1/VOPBQYsQgNoB2pGU53xSsYAz7UCjSljgBJSyMazykirIJoMJSMG8bOcIZz2pWfhUsKjqukgGEWcA==
|
||||
"@polkadot/rpc-core@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.79.0-beta.33.tgz#e8f13cced186d6d8be4838581a045aeb276addbf"
|
||||
integrity sha512-8EEsYxSKnTqHAkeJoji3HkBa/yFKiVj42K4MrL1i+myxKfvqFmeR92UnuNHQqWqHNfrv6963v5npPhPWDYsDsQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/jsonrpc" "^0.79.0-beta.31"
|
||||
"@polkadot/rpc-provider" "^0.79.0-beta.31"
|
||||
"@polkadot/types" "^0.79.0-beta.31"
|
||||
"@polkadot/jsonrpc" "^0.79.0-beta.33"
|
||||
"@polkadot/rpc-provider" "^0.79.0-beta.33"
|
||||
"@polkadot/types" "^0.79.0-beta.33"
|
||||
"@polkadot/util" "^0.91.0-beta.1"
|
||||
|
||||
"@polkadot/rpc-provider@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.79.0-beta.31.tgz#29a9c9591067263be49178330c34b581e77b8534"
|
||||
integrity sha512-NhJf7TvfJ9iRutJNYDXILVU/FIzxP8aAEPNS5HQrosSJMYuBni+vXV2YBQDixovlSpvHe6wjPM6Gn/Oc2yQkxA==
|
||||
"@polkadot/rpc-provider@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.79.0-beta.33.tgz#ae2345412c688b4b0073940e4746c35f16d99e99"
|
||||
integrity sha512-f/1aKBRo6SwKG3chlAYsaUwSF6Kod2cxPNcVtZyraOo0BONfh6atQuA8Pp3kSpYYkawCuwiUhTmJPDTSs5s7zA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/keyring" "^0.91.0-beta.1"
|
||||
"@polkadot/storage" "^0.79.0-beta.31"
|
||||
"@polkadot/storage" "^0.79.0-beta.33"
|
||||
"@polkadot/util" "^0.91.0-beta.1"
|
||||
"@polkadot/util-crypto" "^0.91.0-beta.1"
|
||||
"@types/nock" "^9.3.1"
|
||||
@ -2230,27 +2230,27 @@
|
||||
isomorphic-fetch "^2.2.1"
|
||||
websocket "^1.0.28"
|
||||
|
||||
"@polkadot/rpc-rx@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-rx/-/rpc-rx-0.79.0-beta.31.tgz#5d22c55c6567134444812212eef39f3e78ad8c08"
|
||||
integrity sha512-K9dIZBpoObD4T1sW6B5GExw3xsqk3S3jWeFiVWGv5am3/spr31Jx94ujEgAw4E8RfWAZ4DV9YMr+8LaIDCZClA==
|
||||
"@polkadot/rpc-rx@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/rpc-rx/-/rpc-rx-0.79.0-beta.33.tgz#43463df50380d86d479eb1e3d4cdd0866333b831"
|
||||
integrity sha512-WlqCs/dT/6W9g2nttge09r/9alYEh7+spb6QLFuZr9NAazzL+c/tvOeg95hp/WaxpIXvjSF1mo3QRgVvE2XuLg==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/rpc-core" "^0.79.0-beta.31"
|
||||
"@polkadot/rpc-provider" "^0.79.0-beta.31"
|
||||
"@polkadot/rpc-core" "^0.79.0-beta.33"
|
||||
"@polkadot/rpc-provider" "^0.79.0-beta.33"
|
||||
"@types/memoizee" "^0.4.2"
|
||||
"@types/rx" "^4.1.1"
|
||||
memoizee "^0.4.14"
|
||||
rxjs "^6.5.2"
|
||||
|
||||
"@polkadot/storage@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.79.0-beta.31.tgz#720a43eaa0d7d2cdd6d031a74b6ddd01c87951cd"
|
||||
integrity sha512-hMZnjhfqyfG5BhG7EJF9e2/KjHH3ntLVz4tQkIbNBxZq5LZga2zwYIGjgGQ3r/b+C7vPv7p3VoJW2tnPm5vL3g==
|
||||
"@polkadot/storage@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.79.0-beta.33.tgz#14c66f37325d26866deb1d2d88307005f65ec115"
|
||||
integrity sha512-VTH3d+vIuNR6l4heLBdlUCamwLZriPcqyMZ+CCqts1qK6T8v4bgRfpBaYFpMkpiucuKYRWT4FyIi6ucHlm/tIA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/keyring" "^0.91.0-beta.1"
|
||||
"@polkadot/types" "^0.79.0-beta.31"
|
||||
"@polkadot/types" "^0.79.0-beta.33"
|
||||
"@polkadot/util" "^0.91.0-beta.1"
|
||||
"@polkadot/util-crypto" "^0.91.0-beta.1"
|
||||
|
||||
@ -2259,10 +2259,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.56.tgz#ffd6e9c95704a7fb90b918193b9dc5c440114b27"
|
||||
integrity sha512-wnt4zXxZXyz6WaubTO/I+nUElwV2DogFzdl6CrKfVn2PTWp8uHN06W9s40FH57ORtmQfDr9rLRP8Nq+oIyElbg==
|
||||
|
||||
"@polkadot/types@^0.79.0-beta.31":
|
||||
version "0.79.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.79.0-beta.31.tgz#3e66dec097653a17386f687a70a86bc2520894ea"
|
||||
integrity sha512-ibVRBIirFCUYSQsMFBLSNGl0hp86tWM2RXnx3MDT5WiX4qGUOEy5aKTFU+hCDC8NhHa5+oNw8EeIDZ3waRI/4g==
|
||||
"@polkadot/types@^0.79.0-beta.33":
|
||||
version "0.79.0-beta.33"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.79.0-beta.33.tgz#ff1f19868971ab38729ceef0f1099a175c41f666"
|
||||
integrity sha512-2tN3rOw1dETxMaGJWCA7cmgAof0UujEMxSxa1W327z7hPpyS13TjnoT23ZqRCvGpDLLQlxv06+BiTdrQwYkUSQ==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/keyring" "^0.91.0-beta.1"
|
||||
@ -2402,10 +2402,10 @@
|
||||
dependencies:
|
||||
"@types/base-x" "*"
|
||||
|
||||
"@types/chrome@^0.0.85":
|
||||
version "0.0.85"
|
||||
resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.85.tgz#f5db3500c92259b30abfb8e75e7ddf96b4075504"
|
||||
integrity sha512-V8w4/Nbz7xh8wDdeV6GAQLn9AdaTF8+ugXGG9O5D+kSEZPOLJLcDqNRGleklIsZeqFZ2zVs9B4hqiiMPqv/QOA==
|
||||
"@types/chrome@^0.0.86":
|
||||
version "0.0.86"
|
||||
resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.86.tgz#1026ef8e76db4fde1859cae858d73236fe670d69"
|
||||
integrity sha512-7ehebPf/5IR64SYdD2Vig0q0oUCNbWMQ29kASlNJaHVVtA5/J/DnrxnYVPCID70o7LgHdYsav6I4/XdqAxjTLQ==
|
||||
dependencies:
|
||||
"@types/filesystem" "*"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user