From 5dad1a72e88a0d951254bdf367d7574d106acd64 Mon Sep 17 00:00:00 2001 From: Boldizsar Mezei Date: Wed, 4 Oct 2023 11:37:07 +0200 Subject: [PATCH] Make token symbol capital in metadata --- packages/functions/src/utils/car.utils.ts | 1 + .../functions/src/utils/token-minting-utils/foundry.utils.ts | 2 +- packages/functions/test-tangle/token.mint/token.mint_1.spec.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/functions/src/utils/car.utils.ts b/packages/functions/src/utils/car.utils.ts index 5afcc9506a..375cf265d8 100644 --- a/packages/functions/src/utils/car.utils.ts +++ b/packages/functions/src/utils/car.utils.ts @@ -116,4 +116,5 @@ export const tokenToIpfsMetadata = (token: Token) => ({ space: token.space, platform: KEY_NAME_TANGLE, uid: token.uid, + symbol: token.symbol.toUpperCase(), }); diff --git a/packages/functions/src/utils/token-minting-utils/foundry.utils.ts b/packages/functions/src/utils/token-minting-utils/foundry.utils.ts index 6bb8de810e..523c1342ed 100644 --- a/packages/functions/src/utils/token-minting-utils/foundry.utils.ts +++ b/packages/functions/src/utils/token-minting-utils/foundry.utils.ts @@ -74,7 +74,7 @@ export const tokenToFoundryMetadata = async (token: Token) => { logoUrl: 'ipfs://' + (token.ipfsMedia || PLACEHOLDER_CID), issuerName: KEY_NAME_TANGLE, build5Id: token.uid, - symbol: token.symbol.toLowerCase(), + symbol: token.symbol.toUpperCase(), decimals: token.decimals, }; }; diff --git a/packages/functions/test-tangle/token.mint/token.mint_1.spec.ts b/packages/functions/test-tangle/token.mint/token.mint_1.spec.ts index 5b1a941194..e6d0965a20 100644 --- a/packages/functions/test-tangle/token.mint/token.mint_1.spec.ts +++ b/packages/functions/test-tangle/token.mint/token.mint_1.spec.ts @@ -128,7 +128,7 @@ describe('Token minting', () => { expect(metadata.logoUrl).toBeDefined(); expect(metadata.issuerName).toBe(KEY_NAME_TANGLE); expect(metadata.build5Id).toBe(helper.token.uid); - expect(metadata.symbol).toBe(helper.token.symbol.toLowerCase()); + expect(metadata.symbol).toBe(helper.token.symbol.toUpperCase()); expect(metadata.decimals).toBe(5); }); });