diff --git a/test/integration/branches/branches_revert2.ts b/test/integration/branches/branches_revert2.ts index 67dc35b6f6204fadbd900da0430e0d9428075222..34d59d316f3c26ccc0cbd89d8108e7a375ef7bed 100644 --- a/test/integration/branches/branches_revert2.ts +++ b/test/integration/branches/branches_revert2.ts @@ -70,7 +70,7 @@ describe("Revert two blocks", function() { await s1.commit({ time: now }); await s1.commit({ time: now + 1 }); await s1.commit({ time: now + 1 }); - await cat.sendP(51, toc); + await cat.sendMoney(51, toc); await s1.commit({ time: now + 1 }); }); @@ -189,7 +189,7 @@ describe("Revert two blocks", function() { before(async () => { await s1.dal.txsDAL.removeAll() - await cat.sendP(19, toc); + await cat.sendMoney(19, toc); await s1.dal.blockDAL.removeBlock('DELETE FROM block WHERE fork AND number = 3') await s1.commit({ time: now + 1 }); }) diff --git a/test/integration/protocol/v0.5-transactions.ts b/test/integration/protocol/v0.5-transactions.ts index 836eaffb0d7e81dda640c9c8cac5f408d025a533..63863a77f3fd8892ffa1bede279647a2cef5ee94 100644 --- a/test/integration/protocol/v0.5-transactions.ts +++ b/test/integration/protocol/v0.5-transactions.ts @@ -38,7 +38,7 @@ describe("Protocol 0.5 Transaction version", function() { await s1.commit({ time: now }); await s1.commit({ time: now + 100 }); await s1.commit({ time: now + 100 }); - await cat.sendP(51, tac); + await cat.sendMoney(51, tac); }) after(() => { diff --git a/test/integration/tools/TestUser.ts b/test/integration/tools/TestUser.ts index c4f8c6b352d80766aea38e436d17bd5bf2750def..ddd6e515a24eb91ac9807fe9c4584c7abbecc9d4 100644 --- a/test/integration/tools/TestUser.ts +++ b/test/integration/tools/TestUser.ts @@ -184,19 +184,6 @@ export class TestUser { }) } - public send(amount:number, recipient:TestUser|string, comment?:string) { - const that = this - return async function(done:(e?:any)=>void) { - try { - let raw = await that.prepareITX(amount, recipient, comment) - await that.sendTX(raw) - done() - } catch (e) { - done(e) - } - }; - }; - public async sendMoney(amount:number, recipient:TestUser, comment?:string) { const raw = await this.prepareITX(amount, recipient, comment) await this.sendTX(raw) @@ -405,13 +392,4 @@ export class TestUser { const node2 = await this.getContacter(fromServer) return node2.getLookup(pubkey); } - - public async sendP(amount:number, userid:TestUser|string, comment?:string) { - return new Promise((res, rej) => { - this.send(amount, userid, comment)((err:any) => { - if (err) return rej(err) - res() - }) - }) - } } diff --git a/test/integration/transactions/transactions-test.ts b/test/integration/transactions/transactions-test.ts index fe470cffad02073cb24cd8465154be0528c4b1b4..3b04c54ea8d7105e90d210aabd97880fc2c677b6 100644 --- a/test/integration/transactions/transactions-test.ts +++ b/test/integration/transactions/transactions-test.ts @@ -60,7 +60,7 @@ describe("Testing transactions", function() { await s1.commit({ time: now + 7210 }); - await tic.sendP(510, toc); + await tic.sendMoney(510, toc); await s1.expect('/tx/history/DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo', (res:any) => { res.should.have.property('pubkey').equal('DKpQPUL4ckzXYdnDRvCRKAm1gNvSdmAXnTrJZ7LvM5Qo'); res.should.have.property('history').property('pending').length(1);