diff --git a/brand_package/217702091_109784148054687_3294154348409583196_n.png b/brand_package/217702091_109784148054687_3294154348409583196_n.png deleted file mode 100644 index 24e161f3..00000000 Binary files a/brand_package/217702091_109784148054687_3294154348409583196_n.png and /dev/null differ diff --git a/brand_package/Insta3.png b/brand_package/Insta3.png deleted file mode 100644 index f43c82e2..00000000 Binary files a/brand_package/Insta3.png and /dev/null differ diff --git a/brand_package/README.md b/brand_package/README.md deleted file mode 100644 index 6e0574d0..00000000 --- a/brand_package/README.md +++ /dev/null @@ -1,68 +0,0 @@ -
- -
- -# Tokel brand assets - - -## Logo - -Tokel logo represent universe. Tokel is a platform which will allow creation of tokens and nfts, which many projects will benefit from. Tokel is a space for all these projects to live and flourish in. - - - - - -### Tokel Text Logo on Dark - - - -#### SVG -[Tokel](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel-text.svg) - -#### PNG -[Tokel](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel-text.png) - -[Tokel x2](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel-textx2.png) - -[Tokel x3](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel-textx3.png) - -### Tokel Text Logo on White - - - -#### SVG -[Tokel](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel-black-text.svg) - -#### PNG -[Tokel](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel-black-text.png) - -[Tokel x2](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel-black-textx2.png) - -[Tokel x3](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel-black-textx3.png) - -### Tokel Logo For Dark backgrounds - - -#### SVG -[Tokel](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel.svg) - -#### PNG -[Tokel](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokel.png) - -[Tokel x2](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokelx2.png) - -[Tokel x3](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokelx3.png) - -### Tokel Logo For Light backgrounds - - -#### SVG -[Tokel](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokelBlack.svg) - -#### PNG -[Tokel](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokelBlack.png) - -[Tokel x2](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokelBlackx2.png) - -[Tokel x3](https://github.com/TokelPlatform/tokel_app/raw/development/brand_package/assets/tokelBlackx3.png) diff --git a/brand_package/Random/AMA-bg.png b/brand_package/Random/AMA-bg.png deleted file mode 100644 index babc97f7..00000000 Binary files a/brand_package/Random/AMA-bg.png and /dev/null differ diff --git a/brand_package/Random/AtomicDEX_IDO.png b/brand_package/Random/AtomicDEX_IDO.png deleted file mode 100644 index b39c87d3..00000000 Binary files a/brand_package/Random/AtomicDEX_IDO.png and /dev/null differ diff --git a/brand_package/Random/Early_Adopter.png b/brand_package/Random/Early_Adopter.png deleted file mode 100644 index 5460a3fc..00000000 Binary files a/brand_package/Random/Early_Adopter.png and /dev/null differ diff --git a/brand_package/Random/HowToCreateAToken.png b/brand_package/Random/HowToCreateAToken.png deleted file mode 100644 index d8e9e033..00000000 Binary files a/brand_package/Random/HowToCreateAToken.png and /dev/null differ diff --git a/brand_package/Random/TKLInterview.png b/brand_package/Random/TKLInterview.png deleted file mode 100644 index ef04fa57..00000000 Binary files a/brand_package/Random/TKLInterview.png and /dev/null differ diff --git a/brand_package/Random/TKL_Airdrop.png b/brand_package/Random/TKL_Airdrop.png deleted file mode 100644 index 02ceb4be..00000000 Binary files a/brand_package/Random/TKL_Airdrop.png and /dev/null differ diff --git a/brand_package/Random/Tokel Coin Emission 10 years.png b/brand_package/Random/Tokel Coin Emission 10 years.png deleted file mode 100644 index 86531ce0..00000000 Binary files a/brand_package/Random/Tokel Coin Emission 10 years.png and /dev/null differ diff --git a/brand_package/Random/Tokel Coin Emission 10 years.svg b/brand_package/Random/Tokel Coin Emission 10 years.svg deleted file mode 100644 index 47ba206f..00000000 --- a/brand_package/Random/Tokel Coin Emission 10 years.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/brand_package/Random/Tokel Coin Emission 25 Years.png b/brand_package/Random/Tokel Coin Emission 25 Years.png deleted file mode 100644 index 97fde2cb..00000000 Binary files a/brand_package/Random/Tokel Coin Emission 25 Years.png and /dev/null differ diff --git a/brand_package/Random/Tokel Coin Emission 25 Years.svg b/brand_package/Random/Tokel Coin Emission 25 Years.svg deleted file mode 100644 index b01282ac..00000000 --- a/brand_package/Random/Tokel Coin Emission 25 Years.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/brand_package/Random/Tokel Coin Emission 50 Years.png b/brand_package/Random/Tokel Coin Emission 50 Years.png deleted file mode 100644 index 7b920b0a..00000000 Binary files a/brand_package/Random/Tokel Coin Emission 50 Years.png and /dev/null differ diff --git a/brand_package/Random/Tokel Coin Emission 50 Years.svg b/brand_package/Random/Tokel Coin Emission 50 Years.svg deleted file mode 100644 index f2639270..00000000 --- a/brand_package/Random/Tokel Coin Emission 50 Years.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/brand_package/Random/Tokel_Phase3.png b/brand_package/Random/Tokel_Phase3.png deleted file mode 100644 index 89da26ba..00000000 Binary files a/brand_package/Random/Tokel_Phase3.png and /dev/null differ diff --git a/brand_package/Random/livestream.png b/brand_package/Random/livestream.png deleted file mode 100644 index 315be3bf..00000000 Binary files a/brand_package/Random/livestream.png and /dev/null differ diff --git a/brand_package/TOKEL-ICON.png b/brand_package/TOKEL-ICON.png deleted file mode 100644 index d8ad8fa9..00000000 Binary files a/brand_package/TOKEL-ICON.png and /dev/null differ diff --git a/brand_package/Tokel_Facebook-header.png b/brand_package/Tokel_Facebook-header.png deleted file mode 100644 index 869a20c4..00000000 Binary files a/brand_package/Tokel_Facebook-header.png and /dev/null differ diff --git a/brand_package/Tokel_Youtube_banner2.png b/brand_package/Tokel_Youtube_banner2.png deleted file mode 100644 index b9d4356f..00000000 Binary files a/brand_package/Tokel_Youtube_banner2.png and /dev/null differ diff --git a/brand_package/assets/TokelIcon2021.svg b/brand_package/assets/TokelIcon2021.svg deleted file mode 100644 index 696fc965..00000000 --- a/brand_package/assets/TokelIcon2021.svg +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/brand_package/assets/TokelIconDark2021.svg b/brand_package/assets/TokelIconDark2021.svg deleted file mode 100644 index 64951fa3..00000000 --- a/brand_package/assets/TokelIconDark2021.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/brand_package/assets/TokelTextDark2021.svg b/brand_package/assets/TokelTextDark2021.svg deleted file mode 100644 index 6123d785..00000000 --- a/brand_package/assets/TokelTextDark2021.svg +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/brand_package/assets/TokelTextLight2021.svg b/brand_package/assets/TokelTextLight2021.svg deleted file mode 100644 index 0becb831..00000000 --- a/brand_package/assets/TokelTextLight2021.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/brand_package/assets/TokelTextOnDark.png b/brand_package/assets/TokelTextOnDark.png deleted file mode 100644 index 265fe3c8..00000000 Binary files a/brand_package/assets/TokelTextOnDark.png and /dev/null differ diff --git a/brand_package/assets/TokelTextOnWhite.png b/brand_package/assets/TokelTextOnWhite.png deleted file mode 100644 index 385e1db2..00000000 Binary files a/brand_package/assets/TokelTextOnWhite.png and /dev/null differ diff --git a/brand_package/assets/buy-on-tokel.png b/brand_package/assets/buy-on-tokel.png deleted file mode 100644 index 12888a61..00000000 Binary files a/brand_package/assets/buy-on-tokel.png and /dev/null differ diff --git a/brand_package/assets/colors.png b/brand_package/assets/colors.png deleted file mode 100644 index b54ed5ab..00000000 Binary files a/brand_package/assets/colors.png and /dev/null differ diff --git a/brand_package/assets/create-on-tokel.png b/brand_package/assets/create-on-tokel.png deleted file mode 100644 index 7d8e7d91..00000000 Binary files a/brand_package/assets/create-on-tokel.png and /dev/null differ diff --git a/brand_package/assets/sell-on-tokel.png b/brand_package/assets/sell-on-tokel.png deleted file mode 100644 index 1155d12b..00000000 Binary files a/brand_package/assets/sell-on-tokel.png and /dev/null differ diff --git a/brand_package/assets/tokel-black-text.png b/brand_package/assets/tokel-black-text.png deleted file mode 100644 index 07aea870..00000000 Binary files a/brand_package/assets/tokel-black-text.png and /dev/null differ diff --git a/brand_package/assets/tokel-black-text.svg b/brand_package/assets/tokel-black-text.svg deleted file mode 100644 index f1c6aad2..00000000 --- a/brand_package/assets/tokel-black-text.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/brand_package/assets/tokel-black-textx2.png b/brand_package/assets/tokel-black-textx2.png deleted file mode 100644 index 81bf7f5b..00000000 Binary files a/brand_package/assets/tokel-black-textx2.png and /dev/null differ diff --git a/brand_package/assets/tokel-black-textx3.png b/brand_package/assets/tokel-black-textx3.png deleted file mode 100644 index a85af749..00000000 Binary files a/brand_package/assets/tokel-black-textx3.png and /dev/null differ diff --git a/brand_package/assets/tokel-text.png b/brand_package/assets/tokel-text.png deleted file mode 100644 index 70e9187e..00000000 Binary files a/brand_package/assets/tokel-text.png and /dev/null differ diff --git a/brand_package/assets/tokel-text.svg b/brand_package/assets/tokel-text.svg deleted file mode 100644 index 804ad0ef..00000000 --- a/brand_package/assets/tokel-text.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/brand_package/assets/tokel-textx2.png b/brand_package/assets/tokel-textx2.png deleted file mode 100644 index ffc354c0..00000000 Binary files a/brand_package/assets/tokel-textx2.png and /dev/null differ diff --git a/brand_package/assets/tokel-textx3.png b/brand_package/assets/tokel-textx3.png deleted file mode 100644 index 75a4a065..00000000 Binary files a/brand_package/assets/tokel-textx3.png and /dev/null differ diff --git a/brand_package/assets/tokel.png b/brand_package/assets/tokel.png deleted file mode 100644 index 2abf3790..00000000 Binary files a/brand_package/assets/tokel.png and /dev/null differ diff --git a/brand_package/assets/tokel.svg b/brand_package/assets/tokel.svg deleted file mode 100644 index 538a11fd..00000000 --- a/brand_package/assets/tokel.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/brand_package/assets/tokelBlack.png b/brand_package/assets/tokelBlack.png deleted file mode 100644 index 10368307..00000000 Binary files a/brand_package/assets/tokelBlack.png and /dev/null differ diff --git a/brand_package/assets/tokelBlack.svg b/brand_package/assets/tokelBlack.svg deleted file mode 100644 index e4ab6f18..00000000 --- a/brand_package/assets/tokelBlack.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/brand_package/assets/tokelBlackx2.png b/brand_package/assets/tokelBlackx2.png deleted file mode 100644 index 311acf75..00000000 Binary files a/brand_package/assets/tokelBlackx2.png and /dev/null differ diff --git a/brand_package/assets/tokelBlackx3.png b/brand_package/assets/tokelBlackx3.png deleted file mode 100644 index ca5fa156..00000000 Binary files a/brand_package/assets/tokelBlackx3.png and /dev/null differ diff --git a/brand_package/assets/tokelx2.png b/brand_package/assets/tokelx2.png deleted file mode 100644 index fb3fab83..00000000 Binary files a/brand_package/assets/tokelx2.png and /dev/null differ diff --git a/brand_package/assets/tokelx3.png b/brand_package/assets/tokelx3.png deleted file mode 100644 index 09957704..00000000 Binary files a/brand_package/assets/tokelx3.png and /dev/null differ diff --git a/brand_package/assets/tokens-on-tokel.png b/brand_package/assets/tokens-on-tokel.png deleted file mode 100644 index 8bf08cf3..00000000 Binary files a/brand_package/assets/tokens-on-tokel.png and /dev/null differ diff --git a/brand_package/assets/trade-on-tokel.png b/brand_package/assets/trade-on-tokel.png deleted file mode 100644 index ae784f7e..00000000 Binary files a/brand_package/assets/trade-on-tokel.png and /dev/null differ diff --git a/src/components/Dashboard/widgets/TokenDetailWidget.tsx b/src/components/Dashboard/widgets/TokenDetailWidget.tsx index c51cd3db..72d16720 100644 --- a/src/components/Dashboard/widgets/TokenDetailWidget.tsx +++ b/src/components/Dashboard/widgets/TokenDetailWidget.tsx @@ -1,17 +1,24 @@ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; import styled from '@emotion/styled'; import { upperFirst } from 'lodash-es'; +import linkIcon from 'assets/link.svg'; import { selectCurrentTokenDetail } from 'store/selectors'; -import { Responsive, limitLength } from 'util/helpers'; +import { Responsive, extractIPFSHash, limitLength } from 'util/helpers'; import { V } from 'util/theming'; -import { RESERVED_TOKEL_ARBITRARY_KEYS } from 'vars/defines'; - -import { Columns, Column } from 'components/_General/Grid'; +import { + Colors, + DEFAULT_IPFS_FALLBACK_GATEWAY, + EXTRACT_IPFS_HASH_REGEX, + RESERVED_TOKEL_ARBITRARY_KEYS, +} from 'vars/defines'; + +import { Button } from 'components/_General/buttons'; import CopyToClipboard from 'components/_General/CopyToClipboard'; import ExplorerLink from 'components/_General/ExplorerLink'; +import { Column, Columns } from 'components/_General/Grid'; import TokenMediaDisplay from 'components/_General/TokenMediaDisplay'; import { VSpaceSmall, WidgetContainer } from './common'; @@ -87,6 +94,10 @@ const ContentLink = styled.a` color: ${V.color.front}; `; +const OpenInGatewayButton = styled(Button)` + margin-top: 1rem; +`; + type MetadataItemProps = { name: string; value: unknown; @@ -109,10 +120,23 @@ const TokenDetail: React.FC = () => { const arbitraryJson = tokenDetail.dataAsJson?.arbitraryAsJson; + const tokenUrl = tokenDetail.dataAsJson?.url; + const [tokenGatewayUrl, setTokenGatewayUrl] = useState(null); + const hasNumberInCollection = arbitraryJson?.number_in_collection || arbitraryJson?.number_in_constellation; const hasCollectionName = arbitraryJson?.collection_name || arbitraryJson?.constellation_name; + useEffect(() => { + const ipfsId = extractIPFSHash(tokenUrl); + + if (ipfsId) { + setTokenGatewayUrl(`${DEFAULT_IPFS_FALLBACK_GATEWAY}/${ipfsId}`); + } else { + setTokenGatewayUrl(tokenUrl); + } + }, [tokenUrl]); + return (
@@ -124,14 +148,25 @@ const TokenDetail: React.FC = () => { {tokenDetail.description} - {tokenDetail.dataAsJson?.url && ( - - {tokenDetail.dataAsJson?.url} - + {tokenUrl && ( + <> + + {tokenUrl} + + {tokenUrl.match(EXTRACT_IPFS_HASH_REGEX) && ( + + + Open in gateway + open-in-explorer + + + )} + )} @@ -172,7 +207,7 @@ const TokenDetail: React.FC = () => { - + diff --git a/src/electron/package.json b/src/electron/package.json index 79bfc1d8..3b752049 100644 --- a/src/electron/package.json +++ b/src/electron/package.json @@ -1,7 +1,7 @@ { "name": "tokel_app", "productName": "tokelPlatform", - "version": "1.3.0", + "version": "1.3.1", "description": "Komodo ecosystem’s Token Platform", "main": "./main.js", "author": { diff --git a/src/util/validators/useMarketOrderSchema.ts b/src/util/validators/useMarketOrderSchema.ts index d735cadb..33fb9f0e 100644 --- a/src/util/validators/useMarketOrderSchema.ts +++ b/src/util/validators/useMarketOrderSchema.ts @@ -72,7 +72,9 @@ const useFulfillOrderSchema = (type: 'fill' | 'ask' | 'bid') => { ) .required('price is required') .test('needs-funds', `not enough ${TICKER}`, (value, context) => - (type === 'fill' || type === 'bid') && context.parent.quantity > 0 + ((type === 'fill' && orderDetails[context.parent.orderId]?.type === 'ask') || + type === 'bid') && + context.parent.quantity > 0 ? parseFloat(value) <= (balance - FEE) / context.parent.quantity : true ),