Skip to content

Commit

Permalink
Simplify usemax
Browse files Browse the repository at this point in the history
  • Loading branch information
OGPoyraz committed Jan 8, 2025
1 parent 7478846 commit 63bf323
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions app/components/Views/confirmations/SendFlow/Amount/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,6 @@ class Amount extends PureComponent {
* Type of gas fee estimate provided by the gas fee controller.
*/
gasEstimateType: PropTypes.string,
/**
* Boolean that indicates if the max value mode is enabled
*/
maxValueMode: PropTypes.bool,
/**
* Function that sets the max value mode
*/
Expand Down Expand Up @@ -940,16 +936,11 @@ class Amount extends PureComponent {
conversionRate,
currentCurrency,
ticker,
maxValueMode: currentMaxValueMode,
setMaxValueMode,
} = this.props;
const { internalPrimaryCurrencyIsCrypto } = this.state;

if (useMax) {
setMaxValueMode(true);
} else if (currentMaxValueMode) {
setMaxValueMode(false);
}
setMaxValueMode(useMax ?? false)

Check warning on line 943 in app/components/Views/confirmations/SendFlow/Amount/index.js

View workflow job for this annotation

GitHub Actions / scripts (lint)

Missing semicolon

let inputValueConversion,
renderableInputValueConversion,
Expand Down Expand Up @@ -1579,7 +1570,6 @@ const mapStateToProps = (state, ownProps) => ({
),
swapsIsLive: swapsLivenessSelector(state),
chainId: selectChainId(state),
maxValueMode: state.transaction.maxValueMode,
});

const mapDispatchToProps = (dispatch) => ({
Expand Down

0 comments on commit 63bf323

Please sign in to comment.