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: upgrade spl-token package #299

Merged
merged 16 commits into from
Mar 11, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixed-price: fix type error in test helper
  • Loading branch information
thlorenz committed Mar 11, 2022
commit 7e63e92a95ad0251997327bb6e2d55022c58f3c4
2 changes: 2 additions & 0 deletions fixed-price-sale/js/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { TokenAccount } from '@metaplex-foundation/mpl-core';
import { Edition, MasterEdition, Metadata } from '@metaplex-foundation/mpl-token-metadata';
import { Connection, PublicKey } from '@solana/web3.js';
import { PROGRAM_ID } from '../consts';
import { strict as assert } from 'assert';

const VAULT_OWNER_PREFIX = 'mt_vault';
const HISTORY_PREFIX = 'history';
Expand Down Expand Up @@ -59,6 +60,7 @@ export const validateMembershipToken = async (
me: MasterEdition,
ta: TokenAccount,
) => {
assert(ta.data != null, 'token account data cannot be null');
const edition = (await Metadata.getEdition(connection, ta.data.mint)) as Edition;
return edition.data.parent === me.pubkey.toString();
};