Commit 05da6d8e authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

HoldReason: Improve usage (#13869)



* HoldReason: Improve usage

`HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums
from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the
variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason`
from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as
type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the
pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`.

* Update frame/nis/src/lib.rs

Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>

* Review comment

* Fixes

---------

Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
parent 5bf4ff56
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment