chore(suite): move tor urls to @trezor/urls package

This commit is contained in:
tomasklim
2022-09-22 12:28:34 +02:00
committed by Tomáš Klíma
parent a55e4c48db
commit 23f18da2fb
9 changed files with 10 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
import { TOR_URLS } from '@suite-constants/tor';
import { TOR_URLS } from '@trezor/urls';
export const onionDomain = TOR_URLS['trezor.io'];

View File

@@ -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';

View File

@@ -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');

View File

@@ -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}

View File

@@ -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 };

View File

@@ -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', () => {

View File

@@ -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';
/**

View File

@@ -1,2 +1,3 @@
export * from './urls';
export * from './github';
export * from './tor';