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

Mintbase / mintbase-js / 4222151799

pending completion
4222151799

push

github

cif
fix(sdk): :white_check_mark: Fix import in config test

556 of 762 branches covered (72.97%)

Branch coverage included in aggregate %.

818 of 882 relevant lines covered (92.74%)

4.57 hits per line

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

64.29
/packages/sdk/src/list/list.ts
1
/* eslint-disable @typescript-eslint/camelcase */
2
import { mbjs } from '../config/config';
1✔
3
import { GAS, LISTING_DEPOSIT } from '../constants';
1✔
4
import { ERROR_MESSAGES } from '../errorMessages';
1✔
5
import { ListArgs, ListArgsResponse, MARKET_METHOD_NAMES, NearContractCall } from '../types';
1✔
6

7

8
/**
9
 * Lists a token on mintbase market contract 
10
 * @param listArguments {@link ListArgs}
11
 * @returns contract call to be passed to @mintbase-js/sdk execute method
12
 */
13
export const list = (args: ListArgs): NearContractCall<ListArgsResponse> => {
1✔
14
  const { contractAddress = mbjs.keys.contractAddress, tokenId, marketAddress = mbjs.keys.marketAddress, price } = args;
1!
15
  
16
  if (contractAddress == null) {
1!
17
    throw new Error(ERROR_MESSAGES.CONTRACT_ADDRESS);
×
18
  }
19
  
20
  return {
1✔
21
    contractAddress: contractAddress || mbjs.keys.contractAddress,
1!
22
    args: {
23
      token_id: tokenId,
24
      account_id: marketAddress,
25
      msg: JSON.stringify({
26
        price: price,
27
      }),
28
    },
29
    methodName: MARKET_METHOD_NAMES.LIST,
30
    deposit: LISTING_DEPOSIT,
31
    gas: GAS,
32
  };
33
};
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