mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-02 20:30:54 +00:00
Pass passphrase to request
This commit is contained in:
parent
07f9fc30f9
commit
7ecfdb7ec2
@ -59,13 +59,16 @@ export const verify = (
|
|||||||
message: string,
|
message: string,
|
||||||
signature: string,
|
signature: string,
|
||||||
hex: boolean = false,
|
hex: boolean = false,
|
||||||
): AsyncAction => async (dispatch: Dispatch): Promise<void> => {
|
): AsyncAction => async (dispatch: Dispatch, getState: GetState): Promise<void> => {
|
||||||
|
const selected = getState().wallet.selectedDevice;
|
||||||
const input = {
|
const input = {
|
||||||
address,
|
address,
|
||||||
message,
|
message,
|
||||||
signature,
|
signature,
|
||||||
hex,
|
hex,
|
||||||
|
useEmptyPassphrase: selected.useEmptyPassphrase,
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await TrezorConnect.ethereumVerifyMessage(input);
|
const response = await TrezorConnect.ethereumVerifyMessage(input);
|
||||||
|
|
||||||
if (response && response.success) {
|
if (response && response.success) {
|
||||||
@ -74,7 +77,7 @@ export const verify = (
|
|||||||
payload: {
|
payload: {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
title: 'Verify success',
|
title: 'Verify success',
|
||||||
message: `${response.payload.signature} was verified`,
|
message: 'signature is valid',
|
||||||
cancelable: true,
|
cancelable: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user