rmrk-substrate icon indicating copy to clipboard operation
rmrk-substrate copied to clipboard

Equippables should handle additions/deletions (currently just overrides full list)

Open bmacer opened this issue 3 years ago • 2 comments

Currently the do_equippable function in rmrk-equip/src/functions.rs just overrides the equippables list. the rmrk-spec allows for + and - to add to (or remove from) existing equippable list. this should be implemented. https://github.com/rmrk-team/rmrk-substrate/blob/b576a1ed1b9159d29df4cfd47cb523d67efab86e/pallets/rmrk-equip/src/functions.rs#L252-L257

bmacer avatar Mar 17 '22 03:03 bmacer

I may give this a try, should we create new functions(add/remove equippable), or should we add a new argument that specifies if we want to add/remove an equippable? @bmacer

Szegoo avatar Oct 20 '22 16:10 Szegoo

I'd vote for adding separate extrinsics for equippable_add and equippable_remove, though the underlying do_equippable function could be written to handle all three of equippable, equippable_add and equippable_remove.

bmacer avatar Oct 20 '22 18:10 bmacer