mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-02 20:30:54 +00:00
Refactor sign input
This commit is contained in:
parent
6a40191e61
commit
35ce9b6a1d
@ -11,21 +11,21 @@ export const sign = (
|
|||||||
): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
||||||
const selected = getState().wallet.selectedDevice;
|
const selected = getState().wallet.selectedDevice;
|
||||||
const devicePath = selected.path;
|
const devicePath = selected.path;
|
||||||
const device = {
|
const input = {
|
||||||
path: devicePath,
|
device: {
|
||||||
instance: selected.instance,
|
path: devicePath,
|
||||||
state: selected.state,
|
instance: selected.instance,
|
||||||
};
|
state: selected.state,
|
||||||
|
},
|
||||||
dispatch({ type: SIGN_VERIFY.SIGN_PROGRESS, isSignProgress: true });
|
|
||||||
|
|
||||||
const response = await TrezorConnect.ethereumSignMessage({
|
|
||||||
device,
|
|
||||||
path,
|
path,
|
||||||
hex,
|
hex,
|
||||||
message,
|
message,
|
||||||
useEmptyPassphrase: selected.useEmptyPassphrase,
|
useEmptyPassphrase: selected.useEmptyPassphrase,
|
||||||
});
|
};
|
||||||
|
|
||||||
|
dispatch({ type: SIGN_VERIFY.SIGN_PROGRESS, isSignProgress: true });
|
||||||
|
|
||||||
|
const response = await TrezorConnect.ethereumSignMessage(input);
|
||||||
|
|
||||||
dispatch({ type: SIGN_VERIFY.SIGN_PROGRESS, isSignProgress: false });
|
dispatch({ type: SIGN_VERIFY.SIGN_PROGRESS, isSignProgress: false });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user