Skip to content
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

Additional filters support in my_recent_swaps #784. #796

Merged
merged 13 commits into from
Jan 28, 2021

Conversation

artemii235
Copy link
Member

Achieved by using SQLite database - swaps JSON data are indexed into it. The matching uuids are selected on the my_recent_swaps request, swaps data is read from JSON files and then returned as a response.

Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are only questions and suggestions. Could you please answer them?

mm2src/database/my_swaps.rs Outdated Show resolved Hide resolved
mm2src/database.rs Outdated Show resolved Hide resolved
mm2src/database/my_swaps.rs Show resolved Hide resolved
Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve this :)

@artemii235 artemii235 requested a review from tonymorony January 27, 2021 12:05
@artemii235
Copy link
Member Author

@tonymorony Can you give it a test, please? 🙂 New params are documented in this PR: https://github.com/KomodoPlatform/developer-docs/pull/235/files

@tonymorony
Copy link

my observations so far: https://gist.github.com/tonymorony/3c7a996a1be5c3b925f387d4bc30f6f6

was not able to use timestamp filter - probably I'm doing something wrong?

@artemii235
Copy link
Member Author

@tonymorony

"{\"userpass\":\"$userpass\",\"method\":\"my_recent_swaps\",\"page_number\": 1,\"my_coin\":\"KMD\",\"other_coin\":\"DEX\",\"from_timestamp\":1589167498624}"

The from/to_timestamp params must be timestamps in seconds. I have updated the docs to make it more clear and fix the error - the string type was set for these params.

I will set the default page_number:1 for the case when both from_uuid and page_number are not set.

tonymorony
tonymorony previously approved these changes Jan 28, 2021
Copy link

@tonymorony tonymorony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

when page_number and from_uuid are not set in request.
@artemii235 artemii235 dismissed stale reviews from tonymorony and sergeyboyko0791 via 35cb867 January 28, 2021 09:21
@tonymorony
Copy link

@tonymorony

"{\"userpass\":\"$userpass\",\"method\":\"my_recent_swaps\",\"page_number\": 1,\"my_coin\":\"KMD\",\"other_coin\":\"DEX\",\"from_timestamp\":1589167498624}"

The from/to_timestamp params must be timestamps in seconds. I have updated the docs to make it more clear and fix the error - the string type was set for these params.

I will set the default page_number:1 for the case when both from_uuid and page_number are not set.

thanks! it might be worth reflecting page_number default value in KomodoPlatform/developer-docs#235

@tonymorony tonymorony self-requested a review January 28, 2021 10:35
@artemii235
Copy link
Member Author

it might be worth reflecting page_number default value in KomodoPlatform/developer-docs#235

Done: KomodoPlatform/developer-docs@3cd848f

Thank you @sergeyboyko0791 for the review and @tonymorony for testing! I merge this PR now 🙂

@artemii235 artemii235 merged commit 9d9cd70 into mm2.1 Jan 28, 2021
@artemii235 artemii235 deleted the mm2.1-swaps-history-filtering branch January 28, 2021 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants