1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

useEmptyPassphrase for device without instance

This commit is contained in:
Szymon Lesisz 2018-05-22 12:54:30 +02:00
parent 416886bd95
commit be05c097e9
4 changed files with 13 additions and 7 deletions

View File

@ -142,7 +142,8 @@ const begin = (device: TrezorDevice, network: string): AsyncAction => {
state: device.state state: device.state
}, },
path: coinToDiscover.bip44, path: coinToDiscover.bip44,
keepSession: true // acquire and hold session keepSession: true, // acquire and hold session
useEmptyPassphrase: !device.instance,
}); });
// handle TREZOR response error // handle TREZOR response error
@ -214,7 +215,8 @@ const discoverAccount = (device: TrezorDevice, discoveryProcess: Discovery): Asy
}, },
path, path,
showOnTrezor: false, showOnTrezor: false,
keepSession: true keepSession: true,
useEmptyPassphrase: !device.instance,
}); });
if (discoveryProcess.interrupted) return; if (discoveryProcess.interrupted) return;
@ -312,7 +314,8 @@ const discoverAccount = (device: TrezorDevice, discoveryProcess: Discovery): Asy
instance: device.instance, instance: device.instance,
state: device.state state: device.state
}, },
keepSession: false keepSession: false,
useEmptyPassphrase: !device.instance,
}); });
if (discoveryProcess.interrupted) return; if (discoveryProcess.interrupted) return;

View File

@ -73,6 +73,7 @@ export const showAddress = (address_n: Array<number>): AsyncAction => {
state: selected.state state: selected.state
}, },
path: address_n, path: address_n,
useEmptyPassphrase: !selected.instance,
}); });
if (response && response.success) { if (response && response.success) {

View File

@ -902,7 +902,7 @@ export const onSend = (): AsyncAction => {
instance: selected.instance, instance: selected.instance,
state: selected.state state: selected.state
}, },
//path: "m/44'/60'/0'/0/0", useEmptyPassphrase: !selected.instance,
path: txData.address_n, path: txData.address_n,
nonce: strip(txData.nonce), nonce: strip(txData.nonce),
gasPrice: strip(txData.gasPrice), gasPrice: strip(txData.gasPrice),

View File

@ -292,7 +292,8 @@ export const getSelectedDeviceState = (): AsyncAction => {
path: selected.path, path: selected.path,
instance: selected.instance, instance: selected.instance,
state: selected.state state: selected.state
} },
useEmptyPassphrase: !selected.instance,
}); });
if (response && response.success) { if (response && response.success) {
@ -383,7 +384,8 @@ export function acquire(): AsyncAction {
const response = await TrezorConnect.getFeatures({ const response = await TrezorConnect.getFeatures({
device: { device: {
path: selected.path, path: selected.path,
} },
useEmptyPassphrase: !selected.instance,
}); });
if (!response.success) { if (!response.success) {