diff --git a/src/transactionsFactories/transferTransactionsFactory.spec.ts b/src/transactionsFactories/transferTransactionsFactory.spec.ts index ce15eb85..4f13ee5d 100644 --- a/src/transactionsFactories/transferTransactionsFactory.spec.ts +++ b/src/transactionsFactories/transferTransactionsFactory.spec.ts @@ -12,7 +12,7 @@ describe("test transfer transcations factory", function () { const alice = Address.fromBech32("erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"); const bob = Address.fromBech32("erd1spyavw0956vq68xj8y4tenjpq2wd5a9p2c6j8gsz7ztyrnpxrruqzu66jx"); - it.only("should throw error, no token transfer provided", async () => { + it("should throw error, no token transfer provided", async () => { let transfers: any = []; assert.throw( diff --git a/src/transactionsFactories/transferTransactionsFactory.ts b/src/transactionsFactories/transferTransactionsFactory.ts index 782a5893..dfef0600 100644 --- a/src/transactionsFactories/transferTransactionsFactory.ts +++ b/src/transactionsFactories/transferTransactionsFactory.ts @@ -57,9 +57,11 @@ export class TransferTransactionsFactory { let extraGasForTransfer = new BigNumber(0); const tokenComputer = new TokenComputer(); - if (numberOfTransfers == 0) { + if (numberOfTransfers === 0) { throw new ErrBadUsage("No token transfer has been provided"); - } else if (numberOfTransfers == 1) { + } + + if (numberOfTransfers === 1) { const transfer = options.tokenTransfers[0]; if (tokenComputer.isFungible(transfer.token)) {