mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
general renaming in Router
This commit is contained in:
parent
efc4b8b521
commit
6d605199df
@ -14,12 +14,12 @@ export class Router extends SmartContractWithAddress {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BuyDTBatch
|
* buyDatatokenBatch
|
||||||
* @param {String} address
|
* @param {String} address
|
||||||
* @param {Operation} operations Operations objects array
|
* @param {Operation} operations Operations objects array
|
||||||
* @return {Promise<TransactionReceipt>} Transaction receipt
|
* @return {Promise<TransactionReceipt>} Transaction receipt
|
||||||
*/
|
*/
|
||||||
public async buyDTBatch<G extends boolean = false>(
|
public async buyDatatokenBatch<G extends boolean = false>(
|
||||||
address: string,
|
address: string,
|
||||||
operations: Operation[],
|
operations: Operation[],
|
||||||
estimateGas?: G
|
estimateGas?: G
|
||||||
|
@ -121,7 +121,7 @@ describe('Router unit test', () => {
|
|||||||
expect(await router.isPoolTemplate(contracts.fixedRateAddress)).to.equal(false)
|
expect(await router.isPoolTemplate(contracts.fixedRateAddress)).to.equal(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('#buyDTBatch - should buy multiple DT in one call', async () => {
|
it('#buyDatatokenBatch - should buy multiple DT in one call', async () => {
|
||||||
// APPROVE DAI
|
// APPROVE DAI
|
||||||
const daiContract = new web3.eth.Contract(
|
const daiContract = new web3.eth.Contract(
|
||||||
MockERC20.abi as AbiItem[],
|
MockERC20.abi as AbiItem[],
|
||||||
@ -210,7 +210,7 @@ describe('Router unit test', () => {
|
|||||||
marketFeeAddress: factoryOwner
|
marketFeeAddress: factoryOwner
|
||||||
}
|
}
|
||||||
|
|
||||||
await router.buyDTBatch(user1, [operations1, operations2])
|
await router.buyDatatokenBatch(user1, [operations1, operations2])
|
||||||
|
|
||||||
// user1 got his dts
|
// user1 got his dts
|
||||||
expect(+(await balance(web3, datatokenAddress, user1))).gt(0)
|
expect(+(await balance(web3, datatokenAddress, user1))).gt(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user