UI.IFRAME_HANDSHAKE implementation

pull/2/merge
Szymon Lesisz 6 years ago
parent 2b4592343e
commit fc9563a04e

@ -6,6 +6,7 @@
.*/node_modules/redux/.* .*/node_modules/redux/.*
.*/node_modules/react-router/.* .*/node_modules/react-router/.*
.*/node_modules/react-router-redux/.* .*/node_modules/react-router-redux/.*
.*/node_modules/trezor-connect/.*
.*/_old/.* .*/_old/.*
.*/src/solidity/.* .*/src/solidity/.*

@ -32,6 +32,7 @@ declare module 'trezor-connect' {
declare type T_UI_EVENT = 'UI_EVENT'; declare type T_UI_EVENT = 'UI_EVENT';
declare type T_UI = { declare type T_UI = {
IFRAME_HANDSHAKE: 'iframe_handshake',
TRANSPORT: 'ui-no_transport', TRANSPORT: 'ui-no_transport',
BOOTLOADER: 'ui-device_bootloader_mode', BOOTLOADER: 'ui-device_bootloader_mode',
INITIALIZE: 'ui-device_not_initialized', INITIALIZE: 'ui-device_not_initialized',
@ -96,6 +97,7 @@ declare module 'trezor-connect' {
payload: { payload: {
device: Device; device: Device;
code?: string; code?: string;
browser?: any;
} }
} }

@ -1,7 +1,7 @@
/* @flow */ /* @flow */
'use strict'; 'use strict';
import { TRANSPORT, DEVICE } from 'trezor-connect'; import { TRANSPORT, DEVICE, UI } from 'trezor-connect';
import * as CONNECT from '../actions/constants/TrezorConnect'; import * as CONNECT from '../actions/constants/TrezorConnect';
import * as WALLET from '../actions/constants/wallet'; import * as WALLET from '../actions/constants/wallet';
@ -50,8 +50,7 @@ export default function connect(state: State = initialState, action: Action): St
switch (action.type) { switch (action.type) {
// TODO: change it to UiMessage from trezor-connect case UI.IFRAME_HANDSHAKE :
case 'iframe_handshake' :
return { return {
...state, ...state,
browserState: action.payload.browser browserState: action.payload.browser

Loading…
Cancel
Save