diff --git a/src/js/actions/TrezorConnectActions.js b/src/js/actions/TrezorConnectActions.js index 23da6abd..63318b0f 100644 --- a/src/js/actions/TrezorConnectActions.js +++ b/src/js/actions/TrezorConnectActions.js @@ -112,7 +112,9 @@ export const init = (): AsyncAction => async (dispatch: Dispatch, getState: GetS }); // $FlowIssue LOCAL not declared - window.__TREZOR_CONNECT_SRC = typeof LOCAL === 'string' ? LOCAL : 'https://connect.trezor.io/5/'; + // window.__TREZOR_CONNECT_SRC = typeof LOCAL === 'string' ? LOCAL : 'https://connect.trezor.io/5/'; + window.__TREZOR_CONNECT_SRC = 'https://sisyfos.trezor.io/connect/'; + // window.__TREZOR_CONNECT_SRC = 'https://localhost:8088/'; try { await TrezorConnect.init({ @@ -205,7 +207,7 @@ export const onSelectDevice = (device: TrezorDevice | Device): ThunkAction => (d // switch to initial url and reset this value if (!device.features) { - dispatch(push(`/device/${device.path}/acquire`)); + dispatch(push(`/device/${device.path}/${ device.type === 'unreadable' ? 'unreadable' : 'acquire' }`)); } else if (device.features.bootloader_mode) { dispatch(push(`/device/${device.path}/bootloader`)); } else if (!device.features.initialized) { diff --git a/src/js/components/wallet/pages/UnreadableDevice.js b/src/js/components/wallet/pages/UnreadableDevice.js new file mode 100644 index 00000000..8a93135e --- /dev/null +++ b/src/js/components/wallet/pages/UnreadableDevice.js @@ -0,0 +1,37 @@ +/* @flow */ + + +import React from 'react'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import { Notification } from '~/js/components/common/Notification'; +import * as TrezorConnectActions from '~/js/actions/TrezorConnectActions'; + +import type { State, Dispatch } from '~/flowtype'; + +type Props = { + acquiring: boolean; + acquireDevice: typeof TrezorConnectActions.acquire +} + +const UnreadableDevice = (props: Props) => { + return ( +
+ +
+ ); +}; + +export default connect( + (state: State) => ({ + acquiring: state.connect.acquiring, + }), + (dispatch: Dispatch) => ({ + acquireDevice: bindActionCreators(TrezorConnectActions.acquire, dispatch), + }), +)(UnreadableDevice); diff --git a/src/js/router/index.js b/src/js/router/index.js index 3a187b9f..42391876 100644 --- a/src/js/router/index.js +++ b/src/js/router/index.js @@ -12,6 +12,7 @@ import WalletContainer from '../components/wallet'; import BootloaderContainer from '../components/wallet/pages/Bootloader'; import InitializeContainer from '../components/wallet/pages/Initialize'; import AcquireContainer from '../components/wallet/pages/Acquire'; +import UnreadableDeviceContainer from '../components/wallet/pages/UnreadableDevice'; import DashboardContainer from '../components/wallet/pages/Dashboard'; import SummaryContainer from '../components/wallet/account/summary'; @@ -34,6 +35,7 @@ export default ( +