From d2df91f52ab361456bb4a86ec842d9835756239a Mon Sep 17 00:00:00 2001 From: Nhan Phan Date: Mon, 11 Mar 2024 11:10:03 -0700 Subject: [PATCH] upgrade prettier version --- clients/js/package.json | 2 +- clients/js/pnpm-lock.yaml | 26 +++--- clients/js/src/hooked/types.ts | 4 +- clients/js/test/_setup.ts | 21 ++--- clients/js/test/approveAuthority.test.ts | 4 +- clients/js/test/burn.test.ts | 17 ++-- clients/js/test/collect.test.ts | 51 +++++++----- clients/js/test/compress.test.ts | 4 +- clients/js/test/create.test.ts | 42 ++++++---- clients/js/test/createCollection.test.ts | 10 ++- .../js/test/plugins/asset/delegate.test.ts | 8 +- .../js/test/plugins/asset/royalties.test.ts | 81 ++++++++++--------- clients/js/test/removePlugin.test.ts | 6 +- clients/js/test/revokeAuthority.test.ts | 16 +++- 14 files changed, 168 insertions(+), 124 deletions(-) diff --git a/clients/js/package.json b/clients/js/package.json index 832ec814..fefc9fee 100644 --- a/clients/js/package.json +++ b/clients/js/package.json @@ -45,7 +45,7 @@ "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "^4.2.1", - "prettier": "^2.5.1", + "prettier": "^2.8.8", "rimraf": "^3.0.2", "typedoc": "^0.23.16", "typedoc-plugin-expand-object-like-types": "^0.1.1", diff --git a/clients/js/pnpm-lock.yaml b/clients/js/pnpm-lock.yaml index e692f94c..01afb6ba 100644 --- a/clients/js/pnpm-lock.yaml +++ b/clients/js/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - dependencies: '@metaplex-foundation/mpl-toolbox': specifier: ^0.8.0 @@ -51,10 +47,10 @@ devDependencies: version: 2.26.0(@typescript-eslint/parser@5.46.1)(eslint@8.0.1) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.5.0)(eslint@8.0.1)(prettier@2.5.1) + version: 4.2.1(eslint-config-prettier@8.5.0)(eslint@8.0.1)(prettier@2.8.8) prettier: - specifier: ^2.5.1 - version: 2.5.1 + specifier: ^2.8.8 + version: 2.8.8 rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -4564,7 +4560,7 @@ packages: - supports-color dev: true - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.5.0)(eslint@8.0.1)(prettier@2.5.1): + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.5.0)(eslint@8.0.1)(prettier@2.8.8): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4577,7 +4573,7 @@ packages: dependencies: eslint: 8.0.1 eslint-config-prettier: 8.5.0(eslint@8.0.1) - prettier: 2.5.1 + prettier: 2.8.8 prettier-linter-helpers: 1.0.0 dev: true @@ -7240,14 +7236,14 @@ packages: fast-diff: 1.3.0 dev: true - /prettier@2.5.1: - resolution: {integrity: sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==} + /prettier@2.7.1: + resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==} engines: {node: '>=10.13.0'} hasBin: true dev: true - /prettier@2.7.1: - resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==} + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true dev: true @@ -8937,3 +8933,7 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} dev: true + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/clients/js/src/hooked/types.ts b/clients/js/src/hooked/types.ts index 8c216847..ef639b72 100644 --- a/clients/js/src/hooked/types.ts +++ b/clients/js/src/hooked/types.ts @@ -12,8 +12,8 @@ import { } from '../generated'; export type BaseAuthority = { - type: PluginAuthorityType - address?: PublicKey + type: PluginAuthorityType; + address?: PublicKey; }; export type PluginAuthorityType = Pick['__kind']; diff --git a/clients/js/test/_setup.ts b/clients/js/test/_setup.ts index 05628a8c..eb12243d 100644 --- a/clients/js/test/_setup.ts +++ b/clients/js/test/_setup.ts @@ -109,10 +109,10 @@ export const createAssetWithCollection: ( const collection = assetInput.collection ? await fetchCollectionWithPlugins(umi, publicKey(assetInput.collection)) : await createCollection(umi, { - payer: assetInput.payer, - updateAuthority: assetInput.updateAuthority, - ...collectionInput, - }); + payer: assetInput.payer, + updateAuthority: assetInput.updateAuthority, + ...collectionInput, + }); const asset = await createAsset(umi, { ...assetInput, @@ -136,7 +136,7 @@ export const assertAsset = async ( uri?: string | RegExp; } & PluginsList ) => { - const { asset, owner, name, uri, ...rest } = input + const { asset, owner, name, uri, ...rest } = input; const assetAddress = publicKey(input.asset); const assetWithPlugins = await fetchAssetWithPlugins(umi, assetAddress); @@ -152,7 +152,7 @@ export const assertAsset = async ( key: Key.Asset, publicKey: assetAddress, owner: publicKey(owner), - ...rest + ...rest, }; t.like(assetWithPlugins, testObj); @@ -170,10 +170,13 @@ export const assertCollection = async ( currentSize?: number; } & PluginsList ) => { - const { collection, name, uri, updateAuthority, ...rest } = input + const { collection, name, uri, updateAuthority, ...rest } = input; const collectionAddress = publicKey(collection); - const collectionWithPlugins = await fetchCollectionWithPlugins(umi, collectionAddress); + const collectionWithPlugins = await fetchCollectionWithPlugins( + umi, + collectionAddress + ); // Name. if (typeof name === 'string') t.is(collectionWithPlugins.name, name); @@ -186,7 +189,7 @@ export const assertCollection = async ( const testObj = { key: Key.Collection, publicKey: collectionAddress, - ...rest + ...rest, }; if (updateAuthority) { diff --git a/clients/js/test/approveAuthority.test.ts b/clients/js/test/approveAuthority.test.ts index 0e6117cd..a58e6225 100644 --- a/clients/js/test/approveAuthority.test.ts +++ b/clients/js/test/approveAuthority.test.ts @@ -15,13 +15,13 @@ test('it can add an authority to a plugin', async (t) => { const umi = await createUmi(); const delegateAddress = generateSigner(umi); - const asset = await createAsset(umi, {}) + const asset = await createAsset(umi, {}); await assertAsset(t, umi, { asset: asset.publicKey, owner: umi.identity.publicKey, updateAuthority: updateAuthority('Address', [umi.identity.publicKey]), - }) + }); await addPlugin(umi, { asset: asset.publicKey, diff --git a/clients/js/test/burn.test.ts b/clients/js/test/burn.test.ts index b1bbc139..f5213783 100644 --- a/clients/js/test/burn.test.ts +++ b/clients/js/test/burn.test.ts @@ -5,12 +5,7 @@ import { } from '@metaplex-foundation/umi'; import test from 'ava'; -import { - burn, - Key, - updateAuthority, - plugin, -} from '../src'; +import { burn, Key, updateAuthority, plugin } from '../src'; import { DEFAULT_ASSET, assertAsset, createAsset, createUmi } from './_setup'; test('it can burn an asset as the owner', async (t) => { @@ -22,7 +17,7 @@ test('it can burn an asset as the owner', async (t) => { asset: asset.publicKey, owner: umi.identity.publicKey, updateAuthority: updateAuthority('Address', [umi.identity.publicKey]), - }) + }); await burn(umi, { asset: asset.publicKey, @@ -48,7 +43,7 @@ test('it cannot burn an asset if not the owner', async (t) => { asset: asset.publicKey, owner: umi.identity.publicKey, updateAuthority: updateAuthority('Address', [umi.identity.publicKey]), - }) + }); const result = burn(umi, { asset: asset.publicKey, @@ -61,7 +56,7 @@ test('it cannot burn an asset if not the owner', async (t) => { asset: asset.publicKey, owner: umi.identity.publicKey, updateAuthority: updateAuthority('Address', [umi.identity.publicKey]), - }) + }); }); test('it cannot burn an asset if it is frozen', async (t) => { @@ -69,7 +64,9 @@ test('it cannot burn an asset if it is frozen', async (t) => { const umi = await createUmi(); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: true }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: true }]), authority: null }, + ], }); await assertAsset(t, umi, { diff --git a/clients/js/test/collect.test.ts b/clients/js/test/collect.test.ts index 591860bb..03fcb9f6 100644 --- a/clients/js/test/collect.test.ts +++ b/clients/js/test/collect.test.ts @@ -1,58 +1,67 @@ import { PublicKey, Umi, sol } from '@metaplex-foundation/umi'; import test from 'ava'; -import { - PluginType, - addPlugin, - plugin, - removePlugin, -} from '../src'; +import { PluginType, addPlugin, plugin, removePlugin } from '../src'; import { createAsset, createUmi } from './_setup'; const hasCollectAmount = async (umi: Umi, address: PublicKey) => { const account = await umi.rpc.getAccount(address); if (account.exists) { - const rent = await umi.rpc.getRent(account.data.length) - const diff = account.lamports.basisPoints - rent.basisPoints - return diff === sol(0.0015).basisPoints + const rent = await umi.rpc.getRent(account.data.length); + const diff = account.lamports.basisPoints - rent.basisPoints; + return diff === sol(0.0015).basisPoints; } - return false -} + return false; +}; test('it can create a new asset with collect amount', async (t) => { // Given a Umi instance and a new signer. const umi = await createUmi(); - const asset = await createAsset(umi, {}) + const asset = await createAsset(umi, {}); - t.assert(await hasCollectAmount(umi, asset.publicKey), 'Collect amount not found') + t.assert( + await hasCollectAmount(umi, asset.publicKey), + 'Collect amount not found' + ); }); test('it can add asset plugin with collect amount', async (t) => { // Given a Umi instance and a new signer. const umi = await createUmi(); - const asset = await createAsset(umi, {}) + const asset = await createAsset(umi, {}); await addPlugin(umi, { asset: asset.publicKey, plugin: plugin('Freeze', [{ frozen: true }]), - initAuthority: null + initAuthority: null, }).sendAndConfirm(umi); - t.assert(await hasCollectAmount(umi, asset.publicKey), 'Collect amount not found') + t.assert( + await hasCollectAmount(umi, asset.publicKey), + 'Collect amount not found' + ); }); test('it can add remove asset plugin with collect amount', async (t) => { // Given a Umi instance and a new signer. const umi = await createUmi(); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: true }]), authority: null }] - }) + plugins: [ + { plugin: plugin('Freeze', [{ frozen: true }]), authority: null }, + ], + }); - t.assert(await hasCollectAmount(umi, asset.publicKey), 'Collect amount not found') + t.assert( + await hasCollectAmount(umi, asset.publicKey), + 'Collect amount not found' + ); await removePlugin(umi, { asset: asset.publicKey, pluginType: PluginType.Freeze, }).sendAndConfirm(umi); - t.assert(await hasCollectAmount(umi, asset.publicKey), 'Collect amount not found') -}); \ No newline at end of file + t.assert( + await hasCollectAmount(umi, asset.publicKey), + 'Collect amount not found' + ); +}); diff --git a/clients/js/test/compress.test.ts b/clients/js/test/compress.test.ts index 384e91bd..34cfe894 100644 --- a/clients/js/test/compress.test.ts +++ b/clients/js/test/compress.test.ts @@ -18,7 +18,7 @@ import { createAsset, createUmi } from './_setup'; test.skip('it can compress an asset without any plugins as the owner', async (t) => { // Given a Umi instance and a new signer. const umi = await createUmi(); - const asset = await createAsset(umi, {}); + const asset = await createAsset(umi, {}); // And when we compress the asset. await compress(umi, { @@ -114,7 +114,7 @@ test('it cannot compress an asset because it is not available', async (t) => { }); // And when we compress the asset. - const result = compress(umi, { + const result = compress(umi, { asset: assetAddress.publicKey, authority: umi.identity, logWrapper: publicKey('noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV'), diff --git a/clients/js/test/create.test.ts b/clients/js/test/create.test.ts index 3b3ef3d3..c9fb0fcf 100644 --- a/clients/js/test/create.test.ts +++ b/clients/js/test/create.test.ts @@ -41,13 +41,13 @@ test('it can create a new asset with a different payer', async (t) => { dataState: DataState.AccountState, asset: assetAddress, payer, - plugins: [] + plugins: [], }).sendAndConfirm(umi); const asset = await createAsset(umi, { owner: umi.identity, payer, - }) + }); await assertAsset(t, umi, { ...DEFAULT_ASSET, @@ -124,10 +124,12 @@ test('it can create a new asset in account state with plugins', async (t) => { asset: assetAddress, name: 'Test Bread', uri: 'https://example.com/bread', - plugins: [{ - plugin: plugin('Freeze', [{ frozen: false }]), - authority: null - }], + plugins: [ + { + plugin: plugin('Freeze', [{ frozen: false }]), + authority: null, + }, + ], }).sendAndConfirm(umi); await assertAsset(t, umi, { @@ -144,7 +146,7 @@ test('it can create a new asset in account state with plugins', async (t) => { offset: BigInt(119), frozen: false, }, - }) + }); }); test('it can create a new asset in account state with a different update authority', async (t) => { @@ -175,7 +177,9 @@ test('it can create a new asset in account state with plugins with a different u await createAsset(umi, { asset: assetAddress, updateAuthority: updateAuth.publicKey, - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await assertAsset(t, umi, { @@ -184,7 +188,7 @@ test('it can create a new asset in account state with plugins with a different u owner: umi.identity, updateAuthority: updateAuthority('Address', [updateAuth.publicKey]), freeze: { - authority: { type: "Owner" }, + authority: { type: 'Owner' }, frozen: false, }, }); @@ -208,23 +212,31 @@ test('it cannot create a new asset if the address is already in use', async (t) }).sendAndConfirm(umi); await t.throwsAsync(result, { name: 'InvalidSystemProgram' }); -}) +}); test.skip('it cannot create a new asset if the address is not owned by the system program', async (t) => { // TODO: Reassign an account to another program. -}) +}); // TODO -test('it cannot create a new asset if the asset keypair does not sign', async (t) => { t.pass() }) +test('it cannot create a new asset if the asset keypair does not sign', async (t) => { + t.pass(); +}); // TODO -test('it cannot create a new asset if the payer does not sign', async (t) => { t.pass() }) +test('it cannot create a new asset if the payer does not sign', async (t) => { + t.pass(); +}); // TODO -test('it cannot create a new asset if the payer does not sign, even if the authority does', async (t) => { t.pass() }) +test('it cannot create a new asset if the payer does not sign, even if the authority does', async (t) => { + t.pass(); +}); // TODO -test('it cannot create a new asset if the authority does not sign', async (t) => { t.pass() }) +test('it cannot create a new asset if the authority does not sign', async (t) => { + t.pass(); +}); // TODO: Add test test.skip('it can create a new asset in ledger state with plugins', async (t) => { diff --git a/clients/js/test/createCollection.test.ts b/clients/js/test/createCollection.test.ts index 260c9895..4ccc455b 100644 --- a/clients/js/test/createCollection.test.ts +++ b/clients/js/test/createCollection.test.ts @@ -39,7 +39,9 @@ test('it can create a new collection with plugins', async (t) => { const umi = await createUmi(); const collection = await createCollection(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await assertCollection(t, umi, { @@ -72,7 +74,7 @@ test('it can create a new asset with a collection', async (t) => { updateAuthority: umi.identity.publicKey, updateDelegate: { authority: { - type: 'UpdateAuthority' + type: 'UpdateAuthority', }, }, }); @@ -104,7 +106,7 @@ test('it can create a new asset with a collection with collection delegate', asy const asset = await createAsset(umi2, { collection: collection.publicKey, authority: delegate, - }) + }); await assertAsset(t, umi, { ...DEFAULT_ASSET, @@ -130,7 +132,7 @@ test('it cannot create a new asset with a collection if it is not the collection const result = createAsset(umi, { collection: collection.publicKey, - }) + }); await t.throwsAsync(result, { name: 'InvalidAuthority' }); }); diff --git a/clients/js/test/plugins/asset/delegate.test.ts b/clients/js/test/plugins/asset/delegate.test.ts index 482df07d..d1d6a1ae 100644 --- a/clients/js/test/plugins/asset/delegate.test.ts +++ b/clients/js/test/plugins/asset/delegate.test.ts @@ -21,7 +21,9 @@ test('it can delegate a new authority', async (t) => { const delegateAddress = generateSigner(umi); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await approvePluginAuthority(umi, { @@ -51,7 +53,9 @@ test('a delegate can freeze the token', async (t) => { const delegateAddress = generateSigner(umi); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await approvePluginAuthority(umi, { diff --git a/clients/js/test/plugins/asset/royalties.test.ts b/clients/js/test/plugins/asset/royalties.test.ts index 68f8b018..502021c9 100644 --- a/clients/js/test/plugins/asset/royalties.test.ts +++ b/clients/js/test/plugins/asset/royalties.test.ts @@ -22,17 +22,18 @@ test('it can transfer an asset with royalties', async (t) => { // Given a Umi instance and a new signer. const umi = await createUmi(); const asset = await createAsset(umi, { - plugins: [{ - plugin: - plugin('Royalties', [ + plugins: [ + { + plugin: plugin('Royalties', [ { percentage: 5, creators: [{ address: umi.identity.publicKey, percentage: 100 }], ruleSet: ruleSet('None'), }, ]), - authority: null, - }], + authority: null, + }, + ], }); // Here we're creating a new owner that's program owned, so we're just going to use another asset. @@ -47,7 +48,7 @@ test('it can transfer an asset with royalties', async (t) => { royalties: { authority: { - type: 'UpdateAuthority' + type: 'UpdateAuthority', }, percentage: 5, creators: [{ address: umi.identity.publicKey, percentage: 100 }], @@ -71,16 +72,18 @@ test('it can transfer an asset with royalties to an allowlisted program address' const umi = await createUmi(); const asset = await createAsset(umi, { - plugins: [{ - plugin: plugin('Royalties', [ - { - percentage: 5, - creators: [{ address: umi.identity.publicKey, percentage: 100 }], - ruleSet: ruleSet('ProgramAllowList', [[MPL_CORE_PROGRAM_ID]]), - }, - ]), - authority: null - }], + plugins: [ + { + plugin: plugin('Royalties', [ + { + percentage: 5, + creators: [{ address: umi.identity.publicKey, percentage: 100 }], + ruleSet: ruleSet('ProgramAllowList', [[MPL_CORE_PROGRAM_ID]]), + }, + ]), + authority: null, + }, + ], }); // Here we're creating a new owner that's program owned, so we're just going to use another asset. @@ -94,7 +97,7 @@ test('it can transfer an asset with royalties to an allowlisted program address' updateAuthority: updateAuthority('Address', [umi.identity.publicKey]), royalties: { authority: { - type: 'UpdateAuthority' + type: 'UpdateAuthority', }, percentage: 5, creators: [{ address: umi.identity.publicKey, percentage: 100 }], @@ -129,16 +132,18 @@ test('it cannot transfer an asset with royalties to a program address not on the // Creating a new asset to transfer. const asset = await createAsset(umi, { - plugins: [{ - plugin: plugin('Royalties', [ - { - percentage: 5, - creators: [{ address: umi.identity.publicKey, percentage: 100 }], - ruleSet: ruleSet('ProgramAllowList', [[SPL_SYSTEM_PROGRAM_ID]]), - }, - ]), - authority: null - }], + plugins: [ + { + plugin: plugin('Royalties', [ + { + percentage: 5, + creators: [{ address: umi.identity.publicKey, percentage: 100 }], + ruleSet: ruleSet('ProgramAllowList', [[SPL_SYSTEM_PROGRAM_ID]]), + }, + ]), + authority: null, + }, + ], }); // Then an account was created with the correct data. @@ -171,17 +176,18 @@ test('it can transfer an asset with royalties to a program address not on the de // Creating a new asset to transfer. const asset = await createAsset(umi, { - plugins: [{ - plugin: - plugin('Royalties', [ + plugins: [ + { + plugin: plugin('Royalties', [ { percentage: 5, creators: [{ address: umi.identity.publicKey, percentage: 100 }], ruleSet: ruleSet('ProgramDenyList', [[SPL_TOKEN_PROGRAM_ID]]), }, ]), - authority: null - }], + authority: null, + }, + ], }); // Then an account was created with the correct data. @@ -212,17 +218,18 @@ test('it cannot transfer an asset with royalties to a denylisted program', async // Creating a new asset to transfer. const asset = await createAsset(umi, { - plugins: [{ - plugin: - plugin('Royalties', [ + plugins: [ + { + plugin: plugin('Royalties', [ { percentage: 5, creators: [{ address: umi.identity.publicKey, percentage: 100 }], ruleSet: ruleSet('ProgramDenyList', [[MPL_CORE_PROGRAM_ID]]), }, ]), - authority: null - }], + authority: null, + }, + ], }); await assertAsset(t, umi, { diff --git a/clients/js/test/removePlugin.test.ts b/clients/js/test/removePlugin.test.ts index 108d0c50..7ba4c084 100644 --- a/clients/js/test/removePlugin.test.ts +++ b/clients/js/test/removePlugin.test.ts @@ -13,7 +13,9 @@ test('it can remove a plugin from an asset', async (t) => { const umi = await createUmi(); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await assertAsset(t, umi, { @@ -25,7 +27,7 @@ test('it can remove a plugin from an asset', async (t) => { }, frozen: false, }, - }) + }); await removePlugin(umi, { asset: asset.publicKey, diff --git a/clients/js/test/revokeAuthority.test.ts b/clients/js/test/revokeAuthority.test.ts index 8911e5de..43898193 100644 --- a/clients/js/test/revokeAuthority.test.ts +++ b/clients/js/test/revokeAuthority.test.ts @@ -18,7 +18,9 @@ test('it can remove an authority from a plugin', async (t) => { const delegateAddress = generateSigner(umi); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await approvePluginAuthority(umi, { @@ -62,7 +64,9 @@ test('it can remove the default authority from a plugin to make it immutable', a // Given a Umi instance and a new signer. const umi = await createUmi(); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await approvePluginAuthority(umi, { @@ -90,7 +94,9 @@ test('it can remove a pubkey authority from a plugin if that pubkey is the signe const pubkeyAuth = await generateSignerWithSol(umi); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await approvePluginAuthority(umi, { @@ -138,7 +144,9 @@ test('it cannot remove a none authority from a plugin', async (t) => { // Given a Umi instance and a new signer. const umi = await createUmi(); const asset = await createAsset(umi, { - plugins: [{ plugin: plugin('Freeze', [{ frozen: false }]), authority: null }], + plugins: [ + { plugin: plugin('Freeze', [{ frozen: false }]), authority: null }, + ], }); await approvePluginAuthority(umi, {