-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Misc small UI fixes (recently broken) #2101
Conversation
It looks like this contributor signed our Contributor License Agreement. 👍 Many thanks, Ethcore CLA Bot |
.filter((token) => token.value.gt(0)) | ||
.map((balance, idx) => { | ||
const token = balance.token; | ||
const isEth = idx === 0; |
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.
😕 Isn't there a more robust way?
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.
Well, yes, find(). However the way it is setup is that ETH is always in the first position. It needs to show up first where displayed. If we move away from having it in a fixed position, then display also becomes a sorting issue. So order is -
- position 0: ETH (native network balance)
- position 1..n: Tokens
@@ -86,12 +85,12 @@ class Transfer extends Component { | |||
render () { | |||
const { stage, extras } = this.state; | |||
|
|||
// title={ this.renderAccount() } |
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.
remove?
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.
Not yet. It may need to come back since it is the account in the header - not quite sure yet if the icon on the button only is sufficient.
@@ -501,7 +501,7 @@ class Transfer extends Component { | |||
const { gas, gasPrice, tag, valueAll, isEth } = this.state; | |||
const gasTotal = new BigNumber(gasPrice || 0).mul(new BigNumber(gas || 0)); | |||
const balance_ = balance.tokens.find((b) => tag === b.token.tag); | |||
const availableEth = new BigNumber(balance_.value); | |||
const availableEth = new BigNumber(balance.tokens[0].value); |
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.
Like #r79015673: Is there a more robust way?
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.
As above.
# Conflicts: # js/src/ui/IdentityIcon/identityIcon.js
* js: (40 commits) Added docs check for existence of deprecated ethash file before attempting delete (#2103) check response.ok, throw Error array for classlist .map -> .forEach fix wording rename fundAccount to shapeshift use shapeshift ison & name fix typo Import summary removed etherscan logo, doesn't belong in this branch slightly more presentable UI... fix PropTypes as received pass correct result through to callback busy shifting flag treat coin changes properly update coin message slightly remove debug for no coins available 3 decimal places, display is unwieldly remove testing price info as well ...
* jg-etherscan-logo: Added docs fix grumble Import summary transaction list powered by
A number of small (mostly) one-liners for where issues have recently cropped up -