test('verify setPassword', async () => { debug('Into verify setPassword test ...') const scrt = config.agents[1].secret const address = config.agents[1].address const publicKey = config.agents[0].publicKey const trsSetPassword = { secret: scrt, type: 3, fee: 500000000, args: [ publicKey, ], } // Set second password await lib.transactionUnsignedAsync(trsSetPassword) await lib.onNewBlockAsync() // Verify second password has been set in account const res = await lib.getAccountAsync(address) debug(`--->Actual password is '${res.body.account.secondPublicKey}', expected password is '${publicKey}'`) expect(res.body.account.secondPublicKey).toEqual(publicKey) })
const res = await lib.getAccountAsync(address) debug(`--->Actual balance is '${res.body.account.balance}', expected balance is '${expectedBalance}'`) expect(res.body.account.balance).toEqual(expectedBalance)