Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
4 changes: 1 addition & 3 deletions modules/sdk-coin-cosmos/test/testUtils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ export const getAvailableTestCoins = (): string[] => {
const resourcesDir = path.join(__dirname, '../resources');
// Read all files in the resources directory
const files = fs.readdirSync(resourcesDir);
// Filter for .ts files that are not index.ts
const coinFiles = files.filter((file) => file.endsWith('.ts') && file !== 'index.ts');
// Extract coin names by removing the .ts extension
return coinFiles.map((file) => file.replace('.ts', ''));
return files.map((file) => file.replace('.ts', ''));
} catch (error) {
// Fallback to hardcoded list if there's an error
console.warn('Failed to dynamically discover test coins:', error);
Expand Down
3 changes: 1 addition & 2 deletions modules/sdk-coin-cosmos/test/unit/cosmosSharedCoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { VerifyAddressOptions, VerifyTransactionOptions } from '@bitgo/sdk-core'
import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test';
import { BitGoAPI } from '@bitgo/sdk-api';
import { coins, CosmosNetwork } from '@bitgo/statics';
import { CosmosSharedCoin } from '../../src/cosmosSharedCoin';
import { Utils } from '../../src/lib/utils';
import { CosmosSharedCoin, Utils } from '../../src';
import { getAvailableTestCoins, getTestData } from '../testUtils';

describe('Cosmos Shared Coin', function () {
Expand Down
3 changes: 1 addition & 2 deletions modules/sdk-coin-cosmos/test/unit/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import sinon from 'sinon';
import should from 'should';
import { BitGoAPI } from '@bitgo/sdk-api';
import { CoinFeature, coins } from '@bitgo/statics';
import { register } from '../../src/register';
import { CosmosSharedCoin } from '../../src/cosmosSharedCoin';
import { register, CosmosSharedCoin } from '../../src';

describe('Cosmos Register', function () {
let bitgo: BitGoAPI;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TransactionType } from '@bitgo/sdk-core';
import should from 'should';
import { TransactionType } from '@bitgo/sdk-core';

import { getAvailableTestCoins, getBuilderFactory, getTestData } from '../../testUtils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TransactionType } from '@bitgo/sdk-core';
import { fromBase64, toHex } from '@cosmjs/encoding';
import should from 'should';
import { fromBase64, toHex } from '@cosmjs/encoding';
import { TransactionType } from '@bitgo/sdk-core';
import { getAvailableTestCoins, getBuilderFactory, getTestData } from '../../testUtils';

describe('Cosmos Transfer Builder', function () {
Expand Down
4 changes: 2 additions & 2 deletions modules/sdk-coin-cosmos/test/unit/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Utils } from '../../src/lib/utils';
import should from 'should';
import { coins, CosmosNetwork } from '@bitgo/statics';
import { getAvailableTestCoins, getTestData } from '../testUtils';
import should from 'should';
import { Utils } from '../../src';

describe('Cosmos Utils', function () {
const availableCoins = getAvailableTestCoins();
Expand Down