Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-agarwal-coinbase committed Sep 24, 2024
1 parent 934e1ea commit ccf3026
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 61 deletions.
7 changes: 7 additions & 0 deletions src/coinbase/smart_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ export class SmartContract {
}
}

/**
* Type guard for checking if the smart contract is an ERC20.
*
* @param type - The type of the smart contract.
* @param options - The options of the smart contract.
* @returns True if the smart contract is an ERC20, false otherwise.
*/
private isERC20(
type: SmartContractType,
options: SmartContractOptionsModel,
Expand Down
52 changes: 26 additions & 26 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
export * from "./coinbase/address";
export * from "./coinbase/address/external_address";
export * from "./coinbase/address/wallet_address";
export * from './coinbase/api_error';
export * from './coinbase/asset';
export * from './coinbase/authenticator';
export * from './coinbase/balance';
export * from './coinbase/balance_map';
export * from './coinbase/coinbase';
export * from './coinbase/constants';
export * from './coinbase/contract_event';
export * from './coinbase/contract_invocation';
export * from './coinbase/errors';
export * from './coinbase/faucet_transaction';
export * from './coinbase/hash';
export * from './coinbase/historical_balance';
export * from './coinbase/payload_signature';
export * from './coinbase/server_signer';
export * from './coinbase/smart_contract';
export * from './coinbase/staking_balance';
export * from './coinbase/staking_operation';
export * from './coinbase/staking_reward';
export * from './coinbase/trade';
export * from './coinbase/transaction';
export * from './coinbase/transfer';
export * from './coinbase/types';
export * from './coinbase/validator';
export * from './coinbase/wallet';
export * from './coinbase/webhook';
export * from "./coinbase/api_error";
export * from "./coinbase/asset";
export * from "./coinbase/authenticator";
export * from "./coinbase/balance";
export * from "./coinbase/balance_map";
export * from "./coinbase/coinbase";
export * from "./coinbase/constants";
export * from "./coinbase/contract_event";
export * from "./coinbase/contract_invocation";
export * from "./coinbase/errors";
export * from "./coinbase/faucet_transaction";
export * from "./coinbase/hash";
export * from "./coinbase/historical_balance";
export * from "./coinbase/payload_signature";
export * from "./coinbase/server_signer";
export * from "./coinbase/smart_contract";
export * from "./coinbase/staking_balance";
export * from "./coinbase/staking_operation";
export * from "./coinbase/staking_reward";
export * from "./coinbase/trade";
export * from "./coinbase/transaction";
export * from "./coinbase/transfer";
export * from "./coinbase/types";
export * from "./coinbase/validator";
export * from "./coinbase/wallet";
export * from "./coinbase/webhook";
69 changes: 34 additions & 35 deletions src/tests/index_test.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
// test/index.test.ts
import * as index from "../index";

describe('Index file exports', () => {
it('should export all modules correctly', () => {
expect(index).toBeDefined();
expect(index).toHaveProperty('Address');
expect(index).toHaveProperty('APIError');
expect(index).toHaveProperty('Asset');
expect(index).toHaveProperty('Balance');
expect(index).toHaveProperty('BalanceMap');
expect(index).toHaveProperty('Coinbase');
expect(index).toHaveProperty('ContractEvent');
expect(index).toHaveProperty('ContractInvocation');
expect(index).toHaveProperty('ExternalAddress');
expect(index).toHaveProperty('FaucetTransaction');
expect(index).toHaveProperty('GWEI_DECIMALS');
expect(index).toHaveProperty('HistoricalBalance');
expect(index).toHaveProperty('InvalidAPIKeyFormatError');
expect(index).toHaveProperty('PayloadSignature');
expect(index).toHaveProperty('ServerSigner');
expect(index).toHaveProperty('SmartContract');
expect(index).toHaveProperty('SponsoredSendStatus');
expect(index).toHaveProperty('StakeOptionsMode');
expect(index).toHaveProperty('StakingBalance');
expect(index).toHaveProperty('StakingOperation');
expect(index).toHaveProperty('StakingReward');
expect(index).toHaveProperty('Trade');
expect(index).toHaveProperty('Transaction');
expect(index).toHaveProperty('TransactionStatus');
expect(index).toHaveProperty('Transfer');
expect(index).toHaveProperty('TransferStatus');
expect(index).toHaveProperty('Validator');
expect(index).toHaveProperty('Wallet');
expect(index).toHaveProperty('WalletAddress');
expect(index).toHaveProperty('Webhook');
});
describe("Index file exports", () => {
it("should export all modules correctly", () => {
expect(index).toBeDefined();
expect(index).toHaveProperty("Address");
expect(index).toHaveProperty("APIError");
expect(index).toHaveProperty("Asset");
expect(index).toHaveProperty("Balance");
expect(index).toHaveProperty("BalanceMap");
expect(index).toHaveProperty("Coinbase");
expect(index).toHaveProperty("ContractEvent");
expect(index).toHaveProperty("ContractInvocation");
expect(index).toHaveProperty("ExternalAddress");
expect(index).toHaveProperty("FaucetTransaction");
expect(index).toHaveProperty("GWEI_DECIMALS");
expect(index).toHaveProperty("HistoricalBalance");
expect(index).toHaveProperty("InvalidAPIKeyFormatError");
expect(index).toHaveProperty("PayloadSignature");
expect(index).toHaveProperty("ServerSigner");
expect(index).toHaveProperty("SmartContract");
expect(index).toHaveProperty("SponsoredSendStatus");
expect(index).toHaveProperty("StakeOptionsMode");
expect(index).toHaveProperty("StakingBalance");
expect(index).toHaveProperty("StakingOperation");
expect(index).toHaveProperty("StakingReward");
expect(index).toHaveProperty("Trade");
expect(index).toHaveProperty("Transaction");
expect(index).toHaveProperty("TransactionStatus");
expect(index).toHaveProperty("Transfer");
expect(index).toHaveProperty("TransferStatus");
expect(index).toHaveProperty("Validator");
expect(index).toHaveProperty("Wallet");
expect(index).toHaveProperty("WalletAddress");
expect(index).toHaveProperty("Webhook");
});
});

0 comments on commit ccf3026

Please sign in to comment.