Skip to content

Commit

Permalink
Fixing feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
blockiosaurus committed Nov 5, 2024
1 parent 801dfcf commit c4d854a
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions clients/js/test/close/nonFungible.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ test.skip('it can close t22 ownerless metadata for a non-fungible with zero supp
}

const masterEditionLamports = await umi.rpc.getBalance(
// @ts-ignore
asset.edition.publicKey
asset.edition!.publicKey
);
const lamportsBefore = await umi.rpc.getBalance(closeDestination);
await closeAccounts(umi, {
Expand All @@ -108,6 +107,12 @@ test.skip('it can close t22 ownerless metadata for a non-fungible with zero supp
publicKey: asset.metadata.publicKey,
exists: false,
});
t.deepEqual(await umi.rpc.getAccount(asset.edition!.publicKey), <
MaybeRpcAccount
>{
publicKey: asset.edition!.publicKey,
exists: false,
});
t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0));

const lamportsAfter = await umi.rpc.getBalance(closeDestination);
Expand Down Expand Up @@ -159,8 +164,7 @@ test.skip('it can close ownerless metadata for a non-fungible with zero supply',
}

const masterEditionLamports = await umi.rpc.getBalance(
// @ts-ignore
asset.edition.publicKey
asset.edition!.publicKey
);
const lamportsBefore = await umi.rpc.getBalance(closeDestination);
await closeAccounts(umi, {
Expand Down Expand Up @@ -351,8 +355,8 @@ test.skip('it can close ownerless metadata for a non-fungible edition with zero
if (asset.edition === undefined) {
t.fail('Expected edition to exist');
}
// @ts-ignore
const editionLamports = await umi.rpc.getBalance(asset.edition.publicKey);

const editionLamports = await umi.rpc.getBalance(asset.edition!.publicKey);
const lamportsBefore = await umi.rpc.getBalance(closeDestination);
await closeAccounts(umi, {
mint: editionMint.publicKey,
Expand Down Expand Up @@ -450,8 +454,8 @@ test.skip('it can close ownerless metadata for a t22 non-fungible edition with z
if (asset.edition === undefined) {
t.fail('Expected edition to exist');
}
// @ts-ignore
const editionLamports = await umi.rpc.getBalance(asset.edition.publicKey);

const editionLamports = await umi.rpc.getBalance(asset.edition!.publicKey);
const lamportsBefore = await umi.rpc.getBalance(closeDestination);
await closeAccounts(umi, {
mint: editionMint.publicKey,
Expand All @@ -465,6 +469,12 @@ test.skip('it can close ownerless metadata for a t22 non-fungible edition with z
publicKey: asset.metadata.publicKey,
exists: false,
});
t.deepEqual(await umi.rpc.getAccount(asset.edition!.publicKey), <
MaybeRpcAccount
>{
publicKey: asset.edition!.publicKey,
exists: false,
});
t.deepEqual(await umi.rpc.getBalance(asset.metadata.publicKey), lamports(0));

const lamportsAfter = await umi.rpc.getBalance(closeDestination);
Expand Down

0 comments on commit c4d854a

Please sign in to comment.