Skip to content

Commit

Permalink
Fix perquintill values
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Oct 11, 2023
1 parent a5d23ce commit 9f8521a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/atlas/src/joystream-lib/extrinsics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type PublicExtrinsic<TxFunction, ReturnValue> = TxFunction extends (...a: infer
: never

const PERMILLS_PER_PERCENTAGE = 10
const PERQUINTILLS_PER_PERCENTAGE = 100

export class JoystreamLibExtrinsics {
readonly api: PolkadotApi
Expand Down Expand Up @@ -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 }),
Expand Down

0 comments on commit 9f8521a

Please sign in to comment.