Skip to content

Commit

Permalink
Fix Treasury Page in Kusama
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Sep 25, 2024
1 parent 4296d49 commit 4ae511d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/apps-routing/src/treasury.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function create (t: TFunction): Route {
Component,
display: {
needsApi: [
'tx.treasury.proposeSpend'
'tx.treasury.checkStatus'
]
},
group: 'governance',
Expand Down
8 changes: 4 additions & 4 deletions packages/page-treasury/src/Overview/ProposalCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import type { Option, u128 } from '@polkadot/types';

Check failure on line 4 in packages/page-treasury/src/Overview/ProposalCreate.tsx

View workflow job for this annotation

GitHub Actions / pr (lint)

Run autofix to sort these imports!
import type { Permill } from '@polkadot/types/interfaces';
import type { BN } from '@polkadot/util';
import { BN } from '@polkadot/util';

Check failure on line 6 in packages/page-treasury/src/Overview/ProposalCreate.tsx

View workflow job for this annotation

GitHub Actions / pr (lint)

'/home/runner/work/apps/apps/node_modules/@polkadot/util/index.js' imported multiple times

import React, { useMemo, useState } from 'react';

Expand All @@ -28,11 +28,11 @@ function Propose ({ className }: Props): React.ReactElement<Props> | null {

const [bondMin, bondMax, bondPercentage] = useMemo(
() => [
(api.consts.treasury.proposalBondMinimum as u128).toString(),
(api.consts.treasury.proposalBondMaximum as Option<u128>)?.isSome
api.consts.treasury.proposalBondMinimum ? (api.consts.treasury.proposalBondMinimum as u128).toString() : new BN(0),
api.consts.treasury.proposalBondMaximum && (api.consts.treasury.proposalBondMaximum as Option<u128>)?.isSome
? (api.consts.treasury.proposalBondMaximum as Option<u128>).unwrap().toString()
: null,
`${(api.consts.treasury.proposalBond as Permill).mul(BN_HUNDRED).div(BN_MILLION).toNumber().toFixed(2)}%`
api.consts.treasury.proposalBond ? `${(api.consts.treasury.proposalBond as Permill).mul(BN_HUNDRED).div(BN_MILLION).toNumber().toFixed(2)}%` : `0%`

Check failure on line 35 in packages/page-treasury/src/Overview/ProposalCreate.tsx

View workflow job for this annotation

GitHub Actions / pr (lint)

Strings must use singlequote
],
[api]
);
Expand Down

0 comments on commit 4ae511d

Please sign in to comment.