1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-07-04 13:52:38 +00:00

Resolve conflict after rebase

This commit is contained in:
Vasek Mlejnsky 2018-08-07 10:43:40 +02:00
parent f4eb4c9f8c
commit 6125b02973

View File

@ -166,21 +166,6 @@ export const postInit = (): ThunkAction => (dispatch: Dispatch, getState: GetSta
const firstConnected: ?TrezorDevice = latest.find(d => d.connected);
dispatch( onSelectDevice(firstConnected || latest[0]) );
// TODO
if (initialParams) {
if (!initialParams.hasOwnProperty('network') && initialPathname !== getState().router.location.pathname) {
// dispatch( push(initialPathname) );
} else {
if (devices.length > 0) {
const unacquired: ?TrezorDevice = devices.find(d => d.type === 'unacquired');
if (unacquired) {
dispatch( onSelectDevice(unacquired) );
} else {
const latest: Array<TrezorDevice> = sortDevices(devices);
const firstConnected: ?TrezorDevice = latest.find(d => d.connected);
dispatch( onSelectDevice(firstConnected || latest[0]) );
// TODO
if (initialParams) {
if (!initialParams.hasOwnProperty("network") && initialPathname !== getState().router.location.pathname) {
@ -191,7 +176,6 @@ export const postInit = (): ThunkAction => (dispatch: Dispatch, getState: GetSta
}
}
}
}
};
const sortDevices = (devices: Array<TrezorDevice>): Array<TrezorDevice> => devices.sort((a, b) => {