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

admin: Add Accounts. #441

Merged
merged 2 commits into from
Jun 8, 2020
Merged

admin: Add Accounts. #441

merged 2 commits into from
Jun 8, 2020

Conversation

JoeGruffins
Copy link
Member

In order to view account data in the database, add an api enpoint to the
admin server that retrieves all accounts and returns a slice of
accounts. Byte arrays are encoded in hex for readability.

part of #329

@JoeGruffins JoeGruffins marked this pull request as ready for review June 3, 2020 08:35
server/db/driver/pg/accounts.go Outdated Show resolved Hide resolved
server/db/types.go Outdated Show resolved Hide resolved
server/db/types.go Outdated Show resolved Hide resolved
server/admin/api.go Show resolved Hide resolved
In order to view account data in the database, add an api enpoint to the
admin server that retrieves all accounts and returns a slice of
accounts. Byte arrays are encoded in hex for readability.
@JoeGruffins JoeGruffins force-pushed the adminaccounts branch 3 times, most recently from 890a91e to 817e827 Compare June 5, 2020 03:28
Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

Looks good and working:

$  dexadm accounts
[
    {
        "accountid": "93e6566e0c4c5c3ac03514fe532f494a7a71b392031c462087bb8c511d532149",
        "pubkey": "0282c421175228136a9f9ed42e7fa63ce4f33900eca27ea1d4675c56e8675b01bf",
        "feeaddress": "SsonWQK6xkLSYm7VttCddHWkWWhETFMdR4Y",
        "feecoin": "f680451275ce09feecb9cc21d829e6e5eeb966dc2c57360f91696ac80742e88a00000000",
        "brokenrule": 0
    }
]

Suggestions for future work:

  • and endpoint account/{accountid}
  • active order count (just the count) and active swaps list (match IDs)
  • maybe further details in endpoints like account/{accountid}/swaps

@chappjc chappjc merged commit 3161c48 into decred:master Jun 8, 2020
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.

None yet

2 participants