-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
Also thought about using a non-linear scale to visualise the change of a tx getting rejected by the network properly. |
const { data } = this.props; | ||
|
||
let shortened = data.toLowerCase(); | ||
if (shortened[0] === '0' && shortened[1] === 'x') { |
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.
any reason for not just checking shortened.substr(0, 2) === '0x'
(as done everywhere else - consistency so we don't need to think about how xyz does it)
if (confirmations.gt(maxConfirmations)) { | ||
count = confirmations.toFormat(0); | ||
} else { | ||
count = confirmations.toFormat(0) + '/' + maxConfirmations; |
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.
ES6 string 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.
You will always be able to argue with the point of consistency and I agree that it is important. Readable code is more important though imo.
I find
foo + '/' + bar
a lot less noisy than
`${a}/${b}`
Will adapt to whatever you decide, but keep this in mind.
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 would be balances between the two of you. IMO:
count = `${confirmations}/${maxConfirmations}`
and
count = confirmations.toFormat(0) + `/${maxConfirmations}`
Ie. if just variables, then string template, if returned value of method, +
concat.
Good, right step. Like you suggested, would probably just fix up the Signer display a little bit so it looks presentable. (Alternatively just log an issue for it, I have all the Signer items in my queue, so busy reworking the full display & adding the required additional functionality) |
I'd propose to have a different way of showing that a TX is confirmed/rejected/pending. Just putting it in a column the importance of the information. I suggest we decide on a new look for the Signer as a group. Until that happened, I'll center the "Rejected"/"12 Confirmations" messages. |
Something looks weird here - it contains files from other PRs, not sure what was done here and what not. |
This PR makes
TxHash
look a lot less verbose, aligning the UI more with targeted user group. Advanced users still get the block number when hovering.I added a new
ui/Hash
ui/ShortenedHash
component, which is supposed to be put in every place where a tx hash is shown. Will also expand this to address hashes.Except the obvious changes, there is a small visual regression in this PR: The tx hash in the Signer is now so short that the left-alignment of the text is visible.