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

Mintbase / mintbase-js / 4864369391

pending completion
4864369391

push

github

Ruben Marcus
add isomorphic-unfetch to docs

605 of 826 branches covered (73.24%)

Branch coverage included in aggregate %.

945 of 1023 relevant lines covered (92.38%)

4.93 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, RemoveMinterArgs, TOKEN_METHOD_NAMES } from '../types';
1✔
5

6

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

17
  if (contractAddress == null) {
1!
18
    throw new Error(ERROR_MESSAGES.CONTRACT_ADDRESS);
×
19
  }
20
  
21
  return {
1✔
22
    contractAddress: contractAddress || mbjs.keys.contractAddress,
1!
23
    args: {
24
      account_id: minterId,
25
    },
26
    methodName: TOKEN_METHOD_NAMES.REMOVE_MINTER,
27
    gas: GAS,
28
    deposit: ONE_YOCTO,
29
  };
30
};
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