From 439aaf42361064c0b3dd8a6c1372357ab3c60015 Mon Sep 17 00:00:00 2001 From: Aaron Heckmann Date: Thu, 16 Dec 2021 08:50:26 -0800 Subject: [PATCH] fix: lint errors (#120) --- src/actions/placeBid.ts | 1 - src/utils/metadata.ts | 2 +- test/actions/createMetadataAndME.test.ts | 6 ------ test/actions/mintEditionFromMaster.test.ts | 3 --- test/actions/signMetadata.test.ts | 3 --- test/actions/updateMetadata.test.ts | 2 -- test/metaplex.test.ts | 10 ++-------- 7 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/actions/placeBid.ts b/src/actions/placeBid.ts index 82dfa03..8b2e3f1 100644 --- a/src/actions/placeBid.ts +++ b/src/actions/placeBid.ts @@ -38,7 +38,6 @@ export const placeBid = async ({ amount, auction, bidderPotToken, - commitment, }: IPlaceBidParams): Promise => { // get data for transactions const bidder = wallet.publicKey; diff --git a/src/utils/metadata.ts b/src/utils/metadata.ts index faa9692..55227e5 100644 --- a/src/utils/metadata.ts +++ b/src/utils/metadata.ts @@ -3,7 +3,7 @@ import { MetadataJson } from './../types'; export const lookup = async (url: string): Promise => { try { - const { data } = await axios.get>(url); + const { data } = await axios.get>(url); return data; } catch { diff --git a/test/actions/createMetadataAndME.test.ts b/test/actions/createMetadataAndME.test.ts index 49df089..97242ad 100644 --- a/test/actions/createMetadataAndME.test.ts +++ b/test/actions/createMetadataAndME.test.ts @@ -1,5 +1,4 @@ import BN from 'bn.js'; -import { Keypair } from '@solana/web3.js'; import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'; import { Connection, NodeWallet } from '../../src'; import { FEE_PAYER, NETWORK, pause } from '../utils'; @@ -18,11 +17,6 @@ import { Account } from '@metaplex-foundation/mpl-core'; describe('creatomg metadata and master edition PDAs', () => { const connection = new Connection(NETWORK); const wallet = new NodeWallet(FEE_PAYER); - let mint: Keypair; - - beforeEach(() => { - mint = Keypair.generate(); - }); test('creates both successfully', async () => { const mint = await Token.createMint( diff --git a/test/actions/mintEditionFromMaster.test.ts b/test/actions/mintEditionFromMaster.test.ts index a6523ef..5843a0f 100644 --- a/test/actions/mintEditionFromMaster.test.ts +++ b/test/actions/mintEditionFromMaster.test.ts @@ -1,4 +1,3 @@ -import { Keypair } from '@solana/web3.js'; import { Connection, NodeWallet } from '../../src'; import { mintNFT } from '../../src/actions'; import { FEE_PAYER, NETWORK, pause } from '../utils'; @@ -12,10 +11,8 @@ jest.setTimeout(100000); describe('minting a limited edition from master', () => { const connection = new Connection(NETWORK); const wallet = new NodeWallet(FEE_PAYER); - let mint: Keypair; beforeEach(() => { - mint = Keypair.generate(); mockAxios200(wallet); }); diff --git a/test/actions/signMetadata.test.ts b/test/actions/signMetadata.test.ts index ff1ac13..a4031f3 100644 --- a/test/actions/signMetadata.test.ts +++ b/test/actions/signMetadata.test.ts @@ -1,5 +1,4 @@ import { Keypair } from '@solana/web3.js'; -import axios from 'axios'; import { Connection, NodeWallet } from '../../src'; import { mintNFT } from '../../src/actions'; import { FEE_PAYER, NETWORK, pause } from '../utils'; @@ -14,11 +13,9 @@ jest.setTimeout(100000); describe('signing metadata on a master edition', () => { const connection = new Connection(NETWORK); const wallet = new NodeWallet(FEE_PAYER); - let mint: Keypair; let secondSigner: Keypair; beforeEach(() => { - mint = Keypair.generate(); secondSigner = Keypair.generate(); mockAxios200(wallet, secondSigner); }); diff --git a/test/actions/updateMetadata.test.ts b/test/actions/updateMetadata.test.ts index 564ecc4..96795e8 100644 --- a/test/actions/updateMetadata.test.ts +++ b/test/actions/updateMetadata.test.ts @@ -13,10 +13,8 @@ jest.setTimeout(100000); describe('updating metadata on a master edition', () => { const connection = new Connection(NETWORK); const wallet = new NodeWallet(FEE_PAYER); - let mint: Keypair; beforeEach(() => { - mint = Keypair.generate(); mockAxios200(wallet); }); diff --git a/test/metaplex.test.ts b/test/metaplex.test.ts index 8172c8e..f469a8a 100644 --- a/test/metaplex.test.ts +++ b/test/metaplex.test.ts @@ -1,5 +1,4 @@ import { jest } from '@jest/globals'; -import { Keypair } from '@solana/web3.js'; import { Connection } from '../src'; import { Auction } from '@metaplex-foundation/mpl-auction'; import { @@ -18,13 +17,11 @@ import { describe('Metaplex', () => { let connection: Connection; - let owner: Keypair; jest.setTimeout(80000); beforeAll(() => { connection = new Connection('devnet'); - owner = Keypair.generate(); }); describe('Store', () => { @@ -80,7 +77,7 @@ describe('Metaplex', () => { test('getBidRedemptionTickets', async () => { const auctionManager = await AuctionManager.load(connection, AUCTION_MANAGER_PUBKEY); - const bidRedemptionTickets = await auctionManager.getBidRedemptionTickets(connection); + await auctionManager.getBidRedemptionTickets(connection); }); }); @@ -88,10 +85,7 @@ describe('Metaplex', () => { test('load', async () => {}); test('getPayoutTickets', async () => { - const payoutTickets = await PayoutTicket.getPayoutTicketsByRecipient( - connection, - STORE_OWNER_PUBKEY, - ); + await PayoutTicket.getPayoutTicketsByRecipient(connection, STORE_OWNER_PUBKEY); }); }); });