mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-20 06:08:39 +01:00
chore(suite): move tor urls to @trezor/urls package
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { TOR_URLS } from '@suite-constants/tor';
|
||||
import { TOR_URLS } from '@trezor/urls';
|
||||
|
||||
export const onionDomain = TOR_URLS['trezor.io'];
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import url from 'url';
|
||||
import { isDev } from '@suite-utils/build';
|
||||
import { TOR_URLS } from '@suite-constants/tor';
|
||||
import { TOR_URLS } from '@trezor/urls';
|
||||
|
||||
export const APP_NAME = 'Trezor Suite';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { resolveStaticPath } from '@trezor/utils/lib/resolveStaticPath';
|
||||
import { ServerStyleSheet } from 'styled-components';
|
||||
import globalStyles from '../support/styles';
|
||||
import { isFeatureFlagEnabled } from '@suite-common/suite-utils';
|
||||
import { TOR_URLS } from '@suite-constants/tor';
|
||||
import { TOR_URLS } from '@trezor/urls';
|
||||
|
||||
const isOnionLocation = isFeatureFlagEnabled('ONION_LOCATION_META');
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ import * as URLS from '@trezor/urls';
|
||||
import { Translation, TrezorLink } from '@suite-components';
|
||||
import { ExtendedMessageDescriptor } from '@suite-types';
|
||||
|
||||
interface Props {
|
||||
url: keyof typeof URLS;
|
||||
interface ReadMoreLinkProps {
|
||||
url: keyof Omit<typeof URLS, 'TOR_URLS'>;
|
||||
linkLabel?: ExtendedMessageDescriptor['id'];
|
||||
message?: ExtendedMessageDescriptor['id'];
|
||||
}
|
||||
|
||||
// common component used in various places
|
||||
// displays Translation with TR_LEARN_MORE value (Link) or standalone Link
|
||||
export const ReadMoreLink = ({ url, message, linkLabel }: Props) =>
|
||||
export const ReadMoreLink = ({ url, message, linkLabel }: ReadMoreLinkProps) =>
|
||||
message ? (
|
||||
<Translation
|
||||
id={message}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { homescreensT1, homescreensT2 } from './homescreens';
|
||||
import * as DEVICE from './device';
|
||||
import { TOR_URLS } from './tor';
|
||||
|
||||
export { homescreensT1, homescreensT2, TOR_URLS, DEVICE };
|
||||
export { homescreensT1, homescreensT2, DEVICE };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TOR_URLS } from '@suite-constants';
|
||||
import { TOR_URLS } from '@trezor/urls';
|
||||
import { getTorUrlIfAvailable, getIsTorDomain, isOnionUrl, toTorUrl } from '@suite-utils/tor';
|
||||
|
||||
describe('tor', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { parseHostname } from '@trezor/utils';
|
||||
import { TOR_URLS } from '@suite-constants/tor';
|
||||
import { TOR_URLS } from '@trezor/urls';
|
||||
import { TorStatus } from '@suite-types';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './urls';
|
||||
export * from './github';
|
||||
export * from './tor';
|
||||
|
||||
Reference in New Issue
Block a user