Skip to content

Commit

Permalink
updated test, previously was hanging on registering the second entrop…
Browse files Browse the repository at this point in the history
…y acct
  • Loading branch information
rh0delta committed Jun 23, 2024
1 parent 388be9c commit 972b6aa
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions tests/sign.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ test('Sign: Inputted Verifying Keys', async (t) => {
t.teardown(async () => {
// this gets called after all tests are run
await charlieStashEntropy.close()
await charlieEntropy.close()
await spinNetworkDown(NETWORK_TYPE).catch((error) =>
console.error('Error while spinning network down', error.message)
)
Expand All @@ -83,24 +82,14 @@ test('Sign: Inputted Verifying Keys', async (t) => {
/* Setup Entropy */
await run('wasm', wasmGlobalsReady())
const charlieStashKeyring = new Keyring({ seed: charlieStashSeed, debug: true })
const charlieKeyring = new Keyring({ seed: charlieSeed, debug: true })
const charlieStashEntropy = new Entropy({
keyring: charlieStashKeyring,
endpoint: 'ws://127.0.0.1:9944',
})
const charlieEntropy = new Entropy({
keyring: charlieKeyring,
endpoint: 'ws://127.0.0.1:9944',
})

await Promise.all([
run('charlieStashEntropy ready', charlieStashEntropy.ready),
run('charlieEntropy ready', charlieEntropy.ready)
])
await Promise.all([
run('charlie stash register', charlieStashEntropy.register()),
run('charlie register', charlieEntropy.register())
])
await run('charlieStashEntropy ready', charlieStashEntropy.ready),
await run('charlie stash register', charlieStashEntropy.register())
await run('charlie stash second register', charlieStashEntropy.register())

/* Sign */
const msg = Buffer
Expand All @@ -114,7 +103,7 @@ test('Sign: Inputted Verifying Keys', async (t) => {
order: ['deviceKeyProxy'],
// no rhyme or reason for the choice of using the charlie seed verifying key, needed to use
// a pre-loaded acct on our local devnet in order to get a valid verifying key
signatureVerifyingKey: charlieEntropy.keyring.accounts.deviceKey.verifyingKeys[0]
signatureVerifyingKey: charlieStashEntropy.keyring.accounts.deviceKey.verifyingKeys[1]
})
)

Expand Down

0 comments on commit 972b6aa

Please sign in to comment.