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

account.get_utxo pagination #1436

Merged
merged 125 commits into from
Apr 16, 2020
Merged

account.get_utxo pagination #1436

merged 125 commits into from
Apr 16, 2020

Conversation

jarindr
Copy link
Contributor

@jarindr jarindr commented Mar 26, 2020

#1274

Overview

Add pagination for account.get_utxos

Changes

Describe your changes and implementation choices. More details make PRs easier to review.

  • change account.get_utxo to accept page and limit
  • add cabbage test for watcher_info_api
  • update make file to help running cabbage test easier
  • refactor validator to reuse the same reduce functions

Testing

  • added unit test for validator
  • added cabbage test for watcher_info_api

@jarindr jarindr requested a review from InoMurko April 7, 2020 19:53
Makefile Outdated Show resolved Hide resolved
apps/omg_watcher/test/support/watcher_helper.ex Outdated Show resolved Hide resolved
apps/omg_watcher_info/lib/omg_watcher_info/api/account.ex Outdated Show resolved Hide resolved

Repo.all(query)
@spec get_utxos(keyword) :: OMG.Utils.Paginator.t()
def get_utxos(params) do
Copy link
Contributor

Choose a reason for hiding this comment

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

Very clean refactor. I like!

# See the License for the specific language governing permissions and
# limitations under the License.

defmodule OMG.WatcherRPC.Web.Validator.AccountConstraints do
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Thank you!

@@ -0,0 +1,5 @@
Feature: Watcher info

Scenario: Alice want to use watcher info api
Copy link
Contributor

Choose a reason for hiding this comment

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

Not updated yet I think, so un-resolving...

@jarindr jarindr merged commit 4389bce into master Apr 16, 2020
@jarindr jarindr deleted the ddos-account-utxo branch April 16, 2020 22:03
@unnawut unnawut added api API-level issues enhancement New feature or request labels Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API-level issues enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants