mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-02 21:45:14 +01:00
chore: more refactorign to remove connect from components
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
"@suite-common/icons": "workspace:*",
|
||||
"@suite-common/icons-deprecated": "workspace:*",
|
||||
"@suite-common/suite-constants": "workspace:*",
|
||||
"@suite-common/suite-utils": "workspace:*",
|
||||
"@suite-common/validators": "workspace:*",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@trezor/asset-utils": "workspace:*",
|
||||
|
||||
@@ -2,8 +2,8 @@ import React, { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useSt
|
||||
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { isChanged } from '@suite-common/suite-utils';
|
||||
import { TimerId } from '@trezor/type-utils';
|
||||
import { isChanged } from '@trezor/utils';
|
||||
|
||||
function debounce<T extends (...args: unknown[]) => void>(
|
||||
func: T,
|
||||
|
||||
@@ -3,8 +3,7 @@ import { CSSProperties, MouseEventHandler, forwardRef } from 'react';
|
||||
import styled, { useTheme } from 'styled-components';
|
||||
|
||||
import { DEFAULT_FLAGSHIP_MODEL } from '@suite-common/suite-constants';
|
||||
import { getNarrowedDeviceModelInternal } from '@suite-common/suite-utils';
|
||||
import { DeviceModelInternal } from '@trezor/device-utils';
|
||||
import { DeviceModelInternal, getNarrowedDeviceModelInternal } from '@trezor/device-utils';
|
||||
|
||||
import { AnimationWrapper, Shape } from './AnimationPrimitives';
|
||||
import { resolveStaticPath } from '../../utils/resolveStaticPath';
|
||||
|
||||
@@ -4,8 +4,7 @@ import Lottie, { LottieOptions } from 'lottie-react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { DEFAULT_FLAGSHIP_MODEL } from '@suite-common/suite-constants';
|
||||
import { getNarrowedDeviceModelInternal } from '@suite-common/suite-utils';
|
||||
import { DeviceModelInternal } from '@trezor/device-utils';
|
||||
import { DeviceModelInternal, getNarrowedDeviceModelInternal } from '@trezor/device-utils';
|
||||
|
||||
import { AnimationWrapper, Shape } from './AnimationPrimitives';
|
||||
import { resolveStaticPath } from '../../utils/resolveStaticPath';
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { DefaultTheme, css, useTheme } from 'styled-components';
|
||||
|
||||
import { hexToRgba } from '@suite-common/suite-utils';
|
||||
import { Color, Colors, Elevation, spacings, spacingsPx } from '@trezor/theme';
|
||||
import { capitalizeFirstLetter } from '@trezor/utils';
|
||||
import { capitalizeFirstLetter, hexToRgba } from '@trezor/utils';
|
||||
|
||||
import type { UIHorizontalAlignment, UISize, UIVariant } from '../../config/types';
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
{
|
||||
"path": "../../suite-common/suite-constants"
|
||||
},
|
||||
{
|
||||
"path": "../../suite-common/suite-utils"
|
||||
},
|
||||
{
|
||||
"path": "../../suite-common/validators"
|
||||
},
|
||||
|
||||
11
packages/device-utils/src/deviceModelInternalUtils.ts
Normal file
11
packages/device-utils/src/deviceModelInternalUtils.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { DeviceModelInternal } from './deviceModelInternal';
|
||||
|
||||
/**
|
||||
* Returns DeviceModelInternal, but returns T3B1 if T2B1 is provided.
|
||||
* This is desirable because they both represent the same model (differing internally in the chip) and should behave the same in most situations,
|
||||
* so we don't need to provide separate assets, translations keys, URLs etc. for both.
|
||||
*/
|
||||
export const getNarrowedDeviceModelInternal = <T extends DeviceModelInternal>(
|
||||
model: T,
|
||||
): T extends DeviceModelInternal.T2B1 ? DeviceModelInternal.T3B1 : T =>
|
||||
(model === DeviceModelInternal.T2B1 ? DeviceModelInternal.T3B1 : model) as any;
|
||||
@@ -3,3 +3,4 @@ export * from './bootloaderUtils';
|
||||
export * from './modeUtils';
|
||||
export * from './types';
|
||||
export * from './deviceModelInternal';
|
||||
export * from './deviceModelInternalUtils';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import * as comparisonUtils from '@suite-common/suite-utils';
|
||||
import { networks } from '@suite-common/wallet-config';
|
||||
import { DiscoveryStatus } from '@suite-common/wallet-constants';
|
||||
import {
|
||||
@@ -10,6 +9,7 @@ import {
|
||||
selectSelectedDevice,
|
||||
} from '@suite-common/wallet-core';
|
||||
import { SelectedAccountStatus } from '@suite-common/wallet-types';
|
||||
import { isChanged } from '@trezor/utils';
|
||||
|
||||
import { ROUTER } from 'src/actions/suite/constants';
|
||||
import * as metadataActions from 'src/actions/suite/metadataActions';
|
||||
@@ -197,7 +197,7 @@ export const syncSelectedAccount = (action: Action) => (dispatch: Dispatch, getS
|
||||
if (!newState) return;
|
||||
|
||||
// find differences
|
||||
const stateChanged = comparisonUtils.isChanged(state.wallet.selectedAccount, newState, {
|
||||
const stateChanged = isChanged(state.wallet.selectedAccount, newState, {
|
||||
account: [
|
||||
'descriptor',
|
||||
'availableBalance',
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { getNarrowedDeviceModelInternal, resolveStaticPath } from '@suite-common/suite-utils';
|
||||
import { DeviceModelInternal, hasBitcoinOnlyFirmware } from '@trezor/device-utils';
|
||||
import { resolveStaticPath } from '@suite-common/suite-utils';
|
||||
import {
|
||||
DeviceModelInternal,
|
||||
getNarrowedDeviceModelInternal,
|
||||
hasBitcoinOnlyFirmware,
|
||||
} from '@trezor/device-utils';
|
||||
|
||||
import { applySettings } from 'src/actions/settings/deviceSettingsActions';
|
||||
import { getHomescreens } from 'src/constants/suite/homescreens';
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useDebounce } from 'react-use';
|
||||
|
||||
import { FiatCurrencyCode } from 'invity-api';
|
||||
|
||||
import { isChanged } from '@suite-common/suite-utils';
|
||||
import { cryptoIdToSymbol } from '@suite-common/trading';
|
||||
import { selectAccounts, selectSelectedDevice } from '@suite-common/wallet-core';
|
||||
import {
|
||||
@@ -13,7 +12,7 @@ import {
|
||||
fromFiatCurrency,
|
||||
isZero,
|
||||
} from '@suite-common/wallet-utils';
|
||||
import { BigNumber } from '@trezor/utils';
|
||||
import { BigNumber, isChanged } from '@trezor/utils';
|
||||
|
||||
import {
|
||||
FORM_CRYPTO_TOKEN,
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useForm, useWatch } from 'react-hook-form';
|
||||
import type { BuyTrade, BuyTradeQuoteRequest, CryptoId } from 'invity-api';
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
|
||||
import { isChanged } from '@suite-common/suite-utils';
|
||||
import { notificationsActions } from '@suite-common/toast-notifications';
|
||||
import {
|
||||
type TradingBuyType,
|
||||
@@ -21,6 +20,7 @@ import { networks } from '@suite-common/wallet-config';
|
||||
import { formatAmount } from '@suite-common/wallet-utils';
|
||||
import { isDesktop } from '@trezor/env-utils';
|
||||
import { EventType, analytics } from '@trezor/suite-analytics';
|
||||
import { isChanged } from '@trezor/utils';
|
||||
|
||||
import * as routerActions from 'src/actions/suite/routerActions';
|
||||
import * as tradingCommonActions from 'src/actions/wallet/trading/tradingCommonActions';
|
||||
|
||||
@@ -9,7 +9,6 @@ import type {
|
||||
} from 'invity-api';
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
|
||||
import { isChanged } from '@suite-common/suite-utils';
|
||||
import { notificationsActions } from '@suite-common/toast-notifications';
|
||||
import {
|
||||
type TradingExchangeType,
|
||||
@@ -28,6 +27,7 @@ import TrezorConnect, {
|
||||
EthereumSignTypedDataTypes,
|
||||
} from '@trezor/connect';
|
||||
import { EventType, analytics } from '@trezor/suite-analytics';
|
||||
import { isChanged } from '@trezor/utils';
|
||||
|
||||
import * as tradingCommonActions from 'src/actions/wallet/trading/tradingCommonActions';
|
||||
import { saveQuoteRequest, saveQuotes } from 'src/actions/wallet/tradingExchangeActions';
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useForm, useWatch } from 'react-hook-form';
|
||||
import type { BankAccount, CryptoId, SellFiatTrade, SellFiatTradeQuoteRequest } from 'invity-api';
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
|
||||
import { isChanged } from '@suite-common/suite-utils';
|
||||
import { notificationsActions } from '@suite-common/toast-notifications';
|
||||
import {
|
||||
type TradingSellType,
|
||||
@@ -21,6 +20,7 @@ import { networks } from '@suite-common/wallet-config';
|
||||
import { selectAccountByKey } from '@suite-common/wallet-core';
|
||||
import { amountToSmallestUnit, formatAmount } from '@suite-common/wallet-utils';
|
||||
import { EventType, analytics } from '@trezor/suite-analytics';
|
||||
import { isChanged } from '@trezor/utils';
|
||||
|
||||
import * as routerActions from 'src/actions/suite/routerActions';
|
||||
import * as tradingCommonActions from 'src/actions/wallet/trading/tradingCommonActions';
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useDispatch } from 'react-redux';
|
||||
|
||||
import { isFulfilled } from '@reduxjs/toolkit';
|
||||
|
||||
import { isChanged } from '@suite-common/suite-utils';
|
||||
import { COMPOSE_ERROR_TYPES } from '@suite-common/wallet-constants';
|
||||
import { composeSendFormTransactionFeeLevelsThunk } from '@suite-common/wallet-core';
|
||||
import {
|
||||
@@ -18,6 +17,7 @@ import {
|
||||
import { findComposeErrors } from '@suite-common/wallet-utils';
|
||||
import { FeeLevel } from '@trezor/connect';
|
||||
import { useDebounce } from '@trezor/react-utils';
|
||||
import { isChanged } from '@trezor/utils';
|
||||
|
||||
import { TranslationKey } from 'src/components/suite/Translation';
|
||||
import { SendContextValues, UseSendFormState } from 'src/types/wallet/sendForm';
|
||||
|
||||
@@ -4,7 +4,6 @@ import { useForm, useWatch } from 'react-hook-form';
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
import { fromWei } from 'web3-utils';
|
||||
|
||||
import { isChanged } from '@suite-common/suite-utils';
|
||||
import { StakeContextValues, selectFiatRatesByFiatRateKey } from '@suite-common/wallet-core';
|
||||
import { PrecomposedTransactionFinal, StakeFormState } from '@suite-common/wallet-types';
|
||||
import {
|
||||
@@ -14,6 +13,7 @@ import {
|
||||
getStakingLimitsByNetwork,
|
||||
toFiatCurrency,
|
||||
} from '@suite-common/wallet-utils';
|
||||
import { isChanged } from '@trezor/utils';
|
||||
import { BigNumber } from '@trezor/utils/src/bigNumber';
|
||||
|
||||
import { signTransaction } from 'src/actions/wallet/stakeActions';
|
||||
|
||||
@@ -3,7 +3,6 @@ import { useForm, useWatch } from 'react-hook-form';
|
||||
|
||||
import useDebounce from 'react-use/lib/useDebounce';
|
||||
|
||||
import { isChanged } from '@suite-common/suite-utils';
|
||||
import {
|
||||
UnstakeContextValues as UnstakeContextValuesBase,
|
||||
UnstakeFormState,
|
||||
@@ -17,7 +16,7 @@ import {
|
||||
getStakingDataForNetwork,
|
||||
toFiatCurrency,
|
||||
} from '@suite-common/wallet-utils';
|
||||
import { BigNumber } from '@trezor/utils';
|
||||
import { BigNumber, isChanged } from '@trezor/utils';
|
||||
|
||||
import { signTransaction } from 'src/actions/wallet/stakeActions';
|
||||
import { useDispatch, useSelector } from 'src/hooks/suite';
|
||||
|
||||
@@ -3,13 +3,12 @@ import { useIntl } from 'react-intl';
|
||||
|
||||
import {
|
||||
getCheckBackupUrl,
|
||||
getNarrowedDeviceModelInternal,
|
||||
isDeviceAcquired,
|
||||
isDeviceWithButtons,
|
||||
} from '@suite-common/suite-utils';
|
||||
import { BulletList, Card, H2, H3, Image, NewModal, Paragraph } from '@trezor/components';
|
||||
import TrezorConnect from '@trezor/connect';
|
||||
import { DeviceModelInternal } from '@trezor/device-utils';
|
||||
import { DeviceModelInternal, getNarrowedDeviceModelInternal } from '@trezor/device-utils';
|
||||
import { spacings } from '@trezor/theme';
|
||||
|
||||
import {
|
||||
|
||||
@@ -13,6 +13,7 @@ export * from './bytesToHumanReadable';
|
||||
export * from './cache';
|
||||
export * from './capitalizeFirstLetter';
|
||||
export * from './cloneObject';
|
||||
export * from './comparison';
|
||||
export * from './convertTaprootXpub';
|
||||
export * from './countBytesInString';
|
||||
export * from './createCooldown';
|
||||
@@ -29,6 +30,7 @@ export * from './getWeakRandomId';
|
||||
export * from './getWeakRandomInt';
|
||||
export * from './getWeakRandomNumberInRange';
|
||||
export * from './hasUppercaseLetter';
|
||||
export * from './hexToRgba';
|
||||
export * from './isArrayMember';
|
||||
export * from './isFullPath';
|
||||
export * from './isHex';
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export const isChanged = [
|
||||
import * as comparisonUtils from '../src/comparison';
|
||||
|
||||
const isChanged = [
|
||||
{
|
||||
testName: 'isChanged',
|
||||
prev: {
|
||||
@@ -163,3 +165,11 @@ export const isChanged = [
|
||||
result: false,
|
||||
},
|
||||
];
|
||||
|
||||
describe('reducer utils', () => {
|
||||
isChanged.forEach(f => {
|
||||
it(`isChanged${f.testName}`, () => {
|
||||
expect(comparisonUtils.isChanged(f.prev, f.current, f.filter)).toEqual(f.result);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
import * as fixtures from '../__fixtures__/comparison';
|
||||
import * as comparisonUtils from '../comparison';
|
||||
|
||||
describe('reducer utils', () => {
|
||||
fixtures.isChanged.forEach(f => {
|
||||
it(`isChanged${f.testName}`, () => {
|
||||
expect(comparisonUtils.isChanged(f.prev, f.current, f.filter)).toEqual(f.result);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AcquiredDevice, TrezorDevice } from '@suite-common/suite-types';
|
||||
import { Device, KnownDevice, UnavailableCapability } from '@trezor/connect';
|
||||
import { DeviceModelInternal } from '@trezor/device-utils';
|
||||
import { DeviceModelInternal, getNarrowedDeviceModelInternal } from '@trezor/device-utils';
|
||||
import * as URLS from '@trezor/urls';
|
||||
|
||||
/**
|
||||
@@ -251,16 +251,6 @@ export const getChangelogUrl = (device: TrezorDevice, revision?: string | null)
|
||||
return `https://github.com/trezor/trezor-firmware/blob/${commit}/${folder}/${changelogFile}`;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns DeviceModelInternal, but returns T3B1 if T2B1 is provided.
|
||||
* This is desirable because they both represent the same model (differing internally in the chip) and should behave the same in most situations,
|
||||
* so we don't need to provide separate assets, translations keys, URLs etc. for both.
|
||||
*/
|
||||
export const getNarrowedDeviceModelInternal = <T extends DeviceModelInternal>(
|
||||
model: T,
|
||||
): T extends DeviceModelInternal.T2B1 ? DeviceModelInternal.T3B1 : T =>
|
||||
(model === DeviceModelInternal.T2B1 ? DeviceModelInternal.T3B1 : model) as any;
|
||||
|
||||
export const getCheckBackupUrl = (device?: TrezorDevice) => {
|
||||
const deviceModelInternal = device?.features?.internal_model;
|
||||
|
||||
|
||||
@@ -3,10 +3,8 @@ export * from './device';
|
||||
export * from './features';
|
||||
export * from './build';
|
||||
export * from './resolveStaticPath';
|
||||
export * from './comparison';
|
||||
export * from './txsPerPage';
|
||||
export * from './parseFirmwareChangelog';
|
||||
export * from './uppercaseType';
|
||||
export * from './protocol';
|
||||
export { hexToRgba } from './hexToRgba';
|
||||
export { UnreachableCaseError } from './UnreachableCaseError';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DeviceModelInternal } from '@trezor/device-utils';
|
||||
import { type DeviceModelInternal } from '@trezor/device-utils';
|
||||
import { RequiredKey } from '@trezor/type-utils';
|
||||
|
||||
export type NetworkSymbol =
|
||||
|
||||
@@ -7,7 +7,6 @@ import {
|
||||
getFirstDeviceInstance,
|
||||
getNewInstanceNumber,
|
||||
getSelectedDevice,
|
||||
isChanged,
|
||||
isDeviceAcquired,
|
||||
sortByTimestamp,
|
||||
} from '@suite-common/suite-utils';
|
||||
@@ -30,6 +29,7 @@ import TrezorConnect, {
|
||||
UI,
|
||||
} from '@trezor/connect';
|
||||
import { getEnvironment } from '@trezor/env-utils';
|
||||
import { isChanged } from '@trezor/utils';
|
||||
|
||||
import { DEVICE_MODULE_PREFIX, DeviceConnectActionPayload, deviceActions } from './deviceActions';
|
||||
import { PORTFOLIO_TRACKER_DEVICE_ID, portfolioTrackerDevice } from './deviceConstants';
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"@trezor/device-utils": "workspace:*",
|
||||
"@trezor/env-utils": "workspace:*",
|
||||
"@trezor/styles": "workspace:*",
|
||||
"@trezor/utils": "workspace:*",
|
||||
"expo-linear-gradient": "^14.0.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.76.1",
|
||||
|
||||
@@ -2,7 +2,6 @@ import { ImageBackground, StyleSheet } from 'react-native';
|
||||
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
|
||||
import { hexToRgba } from '@suite-common/suite-utils';
|
||||
import { Box, Button, Text, VStack } from '@suite-native/atoms';
|
||||
import { Icon } from '@suite-native/icons';
|
||||
import { Translation } from '@suite-native/intl';
|
||||
@@ -15,6 +14,7 @@ import {
|
||||
import { getWindowHeight } from '@trezor/env-utils';
|
||||
import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
|
||||
import { colorVariants } from '@trezor/theme';
|
||||
import { hexToRgba } from '@trezor/utils';
|
||||
|
||||
import { E2ESkipOnboardingButton } from '../components/E2ESkipOnboardingButton';
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
{ "path": "../navigation" },
|
||||
{ "path": "../../packages/device-utils" },
|
||||
{ "path": "../../packages/env-utils" },
|
||||
{ "path": "../../packages/styles" }
|
||||
{ "path": "../../packages/styles" },
|
||||
{ "path": "../../packages/utils" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
"@reduxjs/toolkit": "1.9.5",
|
||||
"@suite-common/formatters": "workspace:*",
|
||||
"@suite-common/redux-utils": "workspace:*",
|
||||
"@suite-common/suite-utils": "workspace:*",
|
||||
"@suite-common/validators": "workspace:*",
|
||||
"@suite-common/wallet-config": "workspace:*",
|
||||
"@suite-common/wallet-core": "workspace:*",
|
||||
|
||||
@@ -3,9 +3,9 @@ import Animated, { SlideOutDown, useAnimatedStyle, withTiming } from 'react-nati
|
||||
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
|
||||
import { hexToRgba } from '@suite-common/suite-utils';
|
||||
import { Box } from '@suite-native/atoms';
|
||||
import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
|
||||
import { hexToRgba } from '@trezor/utils';
|
||||
|
||||
type SlidingFooterOverlayProps = {
|
||||
currentStepIndex: number;
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
{
|
||||
"path": "../../suite-common/redux-utils"
|
||||
},
|
||||
{
|
||||
"path": "../../suite-common/suite-utils"
|
||||
},
|
||||
{
|
||||
"path": "../../suite-common/validators"
|
||||
},
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"@suite-native/navigation": "workspace:*",
|
||||
"@suite-native/test-utils": "workspace:*",
|
||||
"@trezor/blockchain-link-types": "workspace:*",
|
||||
"@trezor/utils": "workspace:*",
|
||||
"expo-linear-gradient": "^14.0.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.76.1",
|
||||
|
||||
@@ -4,10 +4,10 @@ import { Pressable } from 'react-native';
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
|
||||
import { useFormatters } from '@suite-common/formatters';
|
||||
import { hexToRgba } from '@suite-common/suite-utils';
|
||||
import { Text } from '@suite-native/atoms';
|
||||
import { CryptoIcon, Icon } from '@suite-native/icons';
|
||||
import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
|
||||
import { hexToRgba } from '@trezor/utils';
|
||||
|
||||
import { useTradeableAssetDominantColor } from '../../hooks/useTradeableAssetDominantColor';
|
||||
import { TradeableAsset } from '../../types';
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
{ "path": "../test-utils" },
|
||||
{
|
||||
"path": "../../packages/blockchain-link-types"
|
||||
}
|
||||
},
|
||||
{ "path": "../../packages/utils" }
|
||||
],
|
||||
"include": [".", "**/*.json"]
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"@trezor/connect": "workspace:*",
|
||||
"@trezor/styles": "workspace:*",
|
||||
"@trezor/theme": "workspace:*",
|
||||
"@trezor/utils": "workspace:*",
|
||||
"expo-linear-gradient": "14.0.1",
|
||||
"expo-linking": "^7.0.5",
|
||||
"expo-navigation-bar": "^4.0.2",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
|
||||
import { hexToRgba } from '@suite-common/suite-utils';
|
||||
import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
|
||||
import { hexToRgba } from '@trezor/utils';
|
||||
|
||||
const screenFooterGradientStyle = prepareNativeStyle(utils => ({
|
||||
width: '100%',
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
{ "path": "../icons" },
|
||||
{ "path": "../../packages/connect" },
|
||||
{ "path": "../../packages/styles" },
|
||||
{ "path": "../../packages/theme" }
|
||||
{ "path": "../../packages/theme" },
|
||||
{ "path": "../../packages/utils" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@shopify/react-native-skia": "^1.11.6",
|
||||
"@suite-common/suite-utils": "workspace:*",
|
||||
"@trezor/utils": "workspace:*",
|
||||
"@types/react": "18.2.79",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.76.1",
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
vec,
|
||||
} from '@shopify/react-native-skia';
|
||||
|
||||
import { hexToRgba } from '@suite-common/suite-utils';
|
||||
import { hexToRgba } from '@trezor/utils';
|
||||
|
||||
import { BlurOverlay } from './BlurOverlay';
|
||||
import {
|
||||
|
||||
@@ -5,9 +5,7 @@
|
||||
"noUncheckedIndexedAccess": true
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../../suite-common/suite-utils"
|
||||
},
|
||||
{ "path": "../../packages/utils" },
|
||||
{ "path": "../../packages/eslint" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
"@gorhom/bottom-sheet": "5.0.5",
|
||||
"@react-navigation/native": "6.1.18",
|
||||
"@reduxjs/toolkit": "1.9.5",
|
||||
"@suite-common/formatters": "workspace:*",
|
||||
"@suite-native/intl": "workspace:*",
|
||||
"@testing-library/react-native": "13.0.0",
|
||||
"@trezor/styles": "workspace:*",
|
||||
"@trezor/theme": "workspace:*",
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": { "outDir": "libDev" },
|
||||
"references": [
|
||||
{
|
||||
"path": "../../suite-common/formatters"
|
||||
},
|
||||
{ "path": "../intl" },
|
||||
{ "path": "../../packages/styles" },
|
||||
{ "path": "../../packages/theme" }
|
||||
]
|
||||
|
||||
15
yarn.lock
15
yarn.lock
@@ -9749,7 +9749,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@suite-common/wallet-config@workspace:suite-common/wallet-config"
|
||||
dependencies:
|
||||
"@trezor/connect": "workspace:*"
|
||||
"@trezor/device-utils": "workspace:*"
|
||||
"@trezor/type-utils": "workspace:*"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@@ -10456,7 +10456,7 @@ __metadata:
|
||||
"@suite-common/wallet-config": "workspace:*"
|
||||
"@suite-common/wallet-utils": "workspace:*"
|
||||
"@trezor/asset-utils": "workspace:*"
|
||||
"@trezor/connect": "workspace:*"
|
||||
"@trezor/device-utils": "workspace:*"
|
||||
"@trezor/styles": "workspace:*"
|
||||
"@trezor/theme": "workspace:*"
|
||||
expo-image: "npm:^2.0.0"
|
||||
@@ -10814,9 +10814,10 @@ __metadata:
|
||||
"@suite-native/icons": "workspace:*"
|
||||
"@suite-native/intl": "workspace:*"
|
||||
"@suite-native/navigation": "workspace:*"
|
||||
"@trezor/connect": "workspace:*"
|
||||
"@trezor/device-utils": "workspace:*"
|
||||
"@trezor/env-utils": "workspace:*"
|
||||
"@trezor/styles": "workspace:*"
|
||||
"@trezor/utils": "workspace:*"
|
||||
expo-linear-gradient: "npm:^14.0.1"
|
||||
react: "npm:18.2.0"
|
||||
react-native: "npm:0.76.1"
|
||||
@@ -10836,7 +10837,6 @@ __metadata:
|
||||
"@reduxjs/toolkit": "npm:1.9.5"
|
||||
"@suite-common/formatters": "workspace:*"
|
||||
"@suite-common/redux-utils": "workspace:*"
|
||||
"@suite-common/suite-utils": "workspace:*"
|
||||
"@suite-common/validators": "workspace:*"
|
||||
"@suite-common/wallet-config": "workspace:*"
|
||||
"@suite-common/wallet-core": "workspace:*"
|
||||
@@ -10953,6 +10953,7 @@ __metadata:
|
||||
"@suite-native/navigation": "workspace:*"
|
||||
"@suite-native/test-utils": "workspace:*"
|
||||
"@trezor/blockchain-link-types": "workspace:*"
|
||||
"@trezor/utils": "workspace:*"
|
||||
expo-linear-gradient: "npm:^14.0.1"
|
||||
react: "npm:18.2.0"
|
||||
react-native: "npm:0.76.1"
|
||||
@@ -10979,6 +10980,7 @@ __metadata:
|
||||
"@trezor/connect": "workspace:*"
|
||||
"@trezor/styles": "workspace:*"
|
||||
"@trezor/theme": "workspace:*"
|
||||
"@trezor/utils": "workspace:*"
|
||||
expo-linear-gradient: "npm:14.0.1"
|
||||
expo-linking: "npm:^7.0.5"
|
||||
expo-navigation-bar: "npm:^4.0.2"
|
||||
@@ -11043,8 +11045,8 @@ __metadata:
|
||||
resolution: "@suite-native/react-native-graph@workspace:suite-native/react-native-graph"
|
||||
dependencies:
|
||||
"@shopify/react-native-skia": "npm:^1.11.6"
|
||||
"@suite-common/suite-utils": "workspace:*"
|
||||
"@trezor/eslint": "workspace:*"
|
||||
"@trezor/utils": "workspace:*"
|
||||
"@types/react": "npm:18.2.79"
|
||||
react: "npm:18.2.0"
|
||||
react-native: "npm:0.76.1"
|
||||
@@ -11188,6 +11190,8 @@ __metadata:
|
||||
"@gorhom/bottom-sheet": "npm:5.0.5"
|
||||
"@react-navigation/native": "npm:6.1.18"
|
||||
"@reduxjs/toolkit": "npm:1.9.5"
|
||||
"@suite-common/formatters": "workspace:*"
|
||||
"@suite-native/intl": "workspace:*"
|
||||
"@testing-library/react-native": "npm:13.0.0"
|
||||
"@trezor/styles": "workspace:*"
|
||||
"@trezor/theme": "workspace:*"
|
||||
@@ -11670,7 +11674,6 @@ __metadata:
|
||||
"@suite-common/icons": "workspace:*"
|
||||
"@suite-common/icons-deprecated": "workspace:*"
|
||||
"@suite-common/suite-constants": "workspace:*"
|
||||
"@suite-common/suite-utils": "workspace:*"
|
||||
"@suite-common/validators": "workspace:*"
|
||||
"@testing-library/jest-dom": "npm:^6.6.3"
|
||||
"@testing-library/react": "npm:14.2.1"
|
||||
|
||||
Reference in New Issue
Block a user