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

Mintbase / mintbase-js / 13974258834

20 Mar 2025 04:20PM CUT coverage: 77.007%. First build
13974258834

Pull #554

github

sainthiago
remove debug logs
Pull Request #554: Refactor accountExists function to include error handling and ensure consistent return values

890 of 1336 branches covered (66.62%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

1153 of 1317 relevant lines covered (87.55%)

15.01 hits per line

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

62.5
/packages/sdk/src/ftDepositStorage/ftDepositStorage.ts
1
import { mbjs } from '../config/config';
3✔
2
import { GAS_CONSTANTS, FT_STORAGE_DEPOSIT } from '../constants';
3✔
3
import { ERROR_MESSAGES } from '../errorMessages';
3✔
4
import { NearContractCall, FT_METHOD_NAMES, FtDepositStorageArgs, FtDepositStorageArgsResponse } from '../types';
3✔
5

6

7
/**
8
 * Transfers one or more tokens to specified recipients.
9
 * @param transferArguments {@link TransferArgs}
10
 * @returns contract call to be passed to @mintbase-js/sdk execute method
11
 */
12
export const ftDepositStorage = ({
3✔
13
  ftContractAddress,
14
  accountId,
15
}: FtDepositStorageArgs): NearContractCall<FtDepositStorageArgsResponse> => {
16

17
  if (ftContractAddress === null) {
3!
18
    throw new Error(ERROR_MESSAGES.FT_CONTRACT_ADDRESS);
×
19
  }
20

21
  return {
3✔
22
    contractAddress: ftContractAddress,
23
    methodName: FT_METHOD_NAMES.STORAGE_DEPOSIT,
24
    args: accountId ? { account_id: accountId } : null,
2!
25
    deposit: FT_STORAGE_DEPOSIT,
26
    gas: GAS_CONSTANTS.DEFAULT_GAS,
27
  };
28
};
29

30
export const usdcDepositStorage = (
3✔
31
  { accountId }: {accountId: string},
32
): NearContractCall<FtDepositStorageArgsResponse> =>
33
  ftDepositStorage({ accountId, ftContractAddress: mbjs.keys.ftAddresses.usdc });
×
34

35
export const usdtDepositStorage = (
3✔
36
  { accountId }: {accountId: string},
37
): NearContractCall<FtDepositStorageArgsResponse> =>
38
  ftDepositStorage({ accountId, ftContractAddress: mbjs.keys.ftAddresses.usdt });
×
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