Skip to content

Commit

Permalink
updates ContactForm.scss FullHeightPanel.scss and Send.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
comountainclimber committed Nov 12, 2018
1 parent fc7eaaf commit fba836d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/components/Contacts/ContactForm/ContactForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@

.submitButton {
margin-top: auto;
margin-bottom: 50px;
margin-bottom: 26px;
}
}
2 changes: 1 addition & 1 deletion app/components/Panel/FullHeightPanel/FullHeightPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

.instructions {
border-bottom: solid thin var(--panel-full-height-instructions-border);
margin-bottom: 40px;
margin-bottom: 30px;
margin-top: 40px;
padding-bottom: 5px;
width: 500px;
Expand Down
19 changes: 11 additions & 8 deletions app/containers/Send/Send.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,18 @@ export default class Send extends React.Component<Props, State> {

calculateMaxValue = (asset: string, index: number = 0) => {
const { sendableAssets } = this.props
const rows = [...this.state.sendRowDetails]
const rowsWithAsset = rows.filter(row => row.asset === asset)
const existingAmounts = this.calculateRowAmounts(asset, index)
const decimals = this.calculateDecimals(asset)
const totalSendableAssets = toBigNumber(sendableAssets[asset].balance)
if (rowsWithAsset.length === 1 || rowsWithAsset.length === 0) {
return toNumber(sendableAssets[asset].balance).toFixed(decimals)
if (sendableAssets[asset]) {
const rows = [...this.state.sendRowDetails]
const rowsWithAsset = rows.filter(row => row.asset === asset)
const existingAmounts = this.calculateRowAmounts(asset, index)
const decimals = this.calculateDecimals(asset)
const totalSendableAssets = toBigNumber(sendableAssets[asset].balance)
if (rowsWithAsset.length === 1 || rowsWithAsset.length === 0) {
return toNumber(sendableAssets[asset].balance).toFixed(decimals)
}
return minusNumber(totalSendableAssets, existingAmounts).toFixed(decimals)
}
return minusNumber(totalSendableAssets, existingAmounts).toFixed(decimals)
return '0'
}

calculateRowAmounts = (asset: string, index: number) => {
Expand Down

0 comments on commit fba836d

Please sign in to comment.