diff --git a/.prettierrc b/.prettierrc index 7a35586..6f53ad1 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { "tabWidth": 2, - "singleQuote": true + "singleQuote": true, + "trailingComma": "all" } diff --git a/src/index.ts b/src/index.ts index bae72db..f8f01b5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import { EventEmitter } from 'node:events'; -import RequestHandler from './functions/RequestHandler'; +import RequestHandler from './structures/RequestHandler'; import { APIRESTGetAccountTransactions, APIRESTGetCurrenciesRates, @@ -15,8 +15,8 @@ import { getCachedCryptoCurrencies, getCachedCryptoCurrency, updateFiatCurrenciesCache, -} from './functions/util/CacheHandler'; -import { updateCurrenciesCache } from './functions/util/CacheHandler'; +} from './utils/CacheHandler'; +import { updateCurrenciesCache } from './utils/CacheHandler'; import CryptoCurrency from './structures/CryptoCurrency'; import ExchangeRate from './structures/ExchangeRate'; import Wallet from './structures/Wallet'; diff --git a/src/structures/Amount.ts b/src/structures/Amount.ts index f51b928..922fa9c 100644 --- a/src/structures/Amount.ts +++ b/src/structures/Amount.ts @@ -4,7 +4,7 @@ import { ApiAmount } from '../types/TipccApi'; import { getCachedCryptoCurrency, getCachedFiatCurrency, -} from '../functions/util/CacheHandler'; +} from '../utils/CacheHandler'; export default class Amount { public value: BigNumber; diff --git a/src/functions/RequestHandler.ts b/src/structures/RequestHandler.ts similarity index 98% rename from src/functions/RequestHandler.ts rename to src/structures/RequestHandler.ts index 4e1f42c..1a33895 100644 --- a/src/functions/RequestHandler.ts +++ b/src/structures/RequestHandler.ts @@ -1,5 +1,5 @@ import axios, { AxiosRequestConfig, RawAxiosResponseHeaders } from 'axios'; -import Bucket from './util/Bucket'; +import Bucket from '../utils/Bucket'; export default class RequestHandler { private _apiBaseUrl: string; diff --git a/src/functions/util/Bucket.ts b/src/utils/Bucket.ts similarity index 100% rename from src/functions/util/Bucket.ts rename to src/utils/Bucket.ts diff --git a/src/functions/util/CacheHandler.ts b/src/utils/CacheHandler.ts similarity index 91% rename from src/functions/util/CacheHandler.ts rename to src/utils/CacheHandler.ts index 2907472..4b8f0d2 100644 --- a/src/functions/util/CacheHandler.ts +++ b/src/utils/CacheHandler.ts @@ -1,9 +1,9 @@ -import TipccClient from '../..'; -import CryptoCurrency from '../../structures/CryptoCurrency'; +import TipccClient from '../'; +import CryptoCurrency from '../structures/CryptoCurrency'; import { APIRESTGetCurrenciesCryptocurrencies, APIRESTGetCurrentciesFiats, -} from '../../types/TipccApi'; +} from '../types/TipccApi'; const cryptoCurrenciesCache: CryptoCurrency[] = []; const fiatCurrenciesCache: CryptoCurrency[] = [];