Skip to content

Commit 0454f30

Browse files
committed
Cleanup console logs
1 parent 861d177 commit 0454f30

File tree

4 files changed

+12
-34
lines changed

4 files changed

+12
-34
lines changed

app/scripts/metamask-controller.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,24 +1993,12 @@ export default class MetamaskController extends EventEmitter {
19931993
}
19941994

19951995
async checkLedgerReady(address) {
1996-
console.log('checkLedgerReady; called for address: ', address);
1997-
19981996
const keyring = await this.keyringController.getKeyringForAccount(address);
1999-
2000-
console.log('checkLedgerReady; keyring is: ', keyring);
20011997
if (!keyring) {
20021998
throw new Error('No keyring could be found for this address');
20031999
}
20042000

20052001
const isReady = Boolean(keyring?.isConnected?.());
2006-
2007-
console.log(
2008-
'[checkLedgerReady] keyring is: ',
2009-
keyring,
2010-
'; isReady: ',
2011-
isReady,
2012-
);
2013-
20142002
return isReady;
20152003
}
20162004

ui/pages/confirm-transaction-base/confirm-transaction-base.component.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -167,41 +167,23 @@ export default class ConfirmTransactionBase extends Component {
167167
const { fromAddress } = this.props;
168168
const { pollingIntervalId } = this.state;
169169

170-
console.log(
171-
'[confirm-transaction-base] pollLedgerReadycalled; id: ',
172-
pollingIntervalId,
173-
);
174-
175170
// Don't set off multiple calls to checkLedgerReady
176171
if (pollingIntervalId !== null) {
177-
console.log(
178-
'[confirm-transaction-base] avoiding multiple calls for ; id: ',
179-
pollingIntervalId,
180-
);
181172
return undefined;
182173
}
183174

184175
let hardwareIsReady = true;
185176
try {
186-
console.log(
187-
`[confirm-transaction-base] about to call checkLedgerReady for ${fromAddress}`,
188-
);
189177
hardwareIsReady = await checkLedgerReady(fromAddress);
190-
console.log(`[confirm-transaction-base] RETURNED! ${hardwareIsReady}`);
191178
} catch (e) {
192-
console.error(
193-
'[confirm-transaction-base] ERROR checking ledger ready!',
194-
e,
195-
);
179+
// Don't let this check blow up the process
196180
}
197181

198182
this.setState({ hardwareIsReady, pollingIntervalId: null });
199183
return undefined;
200184
}
201185

202186
UNSAFE_componentWillMount() {
203-
console.log('UNSAFE_componentWillMount!');
204-
205187
const { showLedgerSteps } = this.props;
206188

207189
if (!showLedgerSteps) {
@@ -712,7 +694,6 @@ export default class ConfirmTransactionBase extends Component {
712694
<HardwareConnectivityMessage
713695
connected={hardwareIsReady}
714696
onClick={(e) => {
715-
console.log('Opening the modal!');
716697
e?.preventDefault?.();
717698
this.setState({ showingHardwareConnectionContents: true });
718699
}}

ui/pages/confirm-transaction-base/hardware-connectivity/hardware-connectivity-message.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ export default function HardwareConnectivityMessage({
2020
) : (
2121
<>
2222
{t('hardwareWalletConnectivityNotConnected', ['Ledger'])}{' '}
23-
<a href="javascript:;" onClick={onClick}>
23+
<button
24+
className="hardware-connectivity-message__button"
25+
onClick={onClick}
26+
>
2427
{t('hardwareWalletConnectivityNotConnectedConversion')}
25-
</a>
28+
</button>
2629
</>
2730
)
2831
}

ui/pages/confirm-transaction-base/hardware-connectivity/index.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@
1818
font-size: 0.75rem;
1919
}
2020
}
21+
22+
.hardware-connectivity-message__button {
23+
font-size: inherit;
24+
background: unset;
25+
padding: 0;
26+
}

0 commit comments

Comments
 (0)