From 9f8521a141b1ace2941d3aeebe4c2a35a8acc4fb Mon Sep 17 00:00:00 2001 From: WRadoslaw Date: Wed, 11 Oct 2023 11:17:53 +0200 Subject: [PATCH] Fix perquintill values --- packages/atlas/src/joystream-lib/extrinsics.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/atlas/src/joystream-lib/extrinsics.ts b/packages/atlas/src/joystream-lib/extrinsics.ts index d1865798b1..e1f0217c06 100644 --- a/packages/atlas/src/joystream-lib/extrinsics.ts +++ b/packages/atlas/src/joystream-lib/extrinsics.ts @@ -72,6 +72,7 @@ type PublicExtrinsic = TxFunction extends (...a: infer : never const PERMILLS_PER_PERCENTAGE = 10 +const PERQUINTILLS_PER_PERCENTAGE = 100 export class JoystreamLibExtrinsics { readonly api: PolkadotApi @@ -1136,7 +1137,7 @@ export class JoystreamLibExtrinsics { const params = createType('PalletProjectTokenTokenIssuanceParameters', { initialAllocation, - patronageRate: createType('Perquintill', patronageRate * PERMILLS_PER_PERCENTAGE) as number, + patronageRate: createType('Perquintill', patronageRate * PERQUINTILLS_PER_PERCENTAGE) as number, revenueSplitRate: createType('Permill', revenueSplitRate * PERMILLS_PER_PERCENTAGE) as number, transferPolicy: createType('PalletProjectTokenTransferPolicyParams', 'Permissionless'), metadata: prepareCreatorTokenMetadata({ symbol }),