Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ap211unitech
Copy link
Member

πŸ“ Description

This PR aims to fix params for treasury spend method -

🧐 Previous Behavior

Earlier, When creating a preimage for a treasury.spend call, the GeneralIndex and Amount (AssetBalanceOf) fields are shown in DOT on Polkadot-JS UI, which can be confusing for proposal submitters.

image image

βœ… Current Behavior

  1. For treasury.spend, if proposal is for 100 USDT then GeneralIndex should be provided as 1984 and amount should be 100000000 (plancks unit)

Also, It fixes the bugs shown in this doc

image
  1. Also, For treasury.spendLocal, it will not expect amount in planck units. For example, If proposal is for 10.05 DOT, simply put 10.05 not 100500000000. It will be automatically compiled in planck units.
image image

Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Side note as discussed - we are going to add a placeholder text explaining what the positive number value should be - planck or non planck

@TarikGul TarikGul merged commit edf592c into master Feb 5, 2025
5 checks passed
@TarikGul TarikGul deleted the fix/treasury-spend-params branch February 5, 2025 13:18
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

3 participants