Browse Source
Merge pull request #1105 from LedgerHQ/device-path
Handle case where device path change when opening app
master
Gaëtan Renaudeau
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
2 deletions
-
src/components/EnsureDeviceApp.js
-
src/components/GenuineCheck.js
|
@ -85,11 +85,12 @@ class EnsureDeviceApp extends Component<{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
render() { |
|
|
render() { |
|
|
const { account, currency, ...props } = this.props |
|
|
const { account, currency, device, ...props } = this.props |
|
|
const cur = account ? account.currency : currency |
|
|
const cur = account ? account.currency : currency |
|
|
const Icon = cur ? getCryptoCurrencyIcon(cur) : null |
|
|
const Icon = cur ? getCryptoCurrencyIcon(cur) : null |
|
|
return ( |
|
|
return ( |
|
|
<DeviceInteraction |
|
|
<DeviceInteraction |
|
|
|
|
|
key={device ? device.path : null} |
|
|
shouldRenderRetry |
|
|
shouldRenderRetry |
|
|
steps={[ |
|
|
steps={[ |
|
|
{ |
|
|
{ |
|
|
|
@ -115,7 +115,7 @@ class GenuineCheck extends PureComponent<Props> { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
render() { |
|
|
render() { |
|
|
const { onSuccess, ...props } = this.props |
|
|
const { onSuccess, device, ...props } = this.props |
|
|
const steps = [ |
|
|
const steps = [ |
|
|
{ |
|
|
{ |
|
|
id: 'device', |
|
|
id: 'device', |
|
@ -156,6 +156,7 @@ class GenuineCheck extends PureComponent<Props> { |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<DeviceInteraction |
|
|
<DeviceInteraction |
|
|
|
|
|
key={device ? device.path : null} |
|
|
{...props} |
|
|
{...props} |
|
|
waitBeforeSuccess={500} |
|
|
waitBeforeSuccess={500} |
|
|
steps={steps} |
|
|
steps={steps} |
|
|