diff --git a/external/js/cothority/spec/helpers/bctest.ts b/external/js/cothority/spec/helpers/bctest.ts index cd718d714e..eba6863e0a 100644 --- a/external/js/cothority/spec/helpers/bctest.ts +++ b/external/js/cothority/spec/helpers/bctest.ts @@ -26,6 +26,7 @@ export class BCTest { if (BCTest.bct === undefined) { BCTest.bct = await BCTest.init(); } else { + // Wait for 1s in case a transaction from a previous test is still being accepted. await new Promise((resolve) => setTimeout(resolve, 1000)); } diff --git a/external/js/cothority/src/byzcoin/client-transaction.ts b/external/js/cothority/src/byzcoin/client-transaction.ts index 661ba7d69a..07a0fdaaab 100644 --- a/external/js/cothority/src/byzcoin/client-transaction.ts +++ b/external/js/cothority/src/byzcoin/client-transaction.ts @@ -116,6 +116,8 @@ export default class ClientTransaction extends Message { } } +type InstructionType = 0 | 1 | 2; + /** * An instruction represents one action */ @@ -128,7 +130,7 @@ export class Instruction extends Message { * Get the type of the instruction * @returns the type as a number */ - get type(): number { + get type(): InstructionType { if (this.spawn) { return Instruction.typeSpawn; }