Skip to content

Commit

Permalink
refactor: delete query files
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarkhanzadian committed May 6, 2024
1 parent bd08974 commit 51576a7
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/app/features/activity-list/activity-list.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useMemo } from 'react';
import { Outlet } from 'react-router-dom';

import { useGetBitcoinTransactionsByAddressesQuery } from '@leather-wallet/query';
import uniqby from 'lodash.uniqby';

import { LoadingSpinner } from '@app/components/loading-spinner';
import { useBitcoinPendingTransactions } from '@app/query/bitcoin/address/transactions-by-address.hooks';
import { useGetBitcoinTransactionsByAddressesQuery } from '@app/query/bitcoin/address/transactions-by-address.query';
import { useConfigBitcoinEnabled } from '@app/query/common/remote-config/remote-config.query';
import { useStacksPendingTransactions } from '@app/query/stacks/mempool/mempool.hooks';
import { useGetAccountTransactionsWithTransfersQuery } from '@app/query/stacks/transactions/transactions-with-transfers.query';
Expand Down

This file was deleted.

3 changes: 2 additions & 1 deletion src/app/query/bitcoin/address/utxos-by-address.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useCallback } from 'react';

import { useGetUtxosByAddressQuery } from '@leather-wallet/query';

import { InscriptionResponseItem } from '@shared/models/inscription.model';

import { useCurrentAccountNativeSegwitIndexZeroSigner } from '@app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks';
Expand All @@ -12,7 +14,6 @@ import {
import { useInscriptionsByAddressQuery } from '../ordinals/inscriptions.query';
import { useRunesEnabled, useRunesOutputsByAddress } from '../runes/runes.hooks';
import { useBitcoinPendingTransactionsInputs } from './transactions-by-address.hooks';
import { useGetUtxosByAddressQuery } from './utxos-by-address.query';

export function filterUtxosWithInscriptions(
inscriptions: InscriptionResponseItem[],
Expand Down
1 change: 0 additions & 1 deletion src/app/query/bitcoin/address/utxos-by-address.query.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/app/query/bitcoin/balance/btc-taproot-balance.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { useMemo } from 'react';

import { useTaprootAccountUtxosQuery } from '@leather-wallet/query';

import { createMoney } from '@shared/models/money.model';

import { sumNumbers } from '@app/common/math/helpers';
import { useCurrentAccountIndex } from '@app/store/accounts/account';
import { useCurrentTaprootAccount } from '@app/store/accounts/blockchain/bitcoin/taproot-account.hooks';

import { filterUtxosWithInscriptions } from '../address/utxos-by-address.hooks';
import { useTaprootAccountUtxosQuery } from '../address/utxos-by-address.query';
import { UtxoWithDerivationPath } from '../bitcoin-client';
import { useGetInscriptionsInfiniteQuery } from '../ordinals/inscriptions.query';

Expand Down
4 changes: 2 additions & 2 deletions src/app/query/bitcoin/fees/fee-estimates.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useGetAllBitcoinFeeEstimatesQuery } from '@leather-wallet/query';

import { logger } from '@shared/logger';

import { useAnalytics } from '@app/common/hooks/analytics/use-analytics';
import { calculateMeanAverage } from '@app/common/math/calculate-averages';
import { initBigNumber } from '@app/common/math/helpers';
import { isFulfilled, isRejected } from '@app/common/utils';

import { useGetAllBitcoinFeeEstimatesQuery } from './fee-estimates.query';

export function useAverageBitcoinFeeRates() {
const analytics = useAnalytics();
return useGetAllBitcoinFeeEstimatesQuery({
Expand Down
1 change: 0 additions & 1 deletion src/app/query/bitcoin/fees/fee-estimates.query.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/query/bitcoin/ordinals/inscription.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useGetInscriptionQuery } from '@leather-wallet/query';

import { HIRO_INSCRIPTIONS_API_URL } from '@shared/constants';
import {
Inscription,
SupportedInscription,
whenInscriptionType,
} from '@shared/models/inscription.model';

import { useGetInscriptionQuery } from './inscription.query';

export function createInscriptionInfoUrl(id: string) {
return `https://ordinals.hiro.so/inscription/${id}`;
}
Expand Down
1 change: 0 additions & 1 deletion src/app/query/bitcoin/ordinals/inscription.query.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/query/bitcoin/stamps/stamps-by-address.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useStampsByAddressQuery } from './stamps-by-address.query';
import { useStampsByAddressQuery } from '@leather-wallet/query';

export function useStampsByAddress(address: string) {
return useStampsByAddressQuery(address, {
Expand Down
1 change: 0 additions & 1 deletion src/app/query/bitcoin/stamps/stamps-by-address.query.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/app/query/bitcoin/transaction/transaction.query.ts

This file was deleted.

0 comments on commit 51576a7

Please sign in to comment.