Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix activeTabUrl #2005

Merged
merged 6 commits into from
Nov 19, 2020
Merged

Fix activeTabUrl #2005

merged 6 commits into from
Nov 19, 2020

Conversation

rickycodes
Copy link
Member

@rickycodes rickycodes commented Nov 19, 2020

Description

Right now there's an issue in the TransactionHeader component where the url prop that's being passed is undefined:

image

This fixes that:

image

There might be a better fix? Maybe this component could use a refactor where it no longer requires as url prop? For now I think this is a good defensive patch.

Checklist

  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #???

@rickycodes rickycodes requested a review from a team as a code owner November 19, 2020 04:45
@rickycodes rickycodes added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Nov 19, 2020
@@ -549,6 +555,7 @@ class ApproveTransactionReview extends PureComponent {
primaryCurrency,
currentCurrency,
gasError,
activeTabUrl,
Copy link
Member Author

Choose a reason for hiding this comment

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

we were still trying to get it from component state instead of props

@rickycodes rickycodes changed the title Fix transaction header title Fix activeTabUrl Nov 19, 2020
@@ -10,7 +10,7 @@ exports[`ApproveTransactionModal should render correctly 1`] = `
}
}
accountsLength={1}
activeTabUrl=""
activeTabUrl="https://metamask.github.io/test-dapp/"
Copy link
Member Author

Choose a reason for hiding this comment

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

tests!

@@ -143,7 +143,7 @@ const TransactionHeader = props => {
let title = '';
if (originIsDeeplink) title = renderShortAddress(spenderAddress);
else if (originIsWalletConnect) title = getHost(origin.split(WALLET_CONNECT_ORIGIN)[1]);
else title = getHost(currentEnsName || url);
else title = getHost(currentEnsName || url || origin);
Copy link
Member Author

Choose a reason for hiding this comment

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

here we fall back to origin, but it's not really necessary (better than potentially showing undefined if this ever breaks again)

@ibrahimtaveras00 ibrahimtaveras00 added QA in Progress QA has started on the feature. and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Nov 19, 2020
@rickycodes rickycodes removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 19, 2020
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

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

QA Passed 👍

@ibrahimtaveras00 ibrahimtaveras00 added QA Passed A successful QA run through has been done and removed QA in Progress QA has started on the feature. labels Nov 19, 2020
@estebanmino estebanmino merged commit b37ff20 into develop Nov 19, 2020
@estebanmino estebanmino deleted the bugfix/fix-TransactionHeader-title branch November 19, 2020 18:22
rickycodes added a commit that referenced this pull request Jan 31, 2022
* Fix transaction header title

* Get activeTabUrl from props now

* Update tests

* Update CHANGELOG

* bump

* fixwcicon

Co-authored-by: Esteban Mino <efmino@uc.cl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Passed A successful QA run through has been done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants