From 255ebd7d4b24d342691fec808a60851ce6679870 Mon Sep 17 00:00:00 2001 From: meriadec Date: Mon, 25 Jun 2018 16:50:54 +0200 Subject: [PATCH] Use EnsureDeviceAppInteraction in StepConnectDevice --- src/components/modals/StepConnectDevice.js | 45 ++++++++-------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/src/components/modals/StepConnectDevice.js b/src/components/modals/StepConnectDevice.js index ef9b7142..c6ed57ff 100644 --- a/src/components/modals/StepConnectDevice.js +++ b/src/components/modals/StepConnectDevice.js @@ -5,40 +5,29 @@ import React from 'react' import type { Account, CryptoCurrency } from '@ledgerhq/live-common/lib/types' import type { Device } from 'types/common' -import DeviceConnect from 'components/DeviceConnect' -import EnsureDeviceApp from 'components/EnsureDeviceApp' +import EnsureDeviceAppInteraction from 'components/EnsureDeviceAppInteraction' type Props = { account?: ?Account, currency?: ?CryptoCurrency, - deviceSelected?: ?Device, onChangeDevice?: Device => void, - onStatusChange: string => void, + onStatusChange: (string, string) => void, } -const StepConnectDevice = ({ - account, - currency, - deviceSelected, - onChangeDevice, - onStatusChange, -}: Props) => ( - ( - - )} - /> -) +const StepConnectDevice = ({ account, currency, onChangeDevice, onStatusChange }: Props) => + account || currency ? ( + { + // TODO: remove those non-nense callbacks + if (onChangeDevice) { + onChangeDevice(device) + } + onStatusChange('success', 'success') + }} + /> + ) : null export default StepConnectDevice