This commit is contained in:
Jaco Greeff 2019-08-27 15:19:59 +02:00 committed by GitHub
parent f8b9a47dd4
commit 4c53997b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 867 additions and 983 deletions

View File

@ -10,10 +10,10 @@
"packages/*"
],
"resolutions": {
"@polkadot/api": "^0.91.0-beta.1",
"@polkadot/api-contract": "^0.91.0-beta.1",
"@polkadot/api": "^0.91.0-beta.2",
"@polkadot/api-contract": "^0.91.0-beta.2",
"@polkadot/keyring": "^1.1.1",
"@polkadot/types": "^0.91.0-beta.1",
"@polkadot/types": "^0.91.0-beta.2",
"@polkadot/util": "^1.1.1",
"@polkadot/util-crypto": "^1.1.1",
"@types/styled-components": "4.1.8",
@ -34,8 +34,8 @@
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/runtime": "^7.5.5",
"@polkadot/dev-react": "^0.31.0-beta.3",
"@polkadot/ts": "^0.1.65",
"@polkadot/dev-react": "^0.31.0-beta.4",
"@polkadot/ts": "^0.1.68",
"autoprefixer": "^9.6.1",
"empty": "^0.10.1",
"gh-pages": "^2.1.1",

View File

@ -17,6 +17,6 @@
"babel-plugin-module-resolver": "^3.1.1",
"detect-browser": "^4.6.0",
"file-saver": "^2.0.0",
"yargs": "^13.2.0"
"yargs": "^14.0.0"
}
}

View File

@ -61,9 +61,11 @@ class Banner extends React.PureComponent<Props> {
<div className={className}>
<div className='box'>
<div className='info'>
<p>{t('It is recommended that you create/store your accounts securely and externally from the app. On {{yourBrowser}} the following browser extensions are available for use -', { replace: {
yourBrowser: stringUpperFirst(browserName)
} })}</p>
<p>{t('It is recommended that you create/store your accounts securely and externally from the app. On {{yourBrowser}} the following browser extensions are available for use -', {
replace: {
yourBrowser: stringUpperFirst(browserName)
}
})}</p>
<ul>{available[browserName].map(({ desc, name, link }): React.ReactNode => (
<li key={name}>
<a

View File

@ -149,7 +149,7 @@ class App extends TxModal<Props, State> {
text={payload}
>
<Payload
data-for={`tx-payload`}
data-for='tx-payload'
data-tip
>
{payload}
@ -166,7 +166,7 @@ class App extends TxModal<Props, State> {
</div>
<Signature
onChange={this.onChangeSignature}
placeholder={`{\n\t"address": "0x ...",\n\t"msg": "Pay KSMs to the Kusama account: ...",\n\t"sig": "0x ...",\n\t"version": "2"\n}`}
placeholder='{\n "address": "0x ...",\n "msg": "Pay KSMs to the Kusama account: ...",\n "sig": "0x ...",\n "version": "2"\n}'
rows={10}
/>
{(step === Step.Sign) && (

View File

@ -65,7 +65,7 @@ export function sigToParts (_signature: string): SignatureParts {
const recovery = v - 27;
assert(recovery === 0 || recovery === 1, `Invalid signature v value`);
assert(recovery === 0 || recovery === 1, 'Invalid signature v value');
return {
recovery,

View File

@ -11,7 +11,7 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@polkadot/api-contract": "^0.91.0-beta.1",
"@polkadot/react-components": "^0.35.0-beta.7"
"@polkadot/api-contract": "^0.91.0-beta.2",
"@polkadot/react-components": "^0.35.0-beta.6"
}
}

View File

@ -27,7 +27,7 @@ interface State {
}
class Developer extends React.PureComponent<Props, State> {
private defaultCode: string = `{\n\n}`;
private defaultCode: string = '{\n\n}';
public constructor (props: Props) {
super(props);

View File

@ -51,7 +51,7 @@ class Verify extends React.PureComponent<Props, State> {
cryptoOptions: [{ value: 'unknown', text: t('Crypto not detected') }].concat(uiSettings.availableCryptos as any[]),
cryptoType: 'unknown',
currentPublicKey,
defaultPublicKey: currentPublicKey || void 0,
defaultPublicKey: currentPublicKey || undefined,
data: '',
isHexData: false,
isValidAddress: !!currentPair,
@ -131,7 +131,7 @@ class Verify extends React.PureComponent<Props, State> {
className='full'
icon={
<Icon
color={isValid ? 'green' : (isValidSignature ? 'red' : void 0)}
color={isValid ? 'green' : (isValidSignature ? 'red' : undefined)}
name={isValid ? 'check circle' : (isValidSignature ? 'exclamation circle' : 'help circle')}
size='big'
/>

View File

@ -15,7 +15,7 @@
"@babel/runtime": "^7.5.5",
"@polkadot/react-components": "^0.35.0-beta.7",
"@polkadot/react-signer": "^0.35.0-beta.7",
"@polkadot/ui-assets": "^0.43.0-beta.0",
"@polkadot/ui-assets": "^0.43.0-beta.1",
"query-string": "^6.8.2"
}
}

View File

@ -64,7 +64,7 @@ class Connecting extends React.PureComponent<Props> {
}
{
isWs && isWsRemote && isHttps
? <div>{t(`You are connecting from a secure location to an insecure WebSocket ({{wsUrl}}). Due to browser mixed-content security policies this connection type is not allowed. Change the RPC service to a secure 'wss' endpoint.`, { replace: { wsUrl } })}</div>
? <div>{t('You are connecting from a secure location to an insecure WebSocket ({{wsUrl}}). Due to browser mixed-content security policies this connection type is not allowed. Change the RPC service to a secure \'wss\' endpoint.', { replace: { wsUrl } })}</div>
: undefined
}
</BaseOverlay>

View File

@ -39,9 +39,9 @@ function createWebpack ({ alias = {}, context, name = 'index' }) {
].filter((entry) => entry),
mode: ENV,
output: {
chunkFilename: `[name].[chunkhash:8].js`,
filename: `[name].[hash:8].js`,
globalObject: `(typeof self !== 'undefined' ? self : this)`,
chunkFilename: '[name].[chunkhash:8].js',
filename: '[name].[hash:8].js',
globalObject: '(typeof self !== \'undefined\' ? self : this)',
path: path.join(context, 'build')
},
resolve: {
@ -184,7 +184,7 @@ function createWebpack ({ alias = {}, context, name = 'index' }) {
}),
new webpack.optimize.SplitChunksPlugin(),
new MiniCssExtractPlugin({
filename: `[name].[contenthash:8].css`
filename: '[name].[contenthash:8].css'
}),
isProd
? null

View File

@ -31,8 +31,8 @@
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-reactive#readme",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@polkadot/api": "^0.91.0-beta.1",
"@polkadot/extension-dapp": "^0.8.1",
"@polkadot/api": "^0.91.0-beta.2",
"@polkadot/extension-dapp": "^0.9.0-beta.0",
"rxjs-compat": "^6.4.0"
}
}

View File

@ -18,7 +18,7 @@ export default function withApi <P extends ApiProps> (Inner: React.ComponentType
return (
<ApiConsumer>
{(apiProps?: ApiProps): React.ReactNode => {
assert(apiProps && apiProps.api, `Application root must be wrapped inside 'rx-react/Api' to provide API context`);
assert(apiProps && apiProps.api, 'Application root must be wrapped inside \'react-api/Api\' to provide API context');
return (
// @ts-ignore Something here with the props are going wonky

View File

@ -46,7 +46,7 @@ export default function withCall<P extends ApiProps> (
return (Inner: React.ComponentType<ApiProps>): React.ComponentType<SubtractProps<P, ApiProps>> => {
class WithPromise extends React.Component<P, State> {
public state: State = {
callResult: void 0,
callResult: undefined,
callUpdated: false,
callUpdatedAt: 0
};
@ -151,7 +151,7 @@ export default function withCall<P extends ApiProps> (
assert(area.length && section.length && method.length && others.length === 0, `Invalid API format, expected <area>.<section>.<method>, found ${endpoint}`);
assert(['consts', 'rpc', 'query', 'derive'].includes(area), `Unknown api.${area}, expected consts, rpc, query or derive`);
assert(!at || area === 'query', `Only able to do an 'at' query on the api.query interface`);
assert(!at || area === 'query', 'Only able to do an \'at\' query on the api.query interface');
const apiSection = (api as any)[area][section];

View File

@ -24,7 +24,7 @@ export default function withObservable<T, P> (observable: Observable<P>, { callO
return (Inner: React.ComponentType<any>, defaultProps: DefaultProps = {}, render?: RenderFn): React.ComponentType<any> => {
return class WithObservable extends React.Component<any, State> {
public state: State = {
callResult: void 0,
callResult: undefined,
callUpdated: false,
callUpdatedAt: 0,
subscriptions: []

View File

@ -13,21 +13,21 @@
"@babel/runtime": "^7.5.5",
"@polkadot/keyring": "^1.1.1",
"@polkadot/react-api": "^0.35.0-beta.7",
"@polkadot/react-identicon": "^0.43.0-beta.0",
"@polkadot/react-identicon": "^0.43.0-beta.1",
"@polkadot/react-query": "^0.35.0-beta.7",
"@polkadot/ui-keyring": "^0.43.0-beta.0",
"@polkadot/ui-settings": "^0.43.0-beta.0",
"@types/chart.js": "^2.8.1",
"@polkadot/ui-keyring": "^0.43.0-beta.1",
"@polkadot/ui-settings": "^0.43.0-beta.1",
"@types/chart.js": "^2.8.4",
"@types/i18next": "^12.1.0",
"@types/react-copy-to-clipboard": "^4.2.6",
"@types/react-dropzone": "^4.2.2",
"@types/react-router-dom": "^4.3.2",
"@types/react-router-dom": "^4.3.5",
"@types/react-tooltip": "^3.9.3",
"@types/styled-components": "4.1.8",
"@types/styled-theming": "2.2.1",
"chart.js": "^2.8.0",
"codeflask": "^1.4.0",
"i18next": "^17.0.10",
"i18next": "^17.0.12",
"i18next-browser-languagedetector": "^3.0.3",
"i18next-xhr-backend": "^3.1.2",
"react": "^16.8.2",

View File

@ -182,7 +182,7 @@ class InputNumber extends React.PureComponent<Props, State> {
return new RegExp(
(isSi || isDecimal)
? `^(0|[1-9]\\d*)(\\${KEYS.DECIMAL}\\d*)?$`
: `^(0|[1-9]\\d*)$`
: '^(0|[1-9]\\d*)$'
);
}

View File

@ -93,7 +93,7 @@ export default function getInitValue (def: TypeDef): RawParamValue | RawParamVal
case 'SessionKey':
case 'StorageKey':
case 'ValidatorId':
return void 0;
return undefined;
case 'Extrinsic':
return new U8a();

1774
yarn.lock

File diff suppressed because it is too large Load Diff