Itheum / data-dex

DApp with suite of web3 tools to trade personal data on MultiversX
https://datadex.itheum.io
GNU General Public License v3.0
466 stars 6 forks source link

SC should not check Data Steam URL length #360

Closed damienen closed 1 year ago

damienen commented 1 year ago

As it is encrypted it is often very long, but the unencrypted value is not so big. This change should probably be moved into the data marshal (it is also already implemented in FE). This causes issues such as these:

https://devnet-explorer.multiversx.com/transactions/3cbbecc15b949fa5887c80df9f7def55a428d71932109eb30ac3f7f5aab32aab#smart

The normal URL was around 150 chars, but the encrypted one is 320 so the mint fails.

bucurdavid commented 1 year ago

Fair enough for me

bucurdavid commented 1 year ago

Implemented #360

damienen commented 1 year ago

Cool. Closing.

newbreedofgeek commented 1 year ago

@damienen @bucurdavid SC change has removed the check for other URLs. This is wrong.

This should ONLY apply to Data Stream URL. reopening

bucurdavid commented 1 year ago

Changed only to Data Stream URL

damienen commented 1 year ago

@newbreedofgeek Please update SC

damienen commented 1 year ago

This has been solved. Closing

fuzzyduke commented 1 year ago

Issue with minting long URL seen again

https://devnet-explorer.multiversx.com/transactions/7f6785e45be85ee6fb616fea78eab218debe465128d569f125cd35544a3f1bc2

image

bucurdavid commented 1 year ago

This is due to title or description being too long.

require!(title.len() <= 30, ERR_TOO_MANY_CHARS);
require!(description.len() <= 400, ERR_TOO_MANY_CHARS);

Current implementation:

Maybe FE didn't catch the title length. @damienen

Enciusan commented 1 year ago

Yes here is a problem in FE, the validation was for 50 max chars for title. I will fix the validator there.

damienen commented 1 year ago

Solved. Closing.