Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lint errors #120

Merged
merged 1 commit into from
Dec 16, 2021
Merged
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
1 change: 0 additions & 1 deletion src/actions/placeBid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const placeBid = async ({
amount,
auction,
bidderPotToken,
commitment,
}: IPlaceBidParams): Promise<IPlaceBidResponse> => {
// get data for transactions
const bidder = wallet.publicKey;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MetadataJson } from './../types';

export const lookup = async (url: string): Promise<MetadataJson> => {
try {
const { data } = await axios.get<any, AxiosResponse<MetadataJson>>(url);
const { data } = await axios.get<string, AxiosResponse<MetadataJson>>(url);

return data;
} catch {
Expand Down
6 changes: 0 additions & 6 deletions test/actions/createMetadataAndME.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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(
Expand Down
3 changes: 0 additions & 3 deletions test/actions/mintEditionFromMaster.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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);
});

Expand Down
3 changes: 0 additions & 3 deletions test/actions/signMetadata.test.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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);
});
Expand Down
2 changes: 0 additions & 2 deletions test/actions/updateMetadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
10 changes: 2 additions & 8 deletions test/metaplex.test.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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', () => {
Expand Down Expand Up @@ -80,18 +77,15 @@ describe('Metaplex', () => {

test('getBidRedemptionTickets', async () => {
const auctionManager = await AuctionManager.load(connection, AUCTION_MANAGER_PUBKEY);
const bidRedemptionTickets = await auctionManager.getBidRedemptionTickets(connection);
await auctionManager.getBidRedemptionTickets(connection);
});
});

describe('Payout Ticket', () => {
test('load', async () => {});

test('getPayoutTickets', async () => {
const payoutTickets = await PayoutTicket.getPayoutTicketsByRecipient(
connection,
STORE_OWNER_PUBKEY,
);
await PayoutTicket.getPayoutTicketsByRecipient(connection, STORE_OWNER_PUBKEY);
});
});
});