diff --git a/js/packages/web/src/actions/addTokensToVault.ts b/js/packages/web/src/actions/addTokensToVault.ts index 1b63fff..3dc0300 100644 --- a/js/packages/web/src/actions/addTokensToVault.ts +++ b/js/packages/web/src/actions/addTokensToVault.ts @@ -103,7 +103,7 @@ export async function addTokensToVault( } } - if (instructions[instructions.length - 1] != currInstructions) { + if (instructions[instructions.length - 1] !== currInstructions) { signers.push(currSigners); instructions.push(currInstructions); } diff --git a/js/packages/web/src/actions/cancelBid.ts b/js/packages/web/src/actions/cancelBid.ts index f438a83..74894f6 100644 --- a/js/packages/web/src/actions/cancelBid.ts +++ b/js/packages/web/src/actions/cancelBid.ts @@ -29,7 +29,7 @@ export async function sendCancelBid( let instructions: Array = []; if ( auctionView.auction.info.ended() && - auctionView.auction.info.state != AuctionState.Ended + auctionView.auction.info.state !== AuctionState.Ended ) { await setupPlaceBid( connection, diff --git a/js/packages/web/src/actions/createAuctionManager.ts b/js/packages/web/src/actions/createAuctionManager.ts index 555c3c3..b5852f9 100644 --- a/js/packages/web/src/actions/createAuctionManager.ts +++ b/js/packages/web/src/actions/createAuctionManager.ts @@ -308,7 +308,7 @@ export async function createAuctionManager( instructions = instructions.slice(stopPoint, instructions.length); filteredSigners = filteredSigners.slice(stopPoint, filteredSigners.length); - if (instructions.length == lastInstructionsLength) tries = tries + 1; + if (instructions.length === lastInstructionsLength) tries = tries + 1; else tries = 0; try { diff --git a/js/packages/web/src/actions/createReservationListsForTokens.ts b/js/packages/web/src/actions/createReservationListsForTokens.ts index 16dba62..1f93518 100644 --- a/js/packages/web/src/actions/createReservationListsForTokens.ts +++ b/js/packages/web/src/actions/createReservationListsForTokens.ts @@ -52,7 +52,7 @@ export async function createReservationListForTokens( batchCounter++; } - if (instructions[instructions.length - 1] != currInstructions) { + if (instructions[instructions.length - 1] !== currInstructions) { signers.push(currSigners); instructions.push(currInstructions); } diff --git a/js/packages/web/src/actions/populatePrintingTokens.ts b/js/packages/web/src/actions/populatePrintingTokens.ts index 480a51f..51820c0 100644 --- a/js/packages/web/src/actions/populatePrintingTokens.ts +++ b/js/packages/web/src/actions/populatePrintingTokens.ts @@ -102,7 +102,7 @@ export async function populatePrintingTokens( } } - if (instructions[instructions.length - 1] != currInstructions) { + if (instructions[instructions.length - 1] !== currInstructions) { signers.push(currSigners); instructions.push(currInstructions); } diff --git a/js/packages/web/src/actions/sendRedeemBid.ts b/js/packages/web/src/actions/sendRedeemBid.ts index ae15ae0..3ec5dc7 100644 --- a/js/packages/web/src/actions/sendRedeemBid.ts +++ b/js/packages/web/src/actions/sendRedeemBid.ts @@ -69,7 +69,7 @@ export async function sendRedeemBid( if ( auctionView.auction.info.ended() && - auctionView.auction.info.state != AuctionState.Ended + auctionView.auction.info.state !== AuctionState.Ended ) { await setupPlaceBid( connection, @@ -112,7 +112,7 @@ export async function sendRedeemBid( const winningConfigItem = winningConfig.items[j]; if ( - winningConfigItem.safetyDepositBoxIndex == safetyDeposit.info.order + winningConfigItem.safetyDepositBoxIndex === safetyDeposit.info.order ) { const stateItem = auctionView.auctionManager.info.state.winningConfigStates[ @@ -232,7 +232,7 @@ export async function sendRedeemBid( instructions = instructions.slice(stopPoint, instructions.length); filteredSigners = filteredSigners.slice(stopPoint, filteredSigners.length); - if (instructions.length == lastInstructionsLength) tries = tries + 1; + if (instructions.length === lastInstructionsLength) tries = tries + 1; else tries = 0; try { @@ -575,8 +575,8 @@ async function setupRedeemParticipationInstructions( ); if ( - participationBalance.value.uiAmount == 0 && - tokenBalance.value.uiAmount == 1 + participationBalance.value.uiAmount === 0 && + tokenBalance.value.uiAmount === 1 ) { // I'm the first, I need to populate for the others with a crank turn. let fillParticipationStashSigners: Keypair[] = []; @@ -694,7 +694,7 @@ async function setupRedeemParticipationInstructions( } } - if (newTokenAccount && newTokenBalance == 1) { + if (newTokenAccount && newTokenBalance === 1) { await redeemPrintingToken( wallet, updateAuth, diff --git a/js/packages/web/src/actions/settle.ts b/js/packages/web/src/actions/settle.ts index f69266c..513d15c 100644 --- a/js/packages/web/src/actions/settle.ts +++ b/js/packages/web/src/actions/settle.ts @@ -117,11 +117,11 @@ async function emptyPaymentAccountForAllTokens( auctionView.auction.pubkey, wallet.publicKey, addresses[k], - item == auctionView.participationItem ? null : i, - item == auctionView.participationItem ? null : j, + item === auctionView.participationItem ? null : i, + item === auctionView.participationItem ? null : j, creatorIndex === -1 || creatorIndex === null || - (edgeCaseWhereCreatorIsAuctioneer && k == addresses.length - 1) + (edgeCaseWhereCreatorIsAuctioneer && k === addresses.length - 1) ? null : creatorIndex, settleInstructions, @@ -134,7 +134,7 @@ async function emptyPaymentAccountForAllTokens( settleInstructions = []; } - if (currInstrBatch.length == BATCH_SIZE) { + if (currInstrBatch.length === BATCH_SIZE) { signers.push(currSignerBatch); instructions.push(currInstrBatch); currSignerBatch = []; @@ -213,14 +213,14 @@ async function claimAllBids( claimBidInstructions, ); - if (claimBidInstructions.length == CLAIM_TRANSACTION_SIZE) { + if (claimBidInstructions.length === CLAIM_TRANSACTION_SIZE) { currSignerBatch.push(claimBidSigners); currInstrBatch.push(claimBidInstructions); claimBidSigners = []; claimBidInstructions = []; } - if (currInstrBatch.length == BATCH_SIZE) { + if (currInstrBatch.length === BATCH_SIZE) { signers.push(currSignerBatch); instructions.push(currInstrBatch); currSignerBatch = []; diff --git a/js/packages/web/src/components/AmountLabel/index.tsx b/js/packages/web/src/components/AmountLabel/index.tsx index 7c96be0..ddcef9f 100644 --- a/js/packages/web/src/components/AmountLabel/index.tsx +++ b/js/packages/web/src/components/AmountLabel/index.tsx @@ -5,11 +5,11 @@ import { formatUSD } from '@oyster/common' import './index.less'; interface IAmountLabel { - amount: number | string, - displayUSD?: boolean, - title?: string, - style?: object, - containerStyle?: object, + amount: number | string; + displayUSD?: boolean; + title?: string; + style?: object; + containerStyle?: object; } export const AmountLabel = (props: IAmountLabel) => { diff --git a/js/packages/web/src/components/MeshViewer/utils.js b/js/packages/web/src/components/MeshViewer/utils.js index dd00947..eb13809 100644 --- a/js/packages/web/src/components/MeshViewer/utils.js +++ b/js/packages/web/src/components/MeshViewer/utils.js @@ -15,7 +15,6 @@ import { // Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish // Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move - const TouchableOrbitControls = function (object, domElement) { if (domElement === undefined) console.warn( @@ -574,7 +573,7 @@ const TouchableOrbitControls = function (object, domElement) { } function handleTouchStartRotate(event) { - if (event.touches.length == 1) { + if (event.touches.length === 1) { rotateStart.set(event.touches[0].pageX, event.touches[0].pageY); } else { const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); @@ -585,7 +584,7 @@ const TouchableOrbitControls = function (object, domElement) { } function handleTouchStartPan(event) { - if (event.touches.length == 1) { + if (event.touches.length === 1) { panStart.set(event.touches[0].pageX, event.touches[0].pageY); } else { const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); @@ -617,7 +616,7 @@ const TouchableOrbitControls = function (object, domElement) { } function handleTouchMoveRotate(event) { - if (event.touches.length == 1) { + if (event.touches.length === 1) { rotateEnd.set(event.touches[0].pageX, event.touches[0].pageY); } else { const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); @@ -640,7 +639,7 @@ const TouchableOrbitControls = function (object, domElement) { } function handleTouchMovePan(event) { - if (event.touches.length == 1) { + if (event.touches.length === 1) { panEnd.set(event.touches[0].pageX, event.touches[0].pageY); } else { const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); diff --git a/js/packages/web/src/contexts/meta.tsx b/js/packages/web/src/contexts/meta.tsx index 3dc1fec..e50df9e 100644 --- a/js/packages/web/src/contexts/meta.tsx +++ b/js/packages/web/src/contexts/meta.tsx @@ -697,7 +697,7 @@ const processMetaplexAccounts = async ( whitelistedCreator.address, ); if ( - creatorKeyIfCreatorWasPartOfThisStore.toBase58() == a.pubkey.toBase58() + creatorKeyIfCreatorWasPartOfThisStore.toBase58() === a.pubkey.toBase58() ) { const account = cache.add( a.pubkey, diff --git a/js/packages/web/src/views/artist/index.tsx b/js/packages/web/src/views/artist/index.tsx index 59ea650..76fb21e 100644 --- a/js/packages/web/src/views/artist/index.tsx +++ b/js/packages/web/src/views/artist/index.tsx @@ -1,13 +1,10 @@ +import { Col, Divider, Row } from 'antd'; import React from 'react'; -import { Row, Col, Divider, Layout, Tag, Badge } from 'antd'; -import { useParams } from 'react-router-dom'; -import { useCreator } from '../../hooks'; import Masonry from 'react-masonry-css'; +import { Link, useParams } from 'react-router-dom'; import { ArtCard } from '../../components/ArtCard'; -import { useCreatorArts } from '../../hooks'; -import { Link } from 'react-router-dom'; import { CardLoader } from '../../components/MyLoader'; -import { MetaAvatar } from '../../components/MetaAvatar'; +import { useCreator, useCreatorArts } from '../../hooks'; export const ArtistView = () => { const { id } = useParams<{ id: string }>(); diff --git a/js/packages/web/src/views/artists/index.tsx b/js/packages/web/src/views/artists/index.tsx index e8fbc04..8b46057 100644 --- a/js/packages/web/src/views/artists/index.tsx +++ b/js/packages/web/src/views/artists/index.tsx @@ -1,18 +1,13 @@ -import React, { useState } from 'react'; -import { ArtCard } from '../../components/ArtCard'; -import { Layout, Row, Col, Tabs } from 'antd'; +import { Col, Layout } from 'antd'; +import React from 'react'; import Masonry from 'react-masonry-css'; import { Link } from 'react-router-dom'; -import { useUserArts } from '../../hooks'; -import { useMeta } from '../../contexts'; import { ArtistCard } from '../../components/ArtistCard'; - -const { TabPane } = Tabs; +import { useMeta } from '../../contexts'; const { Content } = Layout; export const ArtistsView = () => { - const ownedMetadata = useUserArts(); const { whitelistedCreatorsByCreator } = useMeta(); const breakpointColumnsObj = { default: 4,