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

Mintbase / mintbase-js / 3680312998

pending completion
3680312998

push

github

mintbaseteam
🤖 Release v0.0.5-alpha.2

183 of 254 branches covered (72.05%)

Branch coverage included in aggregate %.

436 of 474 relevant lines covered (91.98%)

2.96 hits per line

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

75.0
/packages/sdk/src/delist/delist.ts
1
import { DEFAULT_CONTRACT_ADDRESS, GAS, ONE_YOCTO, TOKEN_METHOD_NAMES } from '../constants';
1✔
2
import { NearContractCall } from '../execute';
3

4
type DelistArgs = {
5
    nftContractId?: string;
6
    tokenId: string;
7
    marketId?: string;
8
}
9

10
export const delist = (
1✔
11
  args: DelistArgs,
12
): NearContractCall => {
13
  const { nftContractId = DEFAULT_CONTRACT_ADDRESS, tokenId, marketId } = args;
2!
14
  
15
  if (nftContractId == null) {
2!
16
    throw new Error('You must provide a nftContractId or define a NFT_CONTRACT_ID enviroment variable to default to');
×
17
  }
18

19
  return {
2✔
20
    contractAddress: nftContractId,
21
    args: {
22
      ...(marketId) && { account_id: marketId },
3✔
23
      token_id: tokenId,
24
    },
25
    methodName: marketId? TOKEN_METHOD_NAMES.TOKEN_ACCOUNT_REVOKE :TOKEN_METHOD_NAMES.TOKEN_ACCOUNT_REVOKE_ALL,
2✔
26
    gas: GAS,
27
    deposit: ONE_YOCTO,
28
  };
29
};
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