From 5e830b86c4569911d7a6cc4d19d13c0a72caf2c4 Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Thu, 11 Apr 2019 16:00:57 +0200 Subject: [PATCH] fix connect version --- package.json | 2 +- src/actions/TrezorConnectActions.js | 2 +- src/components/Log/index.js | 2 -- src/flowtype/index.js | 7 +++++++ src/reducers/TrezorConnectReducer.js | 4 ++-- yarn.lock | 8 ++++---- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 50e443d1..12e799e4 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "styled-components": "^4.1.3", "styled-normalize": "^8.0.6", "trezor-bridge-communicator": "1.0.2", - "trezor-connect": "7.0.2-electron.4", + "trezor-connect": "7.0.2", "trezor-ui-components": "^1.0.0-beta.12", "wallet-address-validator": "^0.2.4", "web3": "1.0.0-beta.35", diff --git a/src/actions/TrezorConnectActions.js b/src/actions/TrezorConnectActions.js index e7d7315e..0b5ce5f2 100644 --- a/src/actions/TrezorConnectActions.js +++ b/src/actions/TrezorConnectActions.js @@ -155,7 +155,7 @@ export const init = (): AsyncAction => async ( if (buildUtils.isDev()) { // eslint-disable-next-line window.__TREZOR_CONNECT_SRC = - typeof LOCAL === 'string' ? LOCAL : 'https://sisyfos.trezor.io/connect-electron/'; // eslint-disable-line no-underscore-dangle + typeof LOCAL === 'string' ? LOCAL : 'https://sisyfos.trezor.io/connect/'; // eslint-disable-line no-underscore-dangle // window.__TREZOR_CONNECT_SRC = typeof LOCAL === 'string' ? LOCAL : 'https://localhost:8088/'; // eslint-disable-line no-underscore-dangle window.TrezorConnect = TrezorConnect; } diff --git a/src/components/Log/index.js b/src/components/Log/index.js index c2ea9bb5..7174b438 100644 --- a/src/components/Log/index.js +++ b/src/components/Log/index.js @@ -94,11 +94,9 @@ const Log = (props: Props) => { {props.log.copied ? ( } - afterVisibleChange={props.resetCopyState} > {copyBtn} diff --git a/src/flowtype/index.js b/src/flowtype/index.js index f7b26df4..e91fa06d 100644 --- a/src/flowtype/index.js +++ b/src/flowtype/index.js @@ -120,8 +120,15 @@ type UiEventAction = { // }, }; +// TODO: join this message with uiMessage +type IFrameHandshake = { + type: 'iframe_handshake', + payload: any, +}; + export type Action = | RouterAction + | IFrameHandshake | TransportEventAction | DeviceEventAction | UiEventAction diff --git a/src/reducers/TrezorConnectReducer.js b/src/reducers/TrezorConnectReducer.js index 135a1dd4..7d087f18 100644 --- a/src/reducers/TrezorConnectReducer.js +++ b/src/reducers/TrezorConnectReducer.js @@ -1,5 +1,5 @@ /* @flow */ -import { TRANSPORT, IFRAME } from 'trezor-connect'; +import { TRANSPORT, UI } from 'trezor-connect'; import * as CONNECT from 'actions/constants/TrezorConnect'; import type { Action } from 'flowtype'; @@ -66,7 +66,7 @@ export default function connect(state: State = initialState, action: Action): St error: action.error, }; // trezor-connect iframe loaded - case IFRAME.LOADED: + case UI.IFRAME_HANDSHAKE: return { ...state, initialized: true, diff --git a/yarn.lock b/yarn.lock index 27c5009e..7242290d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11140,10 +11140,10 @@ trezor-bridge-communicator@1.0.2: request "^2.88.0" whatwg-fetch "^3.0.0" -trezor-connect@7.0.2-electron.4: - version "7.0.2-electron.4" - resolved "https://registry.yarnpkg.com/trezor-connect/-/trezor-connect-7.0.2-electron.4.tgz#2fad96f11f0136dada5ae6a4dbc4a24b8408a131" - integrity sha512-c+DyAnaSI5GeSw7ETSK3CzekDsHR2vI5qltNavpmg8B16aBLvyeL89VCkXZQrxdZGESvO5/vcOMbr1Rdp/sGPQ== +trezor-connect@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/trezor-connect/-/trezor-connect-7.0.2.tgz#8b1b0d1b3b6dc6564bc3d22fe8f54ba826f2a242" + integrity sha512-KAFOqxEHHaFvrG8NGLFlM/QxHcwIa3gwfXcgTjCYM0g0zRpwIQBwe35AKsjAQO5yiTJQGa0Cu5MZufGJRGYjjw== dependencies: "@babel/runtime" "^7.3.1" events "^3.0.0"