diff --git a/package.json b/package.json index a60ff04..cbe08f8 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@holaplex/js", + "name": "@metaplex/js", "main": "lib/index.cjs.js", "module": "lib/index.esm.js", "types": "lib/index.d.ts", @@ -20,10 +20,10 @@ "solana", "blockchain" ], - "author": "Holaplex Maintainers ", - "homepage": "https://holaplex.com", + "author": "Metaplex Maintainers ", + "homepage": "https://metaplex.com", "repository": { - "url": "https://github.com/holaplex/js.git" + "url": "https://github.com/metaplex/js.git" }, "scripts": { "build:docs": "typedoc", diff --git a/src/actions/mintNFT.ts b/src/actions/mintNFT.ts index a56087c..8c96d36 100644 --- a/src/actions/mintNFT.ts +++ b/src/actions/mintNFT.ts @@ -18,7 +18,7 @@ interface MintNFTParams { connection: Connection; wallet: Wallet; uri: string; - maxSupply?: number; + maxSupply: BN | null; } interface MintNFTResponse { @@ -90,7 +90,7 @@ export const mintNFT = async ({ updateAuthority: wallet.publicKey, mint: mint.publicKey, mintAuthority: wallet.publicKey, - maxSupply: maxSupply ? new BN(maxSupply) : null, + maxSupply, }, ); diff --git a/test/actions/mintNFT.test.ts b/test/actions/mintNFT.test.ts index 5939873..63bb129 100644 --- a/test/actions/mintNFT.test.ts +++ b/test/actions/mintNFT.test.ts @@ -1,6 +1,6 @@ import { Keypair } from '@solana/web3.js'; -import axios from 'axios'; -import { Connection, NodeWallet, Wallet } from '../../src'; +import BN from 'bn.js'; +import { Connection, NodeWallet } from '../../src'; import { mintNFT } from '../../src/actions'; import { FEE_PAYER } from '../utils'; import { MasterEdition, Metadata } from '../../src/programs/metadata'; @@ -36,7 +36,7 @@ describe('minting an NFT', () => { connection, wallet, uri, - maxSupply: 0, + maxSupply: new BN(0), }); const metadata = await Metadata.getPDA(mint.publicKey); @@ -61,7 +61,7 @@ describe('minting an NFT', () => { connection, wallet, uri, - maxSupply: 0, + maxSupply: new BN(0), }); } catch (e) { expect(e).not.toBeNull();