Recover from empty phrase in dev mode (#5698)
* Add dev chain to isTest * Fix signer * Fix no condfition transactions * Fix case : old parity * Fix propTypes.
This commit is contained in:
parent
e6a31e7543
commit
c2c7231cad
@ -255,7 +255,8 @@ export default class Status {
|
|||||||
.then(([nodeKind, netPeers, clientVersion, netVersion, netChain]) => {
|
.then(([nodeKind, netPeers, clientVersion, netVersion, netChain]) => {
|
||||||
const isTest = [
|
const isTest = [
|
||||||
'2', // morden
|
'2', // morden
|
||||||
'3', // ropsten
|
'3', // ropsten,
|
||||||
|
'17', // devchain
|
||||||
'42' // kovan
|
'42' // kovan
|
||||||
].includes(netVersion);
|
].includes(netVersion);
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ class TxRow extends Component {
|
|||||||
|
|
||||||
getCondition = () => {
|
getCondition = () => {
|
||||||
const { blockNumber, tx } = this.props;
|
const { blockNumber, tx } = this.props;
|
||||||
let { time, block } = tx.condition;
|
let { time, block } = tx.condition || {};
|
||||||
|
|
||||||
if (time) {
|
if (time) {
|
||||||
if ((time.getTime() - Date.now()) >= 0) {
|
if ((time.getTime() - Date.now()) >= 0) {
|
||||||
@ -336,7 +336,7 @@ class TxRow extends Component {
|
|||||||
} else {
|
} else {
|
||||||
return 'submitting';
|
return 'submitting';
|
||||||
}
|
}
|
||||||
} else if (blockNumber) {
|
} else if (blockNumber && block) {
|
||||||
block = blockNumber.minus(block);
|
block = blockNumber.minus(block);
|
||||||
// return (block.toNumber() < 0)
|
// return (block.toNumber() < 0)
|
||||||
// ? block.abs().toFormat(0) + ' blocks left'
|
// ? block.abs().toFormat(0) + ' blocks left'
|
||||||
|
@ -29,7 +29,12 @@ export default class RequestOrigin extends Component {
|
|||||||
static propTypes = {
|
static propTypes = {
|
||||||
origin: PropTypes.shape({
|
origin: PropTypes.shape({
|
||||||
type: PropTypes.oneOf(['unknown', 'dapp', 'rpc', 'ipc', 'signer']),
|
type: PropTypes.oneOf(['unknown', 'dapp', 'rpc', 'ipc', 'signer']),
|
||||||
details: PropTypes.string.isRequired
|
details: PropTypes.oneOfType([
|
||||||
|
PropTypes.string,
|
||||||
|
PropTypes.shape({
|
||||||
|
session: PropTypes.string.isRequired
|
||||||
|
})
|
||||||
|
]).isRequired
|
||||||
}).isRequired
|
}).isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -126,7 +131,9 @@ export default class RequestOrigin extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (origin.type === 'signer') {
|
if (origin.type === 'signer') {
|
||||||
return this.renderSigner(origin.details);
|
const session = origin.details && origin.details.session || origin.details;
|
||||||
|
|
||||||
|
return this.renderSigner(session);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
51
js/yarn.lock
51
js/yarn.lock
@ -724,6 +724,15 @@ babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015
|
|||||||
babel-runtime "^6.22.0"
|
babel-runtime "^6.22.0"
|
||||||
babel-template "^6.22.0"
|
babel-template "^6.22.0"
|
||||||
|
|
||||||
|
babel-plugin-transform-es2015-modules-commonjs@6.24.1:
|
||||||
|
version "6.24.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe"
|
||||||
|
dependencies:
|
||||||
|
babel-plugin-transform-strict-mode "^6.24.1"
|
||||||
|
babel-runtime "^6.22.0"
|
||||||
|
babel-template "^6.24.1"
|
||||||
|
babel-types "^6.24.1"
|
||||||
|
|
||||||
babel-plugin-transform-es2015-modules-commonjs@^6.22.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.0, babel-plugin-transform-es2015-modules-commonjs@^6.6.0:
|
babel-plugin-transform-es2015-modules-commonjs@^6.22.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.0, babel-plugin-transform-es2015-modules-commonjs@^6.6.0:
|
||||||
version "6.24.0"
|
version "6.24.0"
|
||||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz#e921aefb72c2cc26cb03d107626156413222134f"
|
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz#e921aefb72c2cc26cb03d107626156413222134f"
|
||||||
@ -895,6 +904,13 @@ babel-plugin-transform-strict-mode@^6.22.0:
|
|||||||
babel-runtime "^6.22.0"
|
babel-runtime "^6.22.0"
|
||||||
babel-types "^6.22.0"
|
babel-types "^6.22.0"
|
||||||
|
|
||||||
|
babel-plugin-transform-strict-mode@^6.24.1:
|
||||||
|
version "6.24.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
|
||||||
|
dependencies:
|
||||||
|
babel-runtime "^6.22.0"
|
||||||
|
babel-types "^6.24.1"
|
||||||
|
|
||||||
babel-plugin-webpack-alias@2.1.2:
|
babel-plugin-webpack-alias@2.1.2:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/babel-plugin-webpack-alias/-/babel-plugin-webpack-alias-2.1.2.tgz#05a1ba23c28595660fb6ea5736424fc596b4a247"
|
resolved "https://registry.yarnpkg.com/babel-plugin-webpack-alias/-/babel-plugin-webpack-alias-2.1.2.tgz#05a1ba23c28595660fb6ea5736424fc596b4a247"
|
||||||
@ -904,7 +920,7 @@ babel-plugin-webpack-alias@2.1.2:
|
|||||||
lodash.some "^4.5.1"
|
lodash.some "^4.5.1"
|
||||||
lodash.template "^4.3.0"
|
lodash.template "^4.3.0"
|
||||||
|
|
||||||
babel-polyfill@6.23.0, babel-polyfill@^6.23.0:
|
babel-polyfill@^6.23.0:
|
||||||
version "6.23.0"
|
version "6.23.0"
|
||||||
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
|
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -1070,6 +1086,16 @@ babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.23.0, babel-te
|
|||||||
babylon "^6.11.0"
|
babylon "^6.11.0"
|
||||||
lodash "^4.2.0"
|
lodash "^4.2.0"
|
||||||
|
|
||||||
|
babel-template@^6.24.1:
|
||||||
|
version "6.24.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333"
|
||||||
|
dependencies:
|
||||||
|
babel-runtime "^6.22.0"
|
||||||
|
babel-traverse "^6.24.1"
|
||||||
|
babel-types "^6.24.1"
|
||||||
|
babylon "^6.11.0"
|
||||||
|
lodash "^4.2.0"
|
||||||
|
|
||||||
babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.19.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1:
|
babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.19.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1:
|
||||||
version "6.23.1"
|
version "6.23.1"
|
||||||
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48"
|
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48"
|
||||||
@ -1084,6 +1110,20 @@ babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.19.0, babel-tr
|
|||||||
invariant "^2.2.0"
|
invariant "^2.2.0"
|
||||||
lodash "^4.2.0"
|
lodash "^4.2.0"
|
||||||
|
|
||||||
|
babel-traverse@^6.24.1:
|
||||||
|
version "6.24.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695"
|
||||||
|
dependencies:
|
||||||
|
babel-code-frame "^6.22.0"
|
||||||
|
babel-messages "^6.23.0"
|
||||||
|
babel-runtime "^6.22.0"
|
||||||
|
babel-types "^6.24.1"
|
||||||
|
babylon "^6.15.0"
|
||||||
|
debug "^2.2.0"
|
||||||
|
globals "^9.0.0"
|
||||||
|
invariant "^2.2.0"
|
||||||
|
lodash "^4.2.0"
|
||||||
|
|
||||||
babel-types@^6.14.0, babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0:
|
babel-types@^6.14.0, babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0:
|
||||||
version "6.23.0"
|
version "6.23.0"
|
||||||
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf"
|
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf"
|
||||||
@ -1093,6 +1133,15 @@ babel-types@^6.14.0, babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19
|
|||||||
lodash "^4.2.0"
|
lodash "^4.2.0"
|
||||||
to-fast-properties "^1.0.1"
|
to-fast-properties "^1.0.1"
|
||||||
|
|
||||||
|
babel-types@^6.24.1:
|
||||||
|
version "6.24.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975"
|
||||||
|
dependencies:
|
||||||
|
babel-runtime "^6.22.0"
|
||||||
|
esutils "^2.0.2"
|
||||||
|
lodash "^4.2.0"
|
||||||
|
to-fast-properties "^1.0.1"
|
||||||
|
|
||||||
babylon@^6.11.0, babylon@^6.13.0, babylon@^6.14.1, babylon@^6.15.0:
|
babylon@^6.11.0, babylon@^6.13.0, babylon@^6.14.1, babylon@^6.15.0:
|
||||||
version "6.16.1"
|
version "6.16.1"
|
||||||
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3"
|
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3"
|
||||||
|
Loading…
Reference in New Issue
Block a user