Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NEXT_PUBLIC_META_ICON=https://cdn.facings.io/FACINGS_Logo_mask_negative.png
NEXT_PUBLIC_APP_URL=https://creator.facings.io

NEXT_PUBLIC_CHAIN_KEY_DEFAULT=eos
NEXT_PUBLIC_REQUEST_ACCOUNT=taskly

#IPFS
NEXT_PUBLIC_IPFS_ENDPOINT=https://facings.mypinata.cloud/ipfs
Expand Down Expand Up @@ -37,3 +38,17 @@ NEXT_PUBLIC_EOS_JUNGLE4_CHAIN_ID=73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146
NEXT_PUBLIC_EOS_JUNGLE4_PROTOCOL=https
NEXT_PUBLIC_EOS_JUNGLE4_HOST=jungle4.cryptolions.io
NEXT_PUBLIC_EOS_JUNGLE4_PORT=443

#Proton CHAIN
NEXT_PUBLIC_PROTON_MAINNET_AA_ENDPOINT=https://proton.api.atomicassets.io
NEXT_PUBLIC_PROTON_MAINNET_CHAIN_ID=384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0
NEXT_PUBLIC_PROTON_MAINNET_PROTOCOL=https
NEXT_PUBLIC_PROTON_MAINNET_HOST=metal-proton-rpc.global.binfra.one
NEXT_PUBLIC_PROTON_MAINNET_PORT=443

#PROTON TESTNET CHAIN
NEXT_PUBLIC_PROTON_TESTNET_AA_ENDPOINT=https://test.proton.api.atomicassets.io
NEXT_PUBLIC_PROTON_TESTNET_CHAIN_ID=71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd
NEXT_PUBLIC_PROTON_TESTNET_PROTOCOL=https
NEXT_PUBLIC_PROTON_TESTNET_HOST=metal-protontest-rpc.global.binfra.one
NEXT_PUBLIC_PROTON_TESTNET_PORT=443
2 changes: 2 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ const nextConfig = {
distDir: '.next',
images: {
domains: [
'proton.bloks.io',
'wax.bloks.io',
'bloks.io',
'facings.mypinata.cloud',
'robohash.org',
'ipfs.ledgerwise.io',
'proton.mypinata.cloud',
],
},
};
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"@headlessui/react": "^1.7.4",
"@headlessui/tailwindcss": "^0.1.1",
"@hookform/resolvers": "^2.9.10",
"@proton/ual-webauth": "^0.1.18",
"@types/react-beautiful-dnd": "^13.1.3",
"@waxio/waxjs": "^1.1.0",
"axios": "^1.1.3",
"eosjs": "^22.1.0",
"framer-motion": "^9.0.3",
"is-ipfs": "^7.0.3",
"next": "13.0.3",
"next": "13.2.3",
"phosphor-react": "^1.4.1",
"react": "18.2.0",
"react-beautiful-dnd": "^13.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/TopAppBar/components/Chain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { withUAL } from 'ual-reactjs-renderer';
import { Menu } from '@headlessui/react';
import { CaretDown } from 'phosphor-react';

import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';

import { ChainLink } from './ChainLink';

Expand Down
2 changes: 1 addition & 1 deletion src/components/TopAppBar/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CaretDown } from 'phosphor-react';
import { getAccount } from '@services/account/getAccount';
import { getChainKeyByChainId } from '@utils/getChainKeyByChainId';

import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';

