From 5430a1218fc572fcced20955d7e8666603cec0a0 Mon Sep 17 00:00:00 2001 From: shotgunofdeath Date: Wed, 28 Feb 2024 17:23:42 +0100 Subject: [PATCH] chore(enum helpers): use kinobi generated enum helpers --- .gitignore | 1 + clients/js/test/addAuthority.test.ts | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index ac6bf219..009dab37 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ ASSETp3DinZKfiAyvdQG16YWWLJ2X3ZKjg9zku7n1sZD.json assetwo5JUM4WA59A1E3gFJBYvo8Ds8Rv32jyc3ASEe.json coreeNT3nkXDgYv28X1S7hi1PTW2oEZKc2dbZqbdbew.json CoREzp6dAdLVRKf3EM5tWrsXM2jQwRFeu5uhzsAyjYXL.json +.idea diff --git a/clients/js/test/addAuthority.test.ts b/clients/js/test/addAuthority.test.ts index 16fc03c9..4f019d16 100644 --- a/clients/js/test/addAuthority.test.ts +++ b/clients/js/test/addAuthority.test.ts @@ -11,6 +11,8 @@ import { create, fetchAsset, fetchAssetWithPlugins, + plugin, + authority, } from '../src'; import { createUmi } from './_setup'; @@ -42,19 +44,15 @@ test('it can add an authority to a plugin', async (t) => { await addPlugin(umi, { assetAddress: assetAddress.publicKey, - plugin: { - __kind: 'Freeze', - fields: [{ frozen: false }], - }, + plugin: plugin('Freeze', [{ frozen: false }]), }) .append( addAuthority(umi, { assetAddress: assetAddress.publicKey, pluginType: PluginType.Freeze, - newAuthority: { - __kind: 'Pubkey', + newAuthority: authority('Pubkey', { address: delegateAddress.publicKey, - }, + }), }) ) .sendAndConfirm(umi);