Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('Simple set delegate', async (done) => {
const delegate = 'tz1PirboZKFVqkfE45hVLpkpXaZtLk3mqC17'
const op = await Tezos.contract.setDelegate({
delegate,
source: await Tezos.signer.publicKeyHash(),
fee: DEFAULT_FEE.DELEGATION,
gasLimit: DEFAULT_GAS_LIMIT.DELEGATION
})
await op.confirmation()
expect(op.hash).toBeDefined();
expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY)
const account = await Tezos.rpc.getDelegate(await Tezos.signer.publicKeyHash())
expect(account).toEqual(delegate)
done();
});