-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Use RuntimeHoldReason for the NIS pallet HoldReason #7017
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to use RuntimeHoldReason
in the balances pallet.
/// The NIS Pallet has reserved it for a non-fungible receipt. | ||
#[codec(index = 0)] | ||
NftReceipt = 0, | ||
pub const NisHoldReason: RuntimeHoldReason = RuntimeHoldReason::Nis(pallet_nis::HoldReason::NftReceipt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need this for tests or?
So can we move it to the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's to make sure that the encoding didn't change before and after the code changes in this PR. In the future, it would probably be good to keep this around so that we don't accidentally change the encoding via modifying the composite_enum
attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, I misread. We do need this to configure the HoldReason
on the NIS pallet.
Partial paritytech/polkadot-sdk#236.
Removes the user-defined enums on the runtime source file and instead uses the macro-generated
RuntimeHoldReason
for the NIS pallet'sHoldReason
.