interface LoginComponentProps {
chainKey: string;
Expand Down
16 changes: 14 additions & 2 deletions src/components/collection/CollectionAssetsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ export function CollectionAssetsList({
id={asset.template && asset.template.template_id}
href={`/${chainKey}/collection/${collectionName}/asset/${asset.asset_id}`}
image={
asset.data.img ? `${ipfsEndpoint}/${asset.data.img}` : ''
asset.data.img
? `${ipfsEndpoint}/${asset.data.img}`
: asset.data.image
? `${ipfsEndpoint}/${asset.data.image}`
: asset.data.glbthumb
? `${ipfsEndpoint}/${asset.data.glbthumb}`
: ''
}
video={
asset.data.video
Expand Down Expand Up @@ -159,7 +165,13 @@ export function CollectionAssetsList({
id={asset.template && asset.template.template_id}
href={`/${chainKey}/collection/${collectionName}/asset/${asset.asset_id}`}
image={
asset.data.img ? `${ipfsEndpoint}/${asset.data.img}` : ''
asset.data.img
? `${ipfsEndpoint}/${asset.data.img}`
: asset.data.image
? `${ipfsEndpoint}/${asset.data.image}`
: asset.data.glbthumb
? `${ipfsEndpoint}/${asset.data.glbthumb}`
: ''
}
video={
asset.data.video
Expand Down
10 changes: 8 additions & 2 deletions src/components/collection/CollectionTemplatesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,14 @@ export function CollectionTemplatesList({
id={template.template_id}
href={`/${chainKey}/collection/${collectionName}/template/${template.template_id}`}
image={
template.immutable_data.img
? `${ipfsEndpoint}/${template.immutable_data.img}`
template.immutable_data.img ||
template.immutable_data.image ||
template.immutable_data.glbthumb
? `${ipfsEndpoint}/${
template.immutable_data.img ||
template.immutable_data.image ||
template.immutable_data.glbthumb
}`
: ''
}
video={
Expand Down
26 changes: 22 additions & 4 deletions src/configs/chainsConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Anchor } from 'ual-anchor';
import { Wax } from '@eosdacio/ual-wax';
import { WebAuth } from '@proton/ual-webauth';

module.exports = {
export default {
eos: {
name: 'EOS',
imageUrl: 'https://bloks.io/img/chains/eos.png',
Expand All @@ -12,7 +13,6 @@ module.exports = {
host: process.env.NEXT_PUBLIC_EOS_MAINNET_HOST,
port: process.env.NEXT_PUBLIC_EOS_MAINNET_PORT,
},

wax: {
name: 'WAX',
imageUrl: 'https://wax.bloks.io/img/chains/wax.png',
Expand All @@ -23,7 +23,6 @@ module.exports = {
host: process.env.NEXT_PUBLIC_WAX_MAINNET_HOST,
port: process.env.NEXT_PUBLIC_WAX_MAINNET_PORT,
},

'wax-test': {
name: 'WAX (Testnet)',
imageUrl: 'https://wax.bloks.io/img/chains/wax.png',
Expand All @@ -34,7 +33,6 @@ module.exports = {
host: process.env.NEXT_PUBLIC_WAX_TESTNET_HOST,
port: process.env.NEXT_PUBLIC_WAX_TESTNET_PORT,
},

jungle4: {
name: 'Jungle4 (EOS Testnet)',
imageUrl: 'https://bloks.io/img/chains/jungle.png',
Expand All @@ -45,4 +43,24 @@ module.exports = {
host: process.env.NEXT_PUBLIC_EOS_JUNGLE4_HOST,
port: process.env.NEXT_PUBLIC_EOS_JUNGLE4_PORT,
},
proton: {
name: 'Proton',
imageUrl: 'https://proton.bloks.io/img/chains/proton.png',
authenticators: [WebAuth, Anchor],
aaEndpoint: process.env.NEXT_PUBLIC_PROTON_MAINNET_AA_ENDPOINT,
chainId: process.env.NEXT_PUBLIC_PROTON_MAINNET_CHAIN_ID,
protocol: process.env.NEXT_PUBLIC_PROTON_MAINNET_PROTOCOL,
host: process.env.NEXT_PUBLIC_PROTON_MAINNET_HOST,
port: process.env.NEXT_PUBLIC_PROTON_MAINNET_PORT,
},
'proton-test': {
name: 'Proton (Testnet)',
imageUrl: 'https://proton.bloks.io/img/chains/proton.png',
authenticators: [WebAuth, Anchor],
aaEndpoint: process.env.NEXT_PUBLIC_PROTON_TESTNET_AA_ENDPOINT,
chainId: process.env.NEXT_PUBLIC_PROTON_TESTNET_CHAIN_ID,
protocol: process.env.NEXT_PUBLIC_PROTON_TESTNET_PROTOCOL,
host: process.env.NEXT_PUBLIC_PROTON_TESTNET_HOST,
port: process.env.NEXT_PUBLIC_PROTON_TESTNET_PORT,
}
};
2 changes: 2 additions & 0 deletions src/configs/globalsConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ export const appDescription = process.env.NEXT_PUBLIC_APP_DESCRIPTION;
export const chainKeyDefault = process.env.NEXT_PUBLIC_CHAIN_KEY_DEFAULT;
export const metaIcon = process.env.NEXT_PUBLIC_META_ICON;
export const appUrl = process.env.NEXT_PUBLIC_APP_URL;
export const requestAccount = process.env.NEXT_PUBLIC_REQUEST_ACCOUNT;

10 changes: 8 additions & 2 deletions src/libs/authenticators.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { appName } from '@configs/globalsConfig';
import * as chainsConfig from '@configs/chainsConfig';
import { appName, requestAccount } from '@configs/globalsConfig';
import chainsConfig from '@configs/chainsConfig';
import { blockchains } from '@utils/blockchains';

export const authenticators = Object.keys(chainsConfig).reduce(
Expand All @@ -16,6 +16,12 @@ export const authenticators = Object.keys(chainsConfig).reduce(
new Authenticator([blockchain], {
appName,
disableGreymassFuel: true,
transportOptions: {
requestAccount
},
selectorOptions: {
appName
}
})
),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ interface TemplateViewProps {
collection: CollectionProps;
}

<<<<<<< HEAD
function Template({
ual,
chainKey,
Expand All @@ -52,6 +53,14 @@ function Template({
schemas,
templates,
}: TemplateViewProps) {
=======
function Template({ ual, chainKey, template }: TemplateViewProps) {
const image =
template.immutable_data.img ||
template.immutable_data.image ||
template.immutable_data.glbthumb;
const video = template.immutable_data.video;
>>>>>>> db625b6 (fix missing thumbnails on collection list, transfer pages)
const collection = template.collection;
const [images, setImages] = useState([]);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/[chainKey]/explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CollectionItemsList } from '@components/collection/CollectionItemsList'

import { listCollectionsService } from '@services/collection/listCollectionsService';

import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { appName } from '@configs/globalsConfig';

import { CollectionProps } from '@services/collection/listCollectionsService';
Expand Down
10 changes: 5 additions & 5 deletions src/pages/[chainKey]/transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { CardContainer } from '@components/CardContainer';
import { SeeMoreButton } from '@components/SeeMoreButton';
import { Header } from '@components/Header';

import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { ipfsEndpoint, chainKeyDefault, appName } from '@configs/globalsConfig';

import { transferAssetService } from '@services/asset/transferAssetService';
Expand Down Expand Up @@ -355,8 +355,8 @@ function Transfer({ ual }) {
id={asset.template_mint}
onClick={() => handleAssetSelection(asset)}
image={
asset.data['img']
? `${ipfsEndpoint}/${asset.data['img']}`
asset.data['img'] || asset.data['image']
? `${ipfsEndpoint}/${asset.data['img'] || asset.data['image']}`
: ''
}
video={
Expand Down Expand Up @@ -444,8 +444,8 @@ function Transfer({ ual }) {
id={asset.template_mint}
onClick={() => handleAssetSelection(asset)}
image={
asset.data.img
? `${ipfsEndpoint}/${asset.data.img}`
asset.data.image
? `${ipfsEndpoint}/${asset.data.image}`
: ''
}
video={
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { authenticators } from '@libs/authenticators';
import { blockchains } from '@utils/blockchains';
import '@utils/yupMethods';

import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';

import '@styles/globals.css';

Expand Down
2 changes: 1 addition & 1 deletion src/services/account/getAccount.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { JsonRpc } from 'eosjs';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';

interface AccountNameProps {
accountName: string;
Expand Down
2 changes: 1 addition & 1 deletion src/services/account/getAccountStatsService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface AccountStatsProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/asset/getAssetService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface AssetProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/collection/collectionAccountsService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface AccountProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/collection/collectionAssetsService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface AssetProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/collection/collectionSchemasService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface SchemaProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/collection/collectionStatsService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface StatsProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/collection/collectionTemplatesService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface TemplateProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/collection/getCollectionService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface CollectionProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/collection/listCollectionsService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

interface OptionsProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/inventory/getInventoryService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface AssetProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/schema/getSchemaService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface SchemaProps {
Expand Down
2 changes: 1 addition & 1 deletion src/services/template/getTemplateService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@libs/api';
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';
import { AxiosResponse } from 'axios';

export interface TemplateProps {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/blockchains.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as chains from '@configs/chainsConfig';
import chains from '@configs/chainsConfig';

interface BlockchainsProps {
chainId: string;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getChainKeyByChainId.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';

export function getChainKeyByChainId(chainId: string) {
const chainsKeys = Object.keys(chainsConfig);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/isValidChainKey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as chainsConfig from '@configs/chainsConfig';
import chainsConfig from '@configs/chainsConfig';

export function isValidChainKey(chainKey: string) {
const chainsKeys = Object.keys(chainsConfig);
Expand Down
Loading