From bad62e2b2211b2e6187cda8b9f32f5275ab61685 Mon Sep 17 00:00:00 2001 From: Mike Graham Date: Thu, 18 Dec 2025 13:54:38 -0800 Subject: [PATCH] fix: token authority override By default, updateTokenClass() augments the existing authority list. The overrideAuthorities = true flag must be passed to remove an existing authority or authorities from the list. Fix updateTokenClass() call to behave as described in the preceeding comment. ref https://github.com/GalaChain/sdk/blob/b5a6db2ac8fbff6d29d5a7cec786e464e08a696a/chain-api/src/types/TokenClass.ts#L284-L286 --- src/chaincode/launchpad/createSale.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chaincode/launchpad/createSale.ts b/src/chaincode/launchpad/createSale.ts index 01c8761..a4fd577 100644 --- a/src/chaincode/launchpad/createSale.ts +++ b/src/chaincode/launchpad/createSale.ts @@ -114,9 +114,10 @@ export async function createSale( quantity: new BigNumber("2e+7").times(supplyCapMultiplier) }); - //Update token class to remove the calling user as an authority in the token class + // Update token class to remove the calling user as an authority in the token class await updateTokenClass(ctx, { tokenClass: tokenInstanceKey.getTokenClassKey(), + overwriteAuthorities: true, authorities: [vaultAddress] });