Skip to content

Commit 092aa7f

Browse files
committed
Hide connection popover as soon as connection happens
1 parent 0454f30 commit 092aa7f

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ export default class ConfirmTransactionBase extends Component {
165165

166166
async pollLedgerReady() {
167167
const { fromAddress } = this.props;
168-
const { pollingIntervalId } = this.state;
168+
const {
169+
pollingIntervalId,
170+
showingHardwareConnectionContents,
171+
showingHardwareConnectionAdvancedPopover,
172+
} = this.state;
169173

170174
// Don't set off multiple calls to checkLedgerReady
171175
if (pollingIntervalId !== null) {
@@ -179,7 +183,16 @@ export default class ConfirmTransactionBase extends Component {
179183
// Don't let this check blow up the process
180184
}
181185

182-
this.setState({ hardwareIsReady, pollingIntervalId: null });
186+
this.setState({
187+
hardwareIsReady,
188+
pollingIntervalId: null,
189+
showingHardwareConnectionAdvancedPopover: hardwareIsReady
190+
? false
191+
: showingHardwareConnectionAdvancedPopover,
192+
showingHardwareConnectionContents: hardwareIsReady
193+
? false
194+
: showingHardwareConnectionContents,
195+
});
183196
return undefined;
184197
}
185198

0 commit comments

Comments
 (0)