add "onReceiveConfirmation" method to ModalActions

pull/392/head
Szymon Lesisz 5 years ago
parent 397fd0fac7
commit e336a4f05f

@ -59,6 +59,17 @@ export const onPassphraseSubmit = (passphrase: string): AsyncAction => async (di
}); });
}; };
export const onReceiveConfirmation = (confirmation: any): AsyncAction => async (dispatch: Dispatch): Promise<void> => {
await TrezorConnect.uiResponse({
type: UI.RECEIVE_CONFIRMATION,
payload: confirmation,
});
dispatch({
type: MODAL.CLOSE,
});
};
export const onRememberDevice = (device: TrezorDevice): Action => ({ export const onRememberDevice = (device: TrezorDevice): Action => ({
type: CONNECT.REMEMBER, type: CONNECT.REMEMBER,
device, device,
@ -173,6 +184,7 @@ export const onQrScan = (parsedUri: parsedURI, networkType: string): ThunkAction
export default { export default {
onPinSubmit, onPinSubmit,
onPassphraseSubmit, onPassphraseSubmit,
onReceiveConfirmation,
onRememberDevice, onRememberDevice,
onForgetDevice, onForgetDevice,
onForgetSingleDevice, onForgetSingleDevice,

Loading…
Cancel
Save