Skip to content

Commit

Permalink
chore: remove unused ecpair pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
fbwoolf authored and kyranjamie committed Jun 10, 2024
1 parent 4136b4a commit 52025c6
Show file tree
Hide file tree
Showing 167 changed files with 395 additions and 243 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@
"@dlc-link/dlc-tools": "1.1.1",
"@fungible-systems/zone-file": "2.0.0",
"@hirosystems/token-metadata-api-client": "1.2.0",
"@leather-wallet/bitcoin": "0.7.1",
"@leather-wallet/bitcoin": "0.7.2",
"@leather-wallet/crypto": "1.0.1",
"@leather-wallet/models": "0.8.0",
"@leather-wallet/query": "0.8.2",
"@leather-wallet/query": "0.8.3",
"@leather-wallet/tokens": "0.5.2",
"@leather-wallet/utils": "0.8.1",
"@ledgerhq/hw-transport-webusb": "6.27.19",
Expand Down Expand Up @@ -205,7 +205,6 @@
"dompurify": "3.1.4",
"dotenv": "16.4.5",
"ecdsa-sig-formatter": "1.0.11",
"ecpair": "2.1.0",
"formik": "2.4.5",
"jotai": "2.2.1",
"jotai-redux": "0.2.1",
Expand Down
41 changes: 19 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Suspense } from 'react';
import { Provider as ReduxProvider } from 'react-redux';

import { LeatherQueryProvider } from '@leather-wallet/query';
import { QueryClientProvider } from '@tanstack/react-query';
import { PersistGate } from 'redux-persist/integration/react';

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

import { GITHUB_ORG, GITHUB_REPO } from '@shared/constants';
import { BRANCH_NAME, WALLET_ENVIRONMENT } from '@shared/environment';

Expand Down
3 changes: 2 additions & 1 deletion src/app/common/hooks/analytics/use-analytics.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { useEffect, useMemo } from 'react';

import type { NetworkConfiguration } from '@leather-wallet/models';
import {
EventParams,
PageParams,
} from '@segment/analytics-next/dist/types/core/arguments-resolver';

import type { NetworkConfiguration } from '@leather-wallet/models';

import { HIRO_API_BASE_URL_MAINNET, HIRO_API_BASE_URL_TESTNET } from '@shared/constants';
import { IS_TEST_ENV, SEGMENT_WRITE_KEY } from '@shared/environment';
import { logger } from '@shared/logger';
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/hooks/use-location-state.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useEffect, useState } from 'react';
import { useLocation } from 'react-router-dom';

import { isUndefined } from '@leather-wallet/utils';
import get from 'lodash.get';

import { isUndefined } from '@leather-wallet/utils';

type LocationState = string | boolean | undefined | number | Location;

export function useLocationState<T extends LocationState>(propName: string): T;
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/hooks/use-submit-stx-transaction.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useCallback } from 'react';

import { delay, isError } from '@leather-wallet/utils';
import { bytesToHex } from '@stacks/common';
import { StacksTransaction, broadcastTransaction } from '@stacks/transactions';

import { delay, isError } from '@leather-wallet/utils';

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

import { getErrorMessage } from '@app/common/get-error-message';
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/profiles/requests.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { isString } from '@leather-wallet/utils';
import { ProfileUpdatePayload } from '@stacks/connect';
import { getPublicKeyFromPrivate } from '@stacks/encryption';
import { Person } from '@stacks/profile';
import { getAppPrivateKey } from '@stacks/wallet-sdk';
import { TokenVerifier, decodeToken } from 'jsontokens';

import { isString } from '@leather-wallet/utils';

import { StacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.models';

export function getProfileDataContentFromToken(requestToken: string): ProfileUpdatePayload {
Expand Down
5 changes: 3 additions & 2 deletions src/app/common/psbt/requests.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { Money } from '@leather-wallet/models';
import { isString } from '@leather-wallet/utils';
import type { TransactionInput } from '@scure/btc-signer/psbt';
import { PsbtPayload } from '@stacks/connect';
import { decodeToken } from 'jsontokens';

import type { Money } from '@leather-wallet/models';
import { isString } from '@leather-wallet/utils';

export interface SignPsbtArgs {
addressNativeSegwitTotal?: Money;
addressTaprootTotal?: Money;
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/signature/requests.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { isString } from '@leather-wallet/utils';
import { CommonSignaturePayload, SignaturePayload } from '@stacks/connect';
import { deserializeCV } from '@stacks/transactions';
import { TokenInterface, decodeToken } from 'jsontokens';

import { isString } from '@leather-wallet/utils';

import { StructuredMessageDataDomain } from '@shared/signature/signature-types';

export function getGenericSignaturePayloadFromToken(requestToken: string): CommonSignaturePayload {
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/stacks-utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { initBigNumber, microStxToStx } from '@leather-wallet/utils';
import { ChainID } from '@stacks/transactions';
import BigNumber from 'bignumber.js';
import { c32addressDecode } from 'c32check';

import { initBigNumber, microStxToStx } from '@leather-wallet/utils';

import { NetworkConfiguration, STX_DECIMALS } from '@shared/constants';
import { logger } from '@shared/logger';
import { isValidUrl } from '@shared/utils/validate-url';
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/theme-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { createContext, useContext, useEffect, useState } from 'react';

import { noop } from '@leather-wallet/utils';
import * as RadixTooltip from '@radix-ui/react-tooltip';
import { Theme as RadixTheme } from '@radix-ui/themes';

import { noop } from '@leather-wallet/utils';

import { store } from '@app/store';
import { settingsActions } from '@app/store/settings/settings.actions';
import { useUserSelectedTheme } from '@app/store/settings/settings.selectors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { UtxoResponseItem } from '@leather-wallet/query';
import { sumMoney, sumNumbers } from '@leather-wallet/utils';
import BigNumber from 'bignumber.js';
import { validate } from 'bitcoin-address-validation';

import type { UtxoResponseItem } from '@leather-wallet/query';
import { sumMoney, sumNumbers } from '@leather-wallet/utils';

import type { TransferRecipient } from '@shared/models/form.model';

import { filterUneconomicalUtxos, getSizeInfo } from '../utils';
Expand Down
5 changes: 3 additions & 2 deletions src/app/common/transactions/bitcoin/fees/bitcoin-fees.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { UtxoResponseItem } from '@leather-wallet/query';
import { createMoney } from '@leather-wallet/utils';
import BigNumber from 'bignumber.js';
import { sha256 } from 'bitcoinjs-lib/src/crypto';

import type { UtxoResponseItem } from '@leather-wallet/query';
import { createMoney } from '@leather-wallet/utils';

import { filterUneconomicalUtxos } from '../utils';
import { calculateMaxBitcoinSpend } from './calculate-max-bitcoin-spend';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import BigNumber from 'bignumber.js';

import type { AverageBitcoinFeeRates } from '@leather-wallet/models';
import type { UtxoResponseItem } from '@leather-wallet/query';
import { createMoney, satToBtc } from '@leather-wallet/utils';
import BigNumber from 'bignumber.js';

import { filterUneconomicalUtxos, getSpendableAmount } from '../utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { useCallback } from 'react';

import * as btc from '@scure/btc-signer';

import type { Money } from '@leather-wallet/models';
import type { UtxoResponseItem } from '@leather-wallet/query';
import * as btc from '@scure/btc-signer';

import { logger } from '@shared/logger';
import type { TransferRecipient } from '@shared/models/form.model';
Expand Down
5 changes: 3 additions & 2 deletions src/app/common/transactions/bitcoin/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { UtxoResponseItem } from '@leather-wallet/query';
import { satToBtc, sumNumbers, truncateMiddle } from '@leather-wallet/utils';
import BigNumber from 'bignumber.js';
import {
type AddressInfo,
Expand All @@ -8,6 +6,9 @@ import {
validate,
} from 'bitcoin-address-validation';

import type { UtxoResponseItem } from '@leather-wallet/query';
import { satToBtc, sumNumbers, truncateMiddle } from '@leather-wallet/utils';

import { BTC_P2WPKH_DUST_AMOUNT } from '@shared/constants';
import type { TransferRecipient } from '@shared/models/form.model';
import {
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/transactions/stacks/transaction.utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { truncateMiddle } from '@leather-wallet/utils';
import { bytesToHex } from '@stacks/common';
import { TransactionTypes } from '@stacks/connect';
import {
Expand All @@ -17,6 +16,8 @@ import {
} from '@stacks/transactions';
import { BigNumber } from 'bignumber.js';

import { truncateMiddle } from '@leather-wallet/utils';

import { StacksTx, StacksTxStatus } from '@shared/models/transactions/stacks-transaction.model';

import { getStacksContractName, stacksValue } from '@app/common/stacks-utils';
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { isBoolean } from '@leather-wallet/utils';
import { hexToBytes } from '@stacks/common';
import { BytesReader, PostCondition, deserializePostCondition } from '@stacks/transactions';
import { toUnicode } from 'punycode';

import { isBoolean } from '@leather-wallet/utils';

import {
BitcoinChainConfig,
BitcoinNetworkModes,
Expand Down
3 changes: 2 additions & 1 deletion src/app/common/validation/forms/address-validators.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { isString } from '@leather-wallet/utils';
import { AddressType, Network, getAddressInfo, validate } from 'bitcoin-address-validation';
import * as yup from 'yup';

import { isString } from '@leather-wallet/utils';

import { BitcoinNetworkModes, NetworkConfiguration } from '@shared/constants';
import { FormErrorMessages } from '@shared/error-messages';

Expand Down
5 changes: 3 additions & 2 deletions src/app/common/validation/forms/amount-validators.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import BigNumber from 'bignumber.js';
import * as yup from 'yup';

import type { Money } from '@leather-wallet/models';
import type { UtxoResponseItem } from '@leather-wallet/query';
import {
Expand All @@ -9,8 +12,6 @@ import {
satToBtc,
stxToMicroStx,
} from '@leather-wallet/utils';
import BigNumber from 'bignumber.js';
import * as yup from 'yup';

import { analytics } from '@shared/utils/analytics';

Expand Down
3 changes: 2 additions & 1 deletion src/app/common/validation/forms/currency-validators.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { countDecimals, isNumber } from '@leather-wallet/utils';
import * as yup from 'yup';

import { countDecimals, isNumber } from '@leather-wallet/utils';

import { BTC_DECIMALS, STX_DECIMALS } from '@shared/constants';
import { FormErrorMessages } from '@shared/error-messages';

Expand Down
5 changes: 3 additions & 2 deletions src/app/common/validation/forms/fee-validators.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { Money } from '@leather-wallet/models';
import { btcToSat, isNumber, moneyToBaseUnit, stxToMicroStx } from '@leather-wallet/utils';
import BigNumber from 'bignumber.js';
import { AnyObject, NumberSchema } from 'yup';

import type { Money } from '@leather-wallet/models';
import { btcToSat, isNumber, moneyToBaseUnit, stxToMicroStx } from '@leather-wallet/utils';

import { formatInsufficientBalanceError, formatPrecisionError } from '@app/common/error-formatters';
import {
btcAmountPrecisionValidator,
Expand Down
Loading

0 comments on commit 52025c6

Please sign in to comment.