fix: make use of spendLocal in treasury (#11243)

* fix: make use of spendLocal and get rid of proposeSpend

* fix: fallback to proposeSpend if spendLocal is unavailable
This commit is contained in:
Arjun Porwal 2025-01-31 18:40:55 +05:30 committed by GitHub
parent 9acc59c15f
commit 385a8d8a02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 8 deletions

View File

@ -111,7 +111,7 @@ function Propose ({ className }: Props): React.ReactElement<Props> | null {
label={t('Submit proposal')}
onStart={toggleOpen}
params={[value, beneficiary]}
tx={api.tx.treasury.proposeSpend}
tx={api.tx.treasury.spendLocal ?? api.tx.treasury.proposeSpend}
/>
</Modal.Actions>
</Modal>

View File

@ -28,13 +28,9 @@ function Overview ({ className, isMember, members }: Props): React.ReactElement<
approvalCount={info?.approvals.length}
proposalCount={info?.proposals.length}
/>
{
api.tx.treasury.proposeSpend
? <Button.Group>
<ProposalCreate />
</Button.Group>
: <></>
}
<Button.Group>
<ProposalCreate />
</Button.Group>
<Proposals
isMember={isMember}
members={members}