Merge pull request #24 from johnrees/linter-fixes

linter fixes
This commit is contained in:
B 2021-06-07 10:46:04 -05:00 committed by GitHub
commit 9b6474b85f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 33 additions and 42 deletions

View File

@ -103,7 +103,7 @@ export async function addTokensToVault(
} }
} }
if (instructions[instructions.length - 1] != currInstructions) { if (instructions[instructions.length - 1] !== currInstructions) {
signers.push(currSigners); signers.push(currSigners);
instructions.push(currInstructions); instructions.push(currInstructions);
} }

View File

@ -29,7 +29,7 @@ export async function sendCancelBid(
let instructions: Array<TransactionInstruction[]> = []; let instructions: Array<TransactionInstruction[]> = [];
if ( if (
auctionView.auction.info.ended() && auctionView.auction.info.ended() &&
auctionView.auction.info.state != AuctionState.Ended auctionView.auction.info.state !== AuctionState.Ended
) { ) {
await setupPlaceBid( await setupPlaceBid(
connection, connection,

View File

@ -308,7 +308,7 @@ export async function createAuctionManager(
instructions = instructions.slice(stopPoint, instructions.length); instructions = instructions.slice(stopPoint, instructions.length);
filteredSigners = filteredSigners.slice(stopPoint, filteredSigners.length); filteredSigners = filteredSigners.slice(stopPoint, filteredSigners.length);
if (instructions.length == lastInstructionsLength) tries = tries + 1; if (instructions.length === lastInstructionsLength) tries = tries + 1;
else tries = 0; else tries = 0;
try { try {

View File

@ -52,7 +52,7 @@ export async function createReservationListForTokens(
batchCounter++; batchCounter++;
} }
if (instructions[instructions.length - 1] != currInstructions) { if (instructions[instructions.length - 1] !== currInstructions) {
signers.push(currSigners); signers.push(currSigners);
instructions.push(currInstructions); instructions.push(currInstructions);
} }

View File

@ -102,7 +102,7 @@ export async function populatePrintingTokens(
} }
} }
if (instructions[instructions.length - 1] != currInstructions) { if (instructions[instructions.length - 1] !== currInstructions) {
signers.push(currSigners); signers.push(currSigners);
instructions.push(currInstructions); instructions.push(currInstructions);
} }

View File

@ -69,7 +69,7 @@ export async function sendRedeemBid(
if ( if (
auctionView.auction.info.ended() && auctionView.auction.info.ended() &&
auctionView.auction.info.state != AuctionState.Ended auctionView.auction.info.state !== AuctionState.Ended
) { ) {
await setupPlaceBid( await setupPlaceBid(
connection, connection,
@ -112,7 +112,7 @@ export async function sendRedeemBid(
const winningConfigItem = winningConfig.items[j]; const winningConfigItem = winningConfig.items[j];
if ( if (
winningConfigItem.safetyDepositBoxIndex == safetyDeposit.info.order winningConfigItem.safetyDepositBoxIndex === safetyDeposit.info.order
) { ) {
const stateItem = const stateItem =
auctionView.auctionManager.info.state.winningConfigStates[ auctionView.auctionManager.info.state.winningConfigStates[
@ -232,7 +232,7 @@ export async function sendRedeemBid(
instructions = instructions.slice(stopPoint, instructions.length); instructions = instructions.slice(stopPoint, instructions.length);
filteredSigners = filteredSigners.slice(stopPoint, filteredSigners.length); filteredSigners = filteredSigners.slice(stopPoint, filteredSigners.length);
if (instructions.length == lastInstructionsLength) tries = tries + 1; if (instructions.length === lastInstructionsLength) tries = tries + 1;
else tries = 0; else tries = 0;
try { try {
@ -575,8 +575,8 @@ async function setupRedeemParticipationInstructions(
); );
if ( if (
participationBalance.value.uiAmount == 0 && participationBalance.value.uiAmount === 0 &&
tokenBalance.value.uiAmount == 1 tokenBalance.value.uiAmount === 1
) { ) {
// I'm the first, I need to populate for the others with a crank turn. // I'm the first, I need to populate for the others with a crank turn.
let fillParticipationStashSigners: Keypair[] = []; let fillParticipationStashSigners: Keypair[] = [];
@ -694,7 +694,7 @@ async function setupRedeemParticipationInstructions(
} }
} }
if (newTokenAccount && newTokenBalance == 1) { if (newTokenAccount && newTokenBalance === 1) {
await redeemPrintingToken( await redeemPrintingToken(
wallet, wallet,
updateAuth, updateAuth,

View File

@ -117,11 +117,11 @@ async function emptyPaymentAccountForAllTokens(
auctionView.auction.pubkey, auctionView.auction.pubkey,
wallet.publicKey, wallet.publicKey,
addresses[k], addresses[k],
item == auctionView.participationItem ? null : i, item === auctionView.participationItem ? null : i,
item == auctionView.participationItem ? null : j, item === auctionView.participationItem ? null : j,
creatorIndex === -1 || creatorIndex === -1 ||
creatorIndex === null || creatorIndex === null ||
(edgeCaseWhereCreatorIsAuctioneer && k == addresses.length - 1) (edgeCaseWhereCreatorIsAuctioneer && k === addresses.length - 1)
? null ? null
: creatorIndex, : creatorIndex,
settleInstructions, settleInstructions,
@ -134,7 +134,7 @@ async function emptyPaymentAccountForAllTokens(
settleInstructions = []; settleInstructions = [];
} }
if (currInstrBatch.length == BATCH_SIZE) { if (currInstrBatch.length === BATCH_SIZE) {
signers.push(currSignerBatch); signers.push(currSignerBatch);
instructions.push(currInstrBatch); instructions.push(currInstrBatch);
currSignerBatch = []; currSignerBatch = [];
@ -213,14 +213,14 @@ async function claimAllBids(
claimBidInstructions, claimBidInstructions,
); );
if (claimBidInstructions.length == CLAIM_TRANSACTION_SIZE) { if (claimBidInstructions.length === CLAIM_TRANSACTION_SIZE) {
currSignerBatch.push(claimBidSigners); currSignerBatch.push(claimBidSigners);
currInstrBatch.push(claimBidInstructions); currInstrBatch.push(claimBidInstructions);
claimBidSigners = []; claimBidSigners = [];
claimBidInstructions = []; claimBidInstructions = [];
} }
if (currInstrBatch.length == BATCH_SIZE) { if (currInstrBatch.length === BATCH_SIZE) {
signers.push(currSignerBatch); signers.push(currSignerBatch);
instructions.push(currInstrBatch); instructions.push(currInstrBatch);
currSignerBatch = []; currSignerBatch = [];

View File

@ -5,11 +5,11 @@ import { formatUSD } from '@oyster/common'
import './index.less'; import './index.less';
interface IAmountLabel { interface IAmountLabel {
amount: number | string, amount: number | string;
displayUSD?: boolean, displayUSD?: boolean;
title?: string, title?: string;
style?: object, style?: object;
containerStyle?: object, containerStyle?: object;
} }
export const AmountLabel = (props: IAmountLabel) => { export const AmountLabel = (props: IAmountLabel) => {

View File

@ -15,7 +15,6 @@ import {
// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish // 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 // Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move
const TouchableOrbitControls = function (object, domElement) { const TouchableOrbitControls = function (object, domElement) {
if (domElement === undefined) if (domElement === undefined)
console.warn( console.warn(
@ -574,7 +573,7 @@ const TouchableOrbitControls = function (object, domElement) {
} }
function handleTouchStartRotate(event) { function handleTouchStartRotate(event) {
if (event.touches.length == 1) { if (event.touches.length === 1) {
rotateStart.set(event.touches[0].pageX, event.touches[0].pageY); rotateStart.set(event.touches[0].pageX, event.touches[0].pageY);
} else { } else {
const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX);
@ -585,7 +584,7 @@ const TouchableOrbitControls = function (object, domElement) {
} }
function handleTouchStartPan(event) { function handleTouchStartPan(event) {
if (event.touches.length == 1) { if (event.touches.length === 1) {
panStart.set(event.touches[0].pageX, event.touches[0].pageY); panStart.set(event.touches[0].pageX, event.touches[0].pageY);
} else { } else {
const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX);
@ -617,7 +616,7 @@ const TouchableOrbitControls = function (object, domElement) {
} }
function handleTouchMoveRotate(event) { function handleTouchMoveRotate(event) {
if (event.touches.length == 1) { if (event.touches.length === 1) {
rotateEnd.set(event.touches[0].pageX, event.touches[0].pageY); rotateEnd.set(event.touches[0].pageX, event.touches[0].pageY);
} else { } else {
const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX);
@ -640,7 +639,7 @@ const TouchableOrbitControls = function (object, domElement) {
} }
function handleTouchMovePan(event) { function handleTouchMovePan(event) {
if (event.touches.length == 1) { if (event.touches.length === 1) {
panEnd.set(event.touches[0].pageX, event.touches[0].pageY); panEnd.set(event.touches[0].pageX, event.touches[0].pageY);
} else { } else {
const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX);

View File

@ -697,7 +697,7 @@ const processMetaplexAccounts = async (
whitelistedCreator.address, whitelistedCreator.address,
); );
if ( if (
creatorKeyIfCreatorWasPartOfThisStore.toBase58() == a.pubkey.toBase58() creatorKeyIfCreatorWasPartOfThisStore.toBase58() === a.pubkey.toBase58()
) { ) {
const account = cache.add( const account = cache.add(
a.pubkey, a.pubkey,

View File

@ -1,13 +1,10 @@
import { Col, Divider, Row } from 'antd';
import React from 'react'; 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 Masonry from 'react-masonry-css';
import { Link, useParams } from 'react-router-dom';
import { ArtCard } from '../../components/ArtCard'; import { ArtCard } from '../../components/ArtCard';
import { useCreatorArts } from '../../hooks';
import { Link } from 'react-router-dom';
import { CardLoader } from '../../components/MyLoader'; import { CardLoader } from '../../components/MyLoader';
import { MetaAvatar } from '../../components/MetaAvatar'; import { useCreator, useCreatorArts } from '../../hooks';
export const ArtistView = () => { export const ArtistView = () => {
const { id } = useParams<{ id: string }>(); const { id } = useParams<{ id: string }>();

View File

@ -1,18 +1,13 @@
import React, { useState } from 'react'; import { Col, Layout } from 'antd';
import { ArtCard } from '../../components/ArtCard'; import React from 'react';
import { Layout, Row, Col, Tabs } from 'antd';
import Masonry from 'react-masonry-css'; import Masonry from 'react-masonry-css';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { useUserArts } from '../../hooks';
import { useMeta } from '../../contexts';
import { ArtistCard } from '../../components/ArtistCard'; import { ArtistCard } from '../../components/ArtistCard';
import { useMeta } from '../../contexts';
const { TabPane } = Tabs;
const { Content } = Layout; const { Content } = Layout;
export const ArtistsView = () => { export const ArtistsView = () => {
const ownedMetadata = useUserArts();
const { whitelistedCreatorsByCreator } = useMeta(); const { whitelistedCreatorsByCreator } = useMeta();
const breakpointColumnsObj = { const breakpointColumnsObj = {
default: 4, default: 4,