mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-30 19:00:53 +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> => {
|
||||
const selected = getState().wallet.selectedDevice;
|
||||
const devicePath = selected.path;
|
||||
const device = {
|
||||
path: devicePath,
|
||||
instance: selected.instance,
|
||||
state: selected.state,
|
||||
};
|
||||
|
||||
dispatch({ type: SIGN_VERIFY.SIGN_PROGRESS, isSignProgress: true });
|
||||
|
||||
const response = await TrezorConnect.ethereumSignMessage({
|
||||
device,
|
||||
const input = {
|
||||
device: {
|
||||
path: devicePath,
|
||||
instance: selected.instance,
|
||||
state: selected.state,
|
||||
},
|
||||
path,
|
||||
hex,
|
||||
message,
|
||||
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 });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user