1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-26 00:48:35 +00:00

UI.IFRAME_HANDSHAKE implementation

This commit is contained in:
Szymon Lesisz 2018-05-23 12:27:41 +02:00
parent 2b4592343e
commit fc9563a04e
3 changed files with 5 additions and 3 deletions

View File

@ -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/.*

View File

@ -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;
} }
} }

View File

@ -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