1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

rename removeERC20Deployer to removeDatatokenDeployer

This commit is contained in:
Miquel A. Cabot 2022-06-10 10:41:12 +02:00
parent 87b8090ce4
commit 6db0cd0627
2 changed files with 8 additions and 8 deletions

View File

@ -280,7 +280,7 @@ export class Nft extends SmartContract {
* @param {Contract} nftContract optional contract instance
* @return {Promise<any>}
*/
public async estGasGasRemoveErc20Deployer(
public async estGasGasRemoveDatatokenDeployer(
nftAddress: string,
address: string,
erc20Deployer: string,
@ -302,7 +302,7 @@ export class Nft extends SmartContract {
* @param {String} erc20Deployer Address of the user to be revoked ERC20Deployer Permission
* @return {Promise<TransactionReceipt>} trxReceipt
*/
public async removeErc20Deployer(
public async removeDatatokenDeployer(
nftAddress: string,
address: string,
erc20Deployer: string

View File

@ -141,19 +141,19 @@ describe('NFT', () => {
}
})
it('#removeERC20Deployer - remove ERC20deployer if Manager', async () => {
it('#removeDatatokenDeployer - remove ERC20deployer if Manager', async () => {
assert((await nftDatatoken.isDatatokenDeployer(nftAddress, user1)) === true)
await nftDatatoken.removeErc20Deployer(nftAddress, nftOwner, user1)
await nftDatatoken.removeDatatokenDeployer(nftAddress, nftOwner, user1)
assert((await nftDatatoken.isDatatokenDeployer(nftAddress, user1)) === false)
})
it('#removeERC20Deployer - should fail and remove ERC20deployer if NOT Manager nor himself an ERC20Deployer', async () => {
it('#removeDatatokenDeployer - should fail and remove ERC20deployer if NOT Manager nor himself an ERC20Deployer', async () => {
await nftDatatoken.addDatatokenDeployer(nftAddress, nftOwner, user1)
assert((await nftDatatoken.isDatatokenDeployer(nftAddress, user1)) === true)
try {
await nftDatatoken.removeErc20Deployer(nftAddress, user1, user1)
await nftDatatoken.removeDatatokenDeployer(nftAddress, user1, user1)
assert(false)
} catch (e) {
assert(e.message === 'Caller is not Manager nor ERC20Deployer')
@ -161,10 +161,10 @@ describe('NFT', () => {
assert((await nftDatatoken.isDatatokenDeployer(nftAddress, user1)) === true)
})
it('#removeERC20Deployer - should fail to remove himself as an ERC20Deployer', async () => {
it('#removeDatatokenDeployer - should fail to remove himself as an ERC20Deployer', async () => {
assert((await nftDatatoken.isDatatokenDeployer(nftAddress, user1)) === true)
try {
await nftDatatoken.removeErc20Deployer(nftAddress, user1, user1)
await nftDatatoken.removeDatatokenDeployer(nftAddress, user1, user1)
assert(false)
} catch (e) {
assert(e.message === 'Caller is not Manager nor ERC20Deployer')