-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Live update transactions and overview on address page #333
Live update transactions and overview on address page #333
Conversation
import $ from 'jquery' | ||
import socket from '../socket' | ||
|
||
if (window.page === 'address') { |
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.
Maybe we could use something to control this page scope, something like https://www.npmjs.com/package/@lucasmazza/page ? WDYT?
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.
Nice find, we'll take a look!
We've decided to add some code to this to handle missed messages and also to handle when a large quantity of transactions comes in at once. I marked it WIP for now, we'll let everyone know when it is ready again for review. |
a728ea3
to
7e7e187
Compare
90e5594
to
0e45905
Compare
f65500e
to
1d98b02
Compare
This is no longer WIP, would you mind reviewing @amandasposito or @igorffs? |
891b6ca
to
b2db49f
Compare
@@ -6,7 +6,7 @@ defmodule ExplorerWeb.AddressInternalTransactionController do | |||
use ExplorerWeb, :controller | |||
|
|||
import ExplorerWeb.AddressController, only: [transaction_count: 1] | |||
import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 2, split_list_by_page: 1] | |||
import ExplorerWeb.Chain, only: [paging_options: 1, next_page_params: 3, split_list_by_page: 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.
why did the number change to 3? 🤔
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.
we had to send in the existing params so that we can append them (so we maintain existing params like filter), thus the arity increased to 3
Co-authored-by: Stamates <stamates@hotmail.com> Co-authored-by: Tim Mecklem <timothy@mecklem.com>
Co-authored-by: Tim Mecklem <timothy@mecklem.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
Co-authored-by: Stamates <stamates@hotmail.com>
b2db49f
to
5281dcb
Compare
Resolves #30
Resolves #31
Motivation
Adds channel setup to handle live update rendering of new transactions and balance updates on the address page to prepare for when the backend pub/sub is in place.
Changelog
Enhancements
Notes
This is only a stubbed out implementation and will require the following process to test:
iex -S mix phx.server
0xe2ac1c6843a33f81ae4935e5ef1277a392990381
address page (transactions tab)iex>
promptCode for testing live update of transactions
Code for testing live update of overview (Note: this will change stored balance for the addresss)