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

Improve the address view #18

Closed
AlexITC opened this issue Jun 9, 2018 · 3 comments
Closed

Improve the address view #18

AlexITC opened this issue Jun 9, 2018 · 3 comments
Labels
server Changes required on the server project web-ui Changes required on the web-ui project

Comments

@AlexITC
Copy link
Collaborator

AlexITC commented Jun 9, 2018

The address view could be improved.

Expected behavior

The address view displays a summary of its balance and then, a paginated list with a summary for each transaction, the list is sorted from newest to oldest, it displays 10 items by default, example:
expected-address-view

Actual behavior

The address view displays the list of all the transactions which is slow and doesn't help too much because there are no details for the transactions:
address-view

Steps to reproduce the behavior

Go to https://xsnexplorer.io/addresses/Xx6bteTJSHkzF9v5vfedtWjZygXzhQNRqk

@AlexITC AlexITC added enhancement web-ui Changes required on the web-ui project server Changes required on the server project labels Jun 9, 2018
AlexITC added a commit that referenced this issue Jun 17, 2018
This is useful to retrieve transactions by address from the database,
part of #18.
AlexITC added a commit that referenced this issue Jun 17, 2018
…ataHandler

This is a piece for #18, we need to retrieve paginated transactions for a given
address.

NOTE: This commit doesn't include tests in order to work in the frontend
      concurrently, tests will be included before the release.
AlexITC added a commit that referenced this issue Jun 17, 2018
This is a piece for #18, it allow us to retrieve the transactions
for the given address.

NOTE: This commit doesn't include tests in order to work in the frontend
      concurrently, tests will be included before the release.
@AlexITC
Copy link
Collaborator Author

AlexITC commented Jun 23, 2018

The API side is ready, this is an example request with response:

➜  server git:(develop) ✗ http GET localhost:9000/addresses/XvNBN8xe5twNu1qLh2M7ZgkjRY9sEeXpCx/transactions limit==3 orderBy==received:desc
HTTP/1.1 200 OK

{
    "data": [
        {
            "blockhash": "59e80af3e04c597161e02fb2910c29b2fcc7bc4d8ece56583c9abc15616a36f8", 
            "id": "7ea61a229b598ae45b618d3a148760887e70d65000dfc73b49cf96d91825a918", 
            "received": 15000, 
            "sent": 0, 
            "size": 519, 
            "time": 1522809775
        }, 
        {
            "blockhash": "7a1e7c4be6b0b885e87935a24b250d6606444d42262b0eceedeedf64ed6434d7", 
            "id": "f33a48f3e1c2cb6f760d32d7db09ef077e4db1d47543abe2eb90ed33474887fc", 
            "received": 42.75, 
            "sent": 22.5, 
            "size": 234, 
            "time": 1526174028
        }, 
        {
            "blockhash": "244987e5695f50c078ff9ddcf30dd3c2ba7ff6d7810ec8a610216b72131291f0", 
            "id": "1be1c4748cf238233a92f9871574bad3023fad69cb77fba2477e2a8a849f9ce7", 
            "received": 22.5, 
            "sent": 0, 
            "size": 234, 
            "time": 1523090311
        }
    ], 
    "limit": 3, 
    "offset": 0, 
    "total": 88
}

AlexITC added a commit that referenced this issue Jun 24, 2018
Now it retrieves the address balance from the database
instead of the xsn server, this reduces the data because
now we get the balance only and the transactions are retrieved
with another endpoint.
mario128mex added a commit to mario128mex/block-explorer that referenced this issue Jun 24, 2018
transactions from the address are now retrieved separately, the address
model was chaged for the balance model, the transactions table now is
paginated and shows more info and now the view is mobile friendly
mario128mex added a commit to mario128mex/block-explorer that referenced this issue Jun 24, 2018
transactions from the address are now retrieved separately, the address
model was chaged for the balance model, the transactions table now is
paginated and shows more info and now the view is mobile friendly
@AlexITC
Copy link
Collaborator Author

AlexITC commented Jun 24, 2018

This has been resolved.

@AlexITC AlexITC closed this as completed Jun 24, 2018
@AlexITC
Copy link
Collaborator Author

AlexITC commented Jun 24, 2018

One thing that I forget to mention is that this depended on the addressindex which might be lost on the segwit update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Changes required on the server project web-ui Changes required on the web-ui project
Projects
None yet
Development

No branches or pull requests

2 participants
@AlexITC and others