Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Uniques: Reset approved account after transfer #12145

Merged

Conversation

Szegoo
Copy link
Contributor

@Szegoo Szegoo commented Aug 30, 2022

Currently, the approved account of an item doesn't get reset to None after each transfer. This can cause a problem because it is possible for the owner of the item to approve an item to his other account and after transferring the item he can claim it back.

Polkadot address: 126X27SbhrV19mBFawys3ovkyBS87SGfYwtwa8J2FjHrtbmA

frame/uniques/src/tests.rs Show resolved Hide resolved
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@shawntabrizi shawntabrizi added B7-runtimenoteworthy C1-low PR touches the given topic and has a low impact on builders. D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Aug 30, 2022
frame/uniques/src/lib.rs Outdated Show resolved Hide resolved
Szegoo and others added 3 commits August 30, 2022 15:57
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
@Szegoo Szegoo requested a review from KiChjang August 30, 2022 14:29
@redzsina redzsina added D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited and removed D9-needsaudit 👮 PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Aug 31, 2022
@shawntabrizi
Copy link
Member

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 6fbcc57 into paritytech:master Sep 1, 2022
@shawntabrizi
Copy link
Member

@Szegoo if you would like a tip, please include your polkadot address in your PR description

@Szegoo
Copy link
Contributor Author

Szegoo commented Sep 1, 2022

@Szegoo if you would like a tip, please include your polkadot address in your PR description

I have added my address, thanks.

@kianenigma
Copy link
Contributor

/tip small

@substrate-tip-bot
Copy link

@kianenigma A small tip was successfully submitted for Szegoo (126X27SbhrV19mBFawys3ovkyBS87SGfYwtwa8J2FjHrtbmA on polkadot).

https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/treasury/tips

ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* reset approved account

* wrap at 100

* doc

* fmt

* Update frame/uniques/src/tests.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* new test

* Update frame/uniques/src/lib.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* fmt

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C1-low PR touches the given topic and has a low impact on builders. D1-audited 👍 PR contains changes to fund-managing logic that has been properly reviewed and externally audited
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants