diff --git a/app/App/Panel/Main/Account/Requests/TransactionRequest/index.js b/app/App/Panel/Main/Account/Requests/TransactionRequest/index.js index 9c81c1e55..28f8c635b 100644 --- a/app/App/Panel/Main/Account/Requests/TransactionRequest/index.js +++ b/app/App/Panel/Main/Account/Requests/TransactionRequest/index.js @@ -546,6 +546,8 @@ class TransactionRequest extends React.Component { link.rpc('signerCompatibility', req.handlerId, (e, compatibility) => { if (e === 'No signer') { this.store.notify('noSignerWarning', { req }) + } else if (e === 'Signer locked') { + this.store.notify('signerLockedWarning', { req }) } else if (!compatibility.compatible && !this.store('main.mute.signerCompatibilityWarning')) { this.store.notify('signerCompatibilityWarning', { req, compatibility, chain: this.chain }) } else if ((maxFeeUSD.toNumber() > FEE_WARNING_THRESHOLD_USD || this.toDisplayUSD(maxFeeUSD) === '0.00') && !this.store('main.mute.gasFeeWarning')) { diff --git a/app/App/Panel/Main/Account/SignerStatus/index.js b/app/App/Panel/Main/Account/SignerStatus/index.js index c823e5d44..a74b1161d 100644 --- a/app/App/Panel/Main/Account/SignerStatus/index.js +++ b/app/App/Panel/Main/Account/SignerStatus/index.js @@ -1,9 +1,12 @@ import React from 'react' -import ReactDOM from 'react-dom' import Restore from 'react-restore' import link from '../../../../../../resources/link' import svg from '../../../../../../resources/svg' +function isHardwareSigner (type = '') { + return ['ledger', 'trezor', 'lattice'].includes(type.toLowerCase()) +} + class SignerStatus extends React.Component { constructor (...args) { super(...args) @@ -80,7 +83,10 @@ class SignerStatus extends React.Component { render () { const { shake } = this.state - return this.props.signer && this.props.signer.id && this.props.signer.status === 'locked' ? ( + const signer = this.props.signer || {} + const isHardware = isHardwareSigner(signer.type) + + return !isHardware && signer.id && signer.status === 'locked' ? (