Skip to content

Commit

Permalink
Revert " [ENG-5340] Export necessary functionality from the extension…
Browse files Browse the repository at this point in the history
… to core"
  • Loading branch information
christos-xverse authored Oct 2, 2024
1 parent 177236c commit 2f003c6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@react-spring/web": "^9.6.1",
"@sats-connect/core": "0.3.0-7e6dd81",
"@scure/btc-signer": "1.2.1",
"@secretkeylabs/xverse-core": "23.0.1",
"@secretkeylabs/xverse-core": "21.1.0-f744550",
"@stacks/connect": "7.4.1",
"@stacks/stacks-blockchain-api-types": "6.1.1",
"@stacks/transactions": "6.16.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import CheckCircle from '@assets/img/listings/CheckCircle.svg';
import XCircle from '@assets/img/listings/XCircle.svg';
import TokenImage from '@components/tokenImage';
import { ArrowUpRight } from '@phosphor-icons/react';
import {
marketplaceRuneDashboardUrl,
type FungibleToken,
type ListingProvider,
} from '@secretkeylabs/xverse-core';
import type { FungibleToken, ListingProvider, Marketplace } from '@secretkeylabs/xverse-core';
import { StyledP } from '@ui-library/common.styled';
import { MAGIC_EDEN_RUNES_URL, OKX_RUNES_URL, UNISAT_RUNES_URL } from '@utils/constants';
import { formatNumber } from '@utils/helper';
import { useTranslation } from 'react-i18next';
import styled from 'styled-components';
Expand Down Expand Up @@ -59,13 +56,14 @@ function MarketplaceRuneListingResult({ minPriceSats, marketplace, rune, success
const { t } = useTranslation('translation', { keyPrefix: 'LIST_RUNE_SCREEN' });
const floorPrice = formatNumber(minPriceSats);

const marketplaceToUrl: { [key in Marketplace]: string } = {
'Magic Eden': `${MAGIC_EDEN_RUNES_URL}/${rune.name}`,
Unisat: `${UNISAT_RUNES_URL}/market?tick=${rune.name}`,
OKX: `${OKX_RUNES_URL}/token/${rune.name}/${rune.ticker}`,
};

const handleClick = () =>
successful &&
window.open(
marketplaceRuneDashboardUrl(rune, marketplace.name),
'_blank',
'noopener,noreferrer',
);
successful && window.open(marketplaceToUrl[marketplace.name], '_blank', 'noopener,noreferrer');

return (
<Container
Expand Down
2 changes: 2 additions & 0 deletions src/app/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export const MIX_PANEL_TOKEN = process.env.MIX_PANEL_TOKEN;
export const MIX_PANEL_EXPLORE_APP_TOKEN = process.env.MIX_PANEL_EXPLORE_APP_TOKEN;

export const MAGIC_EDEN_RUNES_URL = 'https://magiceden.io/runes';
export const UNISAT_RUNES_URL = 'https://unisat.io/runes';
export const OKX_RUNES_URL = 'https://www.okx.com/web3/marketplace/runes';

export type CurrencyTypes = 'STX' | 'BTC' | 'FT' | 'NFT' | 'Ordinal' | 'brc20-Ordinal' | 'RareSat';
export enum LoaderSize {
Expand Down

0 comments on commit 2f003c6

Please sign in to comment.