I'm integrating my own pallet with Substrate's NFTs pallet. In my logic I try to create a collection with specific settings as follows:
let nft_collection_id = <T as Config<I>>::Nfts::create_collection(
&who,
&who,
&CollectionConfig {
settings: CollectionSettings::from_disabled(
CollectionSetting::TransferableItems | CollectionSetting::DepositRequired
),
max_supply: None,
mint_settings: MintSettings::default(),
},
)?;
This results in the error WrongSetting
. I can say that the error is caused by DepositRequired
, since everything works if I remove this setting. So I'm having a hard time trying to understand why I'm getting this error.
In the a test of the Nfts pallet itself a very similar thing is done:
let collection_id = 1;
assert_ok!(Nfts::force_create(
RuntimeOrigin::root(),
account(1),
collection_config_from_disabled_settings(
CollectionSetting::TransferableItems | CollectionSetting::DepositRequired
)
));
The only difference is that I'm using create_collection
instead of force_create
. Is that the reason why I'm getting this error?