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

chore(mint v1 test): update mpl-toolbox version and mintV1 test #98

Merged
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: 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
Loading