MostroP2P / mostro-core

common types used by mostro and clients
https://mostro.network
MIT License
6 stars 7 forks source link

Additions to have dispute tokens #61

Closed arkanoider closed 1 month ago

arkanoider commented 1 month ago

Hi @grunch , @Catrya

added some data in structs SmallOrder and in Peer enum to have the dispute tokens. Simply a quick implementation, maybe we can do it better. Looking here seems that tokens are not saved on a db, so I did a quick generation of random number in the u16 range and sent the message to buyer, seller and admin who takes dispute. Messages are sent when admin takes the dispute, don't know if this is the desired behaviour and maybe we need to send messages when dispute is opened.

Let me know.

Did not test now because I will be AFK til the evening now.

Catrya commented 1 month ago

maybe we need to send messages when dispute is opened.

Yes, the buyer and seller must know their dispute token when the dispute is opened, so that in case an admin impersonator writes to them, they ask for the token and they know that it is a scammer because they will not be able to give it to them.