*/
await suite('Ledger hardware wallet', { skip: false || isNode }, async () => {
- let wallet = await LedgerWallet.create(), account, openBlock, sendBlock, receiveBlock
+ let wallet, account, openBlock, sendBlock, receiveBlock
await test('request permissions', async () => {
+ wallet = await LedgerWallet.create()
let status = wallet.status
+ assert.equals(status, 'DISCONNECTED')
+ assert.equals(status, wallet.status)
+
status = await click(
'Reset permissions, unlock device, quit Nano app, then click to continue',
async () => wallet.connect()
assert.equals(status, wallet.status)
status = await click(
- 'Open Nano app on device, then click to continue',
+ 'Open Nano app on device, allow device to auto-lock, then click to continue',
+ async () => wallet.connect()
+ )
+ assert.equals(status, 'LOCKED')
+ assert.equals(status, wallet.status)
+
+ status = await click(
+ 'Unlock device, verify Nano app is open, then click to continue',
async () => wallet.connect()
)
assert.equals(status, 'CONNECTED')