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:
parent
2b4592343e
commit
fc9563a04e
@ -6,6 +6,7 @@
|
||||
.*/node_modules/redux/.*
|
||||
.*/node_modules/react-router/.*
|
||||
.*/node_modules/react-router-redux/.*
|
||||
.*/node_modules/trezor-connect/.*
|
||||
.*/_old/.*
|
||||
.*/src/solidity/.*
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user