-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev votes user #48
Dev votes user #48
Conversation
55a957d
to
ebb09ef
Compare
Hi @grunch i did some some work and I think via have a minimal functional starting point. I added a vote command on CLI side and the needed struct in mostro-core. Basically now after a successful trade bueyer and seller can vote each other the votes are marked in the db so they can just give one vote for a specific order id and counterpart. To compile in a clean way we need to update mostro core and maybe bump version and as I told you I add a github dep in cargo.toml to avoid an error caused by bitcoin-hashes lib ( thanks to @yukibtc ). Another point in my mind is that it could be nice to know if the relay we are working supports nip33...but maybe just getting the newer event is enogh. Waiting for your comments and ready to help for merging and compiling. |
@@ -0,0 +1,45 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This helps the project in any way or this is only for your IDE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it went in the commit...it's just the debugger config...throw away!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix now...ten minutes and i push the new commit
Cargo.toml
Outdated
@@ -38,4 +39,4 @@ reqwest = { version = "0.11", features = ["json"] } | |||
mostro-core = "0.1.8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merged core, you can now update to mostro core 0.2.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we add changes to database and/or add new functions that interact with the database we have to run
cargo sqlx prepare
which updatesqlx-data.json
, this is needed to pass github tests
We have to definitively add to yaml file to automate the process..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job, just a few changes to merge
When we add changes to database and/or add new functions that interact with the database we have to run |
6c32252
to
5c2c215
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @grunch
this is really a draft, not compiling a still missing things. The idea is to send notification to buyer/seller after a successful trade is done. Here the line:
https://github.com/arkanoider/mostro/blob/699c4999c8c977edf80a10ecb99398413a694b46/src/app/release.rs#L108
Here the messages:
https://github.com/arkanoider/mostro/blob/699c4999c8c977edf80a10ecb99398413a694b46/src/util.rs#L331
I send the order as content so client can get the info they need and a new action vote.
When buyer/seller receive it they will send a new command vote with:
Mostro will receive a new action vote and start updating process:
In my mind this is the starting point for the Action::Vote when mostro receive the message:
https://github.com/arkanoider/mostro/blob/699c4999c8c977edf80a10ecb99398413a694b46/src/app/vote_user.rs#L125
Still a bit messy...but you guys can give a look and tell me if you had any doubts!
Thanks for your patience!