mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
Remove a max supply record on collection's destruction (#11593)
* Remove a max supply record on collection's destruction * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_uniques --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/uniques/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
@@ -684,5 +684,13 @@ fn max_supply_should_work() {
|
||||
Uniques::mint(Origin::signed(user_id), collection_id, 2, user_id),
|
||||
Error::<Test>::MaxSupplyReached
|
||||
);
|
||||
|
||||
// validate we remove the CollectionMaxSupply record when we destroy the collection
|
||||
assert_ok!(Uniques::destroy(
|
||||
Origin::signed(user_id),
|
||||
collection_id,
|
||||
Collection::<Test>::get(collection_id).unwrap().destroy_witness()
|
||||
));
|
||||
assert!(!CollectionMaxSupply::<Test>::contains_key(collection_id));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user