Skip to content

Commit

Permalink
chore(mint v1 test): update mpl-toolbox version and mintV1 test (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
shotgunofdeath authored Feb 27, 2024
1 parent eb31266 commit 5df7027
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dist
.amman
.crates
.bin
.idea
2 changes: 1 addition & 1 deletion clients/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@metaplex-foundation/umi": ">= 0.8.2 < 1"
},
"dependencies": {
"@metaplex-foundation/mpl-toolbox": "^0.9.0"
"@metaplex-foundation/mpl-toolbox": "^0.9.4"
},
"devDependencies": {
"@ava/typescript": "^3.0.1",
Expand Down
39 changes: 22 additions & 17 deletions clients/js/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions clients/js/test/mintV1.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
Mint,
SPL_ASSOCIATED_TOKEN_PROGRAM_ID,
Token,
fetchMint,
fetchToken,
Expand All @@ -11,7 +10,6 @@ import {
percentAmount,
publicKey,
} from '@metaplex-foundation/umi';
import { publicKey as publicKeySerializer } from '@metaplex-foundation/umi/serializers';
import test from 'ava';
import { TokenStandard, createV1, mintV1 } from '../src';
import { SPL_TOKEN_2022_PROGRAM_ID, createUmi } from './_setup';
Expand Down Expand Up @@ -177,11 +175,11 @@ test('it can mint a new ProgrammableNonFungible with Token-2022', async (t) => {
}).sendAndConfirm(umi);

// And we derive the associated token account from SPL Token 2022.
const [token] = umi.eddsa.findPda(SPL_ASSOCIATED_TOKEN_PROGRAM_ID, [
publicKeySerializer().serialize(umi.identity.publicKey),
publicKeySerializer().serialize(SPL_TOKEN_2022_PROGRAM_ID),
publicKeySerializer().serialize(mint.publicKey),
]);
const token = findAssociatedTokenPda(umi, {
mint: mint.publicKey,
owner: umi.identity.publicKey,
tokenProgramId: SPL_TOKEN_2022_PROGRAM_ID,
});

// When we mint one token.
await mintV1(umi, {
Expand Down

0 comments on commit 5df7027

Please sign in to comment.