Skip to content

Commit

Permalink
fix: make getEdition a static method (#53)
Browse files Browse the repository at this point in the history
BREAKING: getEdition is now a Metadata's static method
  • Loading branch information
ilmoi authored Nov 9, 2021
1 parent 9eb62a2 commit fd4ce52
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/programs/metadata/accounts/Metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,7 @@ export class Metadata extends Account<MetadataData> {
).flat();
}

async getEdition(connection: Connection) {
const mint = this.data?.mint;
if (!mint) return;

static async getEdition(connection: Connection, mint: AnyPublicKey) {
const pda = await Edition.getPDA(mint);
const info = await Account.getInfo(connection, pda);
const key = info?.data[0];
Expand Down

0 comments on commit fd4ce52

Please sign in to comment.