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:
committed by
Gav Wood
parent
e6a31e7543
commit
c2c7231cad
@@ -254,9 +254,10 @@ export default class Status {
|
||||
.all(statusPromises)
|
||||
.then(([nodeKind, netPeers, clientVersion, netVersion, netChain]) => {
|
||||
const isTest = [
|
||||
'2', // morden
|
||||
'3', // ropsten
|
||||
'42' // kovan
|
||||
'2', // morden
|
||||
'3', // ropsten,
|
||||
'17', // devchain
|
||||
'42' // kovan
|
||||
].includes(netVersion);
|
||||
|
||||
const nodeKindFull = nodeKind &&
|
||||
|
||||
@@ -319,7 +319,7 @@ class TxRow extends Component {
|
||||
|
||||
getCondition = () => {
|
||||
const { blockNumber, tx } = this.props;
|
||||
let { time, block } = tx.condition;
|
||||
let { time, block } = tx.condition || {};
|
||||
|
||||
if (time) {
|
||||
if ((time.getTime() - Date.now()) >= 0) {
|
||||
@@ -336,7 +336,7 @@ class TxRow extends Component {
|
||||
} else {
|
||||
return 'submitting';
|
||||
}
|
||||
} else if (blockNumber) {
|
||||
} else if (blockNumber && block) {
|
||||
block = blockNumber.minus(block);
|
||||
// return (block.toNumber() < 0)
|
||||
// ? block.abs().toFormat(0) + ' blocks left'
|
||||
|
||||
@@ -29,7 +29,12 @@ export default class RequestOrigin extends Component {
|
||||
static propTypes = {
|
||||
origin: PropTypes.shape({
|
||||
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
|
||||
};
|
||||
|
||||
@@ -126,7 +131,9 @@ export default class RequestOrigin extends Component {
|
||||
}
|
||||
|
||||
if (origin.type === 'signer') {
|
||||
return this.renderSigner(origin.details);
|
||||
const session = origin.details && origin.details.session || origin.details;
|
||||
|
||||
return this.renderSigner(session);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user