1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-05 23:59:23 +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/react-router/.*
.*/node_modules/react-router-redux/.*
.*/node_modules/trezor-connect/.*
.*/_old/.*
.*/src/solidity/.*

View File

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

View File

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