• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Mintbase / mintbase-js / 4015446410

pending completion
4015446410

push

github

Sérgio
📝 Fixed main docs

483 of 648 branches covered (74.54%)

Branch coverage included in aggregate %.

721 of 780 relevant lines covered (92.44%)

4.23 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

69.23
/packages/sdk/src/removeMinter/removeMinter.ts
1
import { mbjs } from '../config/config';
1✔
2
import { GAS, ONE_YOCTO } from '../constants';
1✔
3
import { ERROR_MESSAGES } from '../errorMessages';
1✔
4
import { NearContractCall } from '../execute';
5
import { TOKEN_METHOD_NAMES } from '../types';
1✔
6

7
export type RemoveMinterArgs =  {
8
    minterId: string;
9
    contractAddress?: string;
10
  };
11

12
/**
13
 * Remove minting access of a provided id for a contract you own.
14
 * @param removeMinterArgs {@link RemoveMinterArgs}
15
 * @returns contract call to be passed to @mintbase-js/sdk execute method
16
 */     
17
export const removeMinter = (
1✔
18
  args: RemoveMinterArgs,
19
): NearContractCall=> {
20
  const { minterId, contractAddress = mbjs.keys.contractAddress } = args;
1!
21

22
  if (contractAddress == null) {
1!
23
    throw new Error(ERROR_MESSAGES.CONTRACT_ADDRESS);
×
24
  }
25
  
26
  return {
1✔
27
    contractAddress: contractAddress || mbjs.keys.contractAddress,
1!
28
    args: {
29
      account_id: minterId,
30
    },
31
    methodName: TOKEN_METHOD_NAMES.REMOVE_MINTER,
32
    gas: GAS,
33
    deposit: ONE_YOCTO,
34
  };
35
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc