Skip to content

Remove unused transaction base props#10295

Merged
Gudahtt merged 2 commits intodevelopfrom
remove-unused-transaction-base-props
Jan 28, 2021
Merged

Remove unused transaction base props#10295
Gudahtt merged 2 commits intodevelopfrom
remove-unused-transaction-base-props

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Jan 27, 2021

These props were never given. They have been removed to simplify the component.

@Gudahtt Gudahtt requested a review from a team as a code owner January 27, 2021 15:44
@Gudahtt Gudahtt requested a review from brad-decker January 27, 2021 15:44
These props were never given. They have been removed to simplify the
component.
@Gudahtt Gudahtt force-pushed the remove-unused-transaction-base-props branch from 106e514 to eef7dd8 Compare January 27, 2021 16:37
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [eef7dd8]
Page Load Metrics (674 ± 45 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint4412167178
domContentLoaded3827806719546
load3877856749445
domInteractive3827796719546

@@ -19,7 +19,6 @@ export default class ConfirmPageContainerContent extends Component {
assetImage: PropTypes.string,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to add review and comments file by file, to ensure my own thinking is good.

nonce={nonce}
assetImage={assetImage}
/>
{this.renderContent()}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file looks good. ConfirmPageContainerContent is only used in ConfirmPageContainer, which is only used in ConfirmTransactionBase, the instances of which are never passed a summary component.

summaryComponent={summaryComponent}
detailsComponent={detailsComponent}
dataComponent={dataComponent}
errorMessage={errorMessage}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: PropTypes.string,
advancedInlineGasShown: PropTypes.bool,
insufficientBalance: PropTypes.bool,
hideFiatConversion: PropTypes.bool,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes to here in this file look good. I verified that none of these properties are passed to any of the instances of ConfrimTransactionBaseComponent

</div>
) : null}
</div>
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above big group of changes is just indentation change

action={functionType}
title={title}
titleComponent={this.renderTitleComponent()}
subtitle={subtitle}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think subtitle can be removed from ConfirmPageContainer and down through the component tree, as was done with summaryComponent

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Removed in 3b7176a

disabled={!valid || submitting}
onEdit={() => this.handleEdit()}
onCancelAll={() => this.handleCancelAll()}
onCancel={() => this.handleCancel()}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file looks good

Copy link
Copy Markdown
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one suggested change: https://github.com/MetaMask/metamask-extension/pull/10295/files#r566221054

looks good otherwise

brad-decker
brad-decker previously approved these changes Jan 28, 2021
Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [3b7176a]
Page Load Metrics (826 ± 66 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint5411676168
domContentLoaded656118582513666
load657118782613766
domInteractive656118582413665

Copy link
Copy Markdown
Contributor

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM

Copy link
Copy Markdown
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Gudahtt Gudahtt merged commit ecff9df into develop Jan 28, 2021
@Gudahtt Gudahtt deleted the remove-unused-transaction-base-props branch January 28, 2021 17:17
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants