Description
The current version of BNS-v2 has re-uses the same logic for internally shifting the primary name of a user multiple times, it should be extracted out into it's own private function:
(if (is-eq (some id) owner-primary-name)
;; If the is is the primary name, then check if there are other names owned by the user
(match (element-at? (filter is-not-removeable all-nfts-owned-by-owner) u0)
next-name
;; If the user does have more names then set it to the index0 name
(map-set primary-name owner next-name)
;; If the user doesn't have more names then delete the primary-name map associated to that user
(map-delete primary-name owner)
)
;; If it is not equal then do nothing
false
)
Action Items
[x] Create a new private 'shift-primary-name' (or similar name ) function that replaces every instance of the above.
Description The current version of BNS-v2 has re-uses the same logic for internally shifting the primary name of a user multiple times, it should be extracted out into it's own private function:
Action Items
Open Questions