-
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
Add transaction status indicator #412
Conversation
@SiddigZeidan a little spacing there looks nice |
) %> | ||
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start text-md-right"> | ||
<span class="tile-title"> | ||
<%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA |
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.
POA
should be localized.
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.
Good catch! Updated this in the last push!
to: block_path(@conn, :show, @conn.assigns.locale, transaction.block) | ||
) %> | ||
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start text-md-right"> | ||
<span class="tile-title"><%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> POA</span> |
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.
POA
should be localized.
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.
This one too!
0c36582
to
c3db585
Compare
<%= if @address.hash == @transaction.from_address_hash do %> | ||
<span class="badge badge-danger tile-badge">Out</span> | ||
<% else %> | ||
<span class="badge badge-success tile-badge">In</span> |
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.
Out
and In
need gettext
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.
In
is IN
in address_internal_transaction/_internal_transaction.html.eex
, the capitalization should be consistent across templates.
) %> | ||
<div class="col-md-3 col-lg-2 d-flex flex-row flex-md-column justify-content-start align-items-end text-md-right"> | ||
<span class="tile-title"> | ||
<%= ExplorerWeb.TransactionView.value(@transaction, include_label: false) %> POA |
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.
POA
needs gettext
@@ -13,5 +13,6 @@ defmodule ExplorerWeb.AddressTransactionView do | |||
end | |||
end | |||
|
|||
defdelegate formatted_status(transaction), to: TransactionView |
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.
In some places we've been using defdelegate
and in others we've been using fully qualified function names in the template ExplorerWeb.TransactionView.formatted_status(
. I personally prefer the fully qualified names in the template because it seems more explicit but am fine with defdelegate
if that is what others prefer. @KronicDeth @alexgaribay @igorffs thoughts?
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.
@jimmay5469, I think you meant @igorffs
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.
I prefer the full call or to call the function directly in the template.
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.
I prefer full call. Less magic, more explicit.
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.
This has been fixed @KronicDeth @alexgaribay @jimmay5469 @acravenho
resolves #368
resolves #400
Motivation
Visually show the current status of a given transaction. Current statuses are Success, Pending, Failed and Out of Gas. Failed and Out of Gas transactions are given a colored border to call attention to them. Transaction statuses will also live update as blocks are validated.
Changelog
Enhancements
Screenshots