// nonce signing is currently broken: https://github.com/LedgerHQ/app-nano/pull/14
await test('sign a nonce', { skip: true }, async () => {
- // const nonce = new TextEncoder().encode('0123456789abcdef')
- // const {status, signature} = await click('Click to sign nonce', wallet.sign(0, nonce))
+ const nonce = new TextEncoder().encode('0123456789abcdef')
+ const { status, signature } = await click('Click to sign nonce', wallet.sign(0, nonce))
- // assert.equals(resultSignNonce.status, 'OK')
- // assert.OK(/[A-Fa-f0-9]{128}/.test(resultSignNonce.signature))
+ assert.equals(status, 'OK')
+ assert.OK(/[A-Fa-f0-9]{128}/.test(signature))
})
await test('fail when using new', async () => {
NANO_TEST_VECTORS.SEND_BLOCK.representative,
receiveBlock.previous
)
- await assert.rejects(click(
- 'Fail to sign',
- async () => sendBlock.sign(0)
- ))
+ await assert.rejects(sendBlock.sign(0))
})
})