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

modified transaction complete popup #16300

Merged
merged 4 commits into from
Jan 4, 2023
Merged

Conversation

adnansahovic
Copy link
Contributor

@adnansahovic adnansahovic commented Oct 28, 2022

Explanation

Changed the text on popup after the completion of transaction

More Information

Screenshots/Screencaps

Before

188907813-0c312e2a-10ca-4d1e-95da-d1c6b9a90269

After

Screenshot 2022-10-28 at 16 05 10

Manual Testing Steps

  1. Make a transaction on any chain except ethereum
  2. You'll get a popup after the completion of transaction

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@adnansahovic adnansahovic force-pushed the transaction-complete-popup branch from 127df80 to 827410d Compare October 31, 2022 10:01
@metamaskbot
Copy link
Collaborator

Builds ready [827410d]
Page Load Metrics (2169 ± 88 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint92140110136
domContentLoaded17262459215518288
load17262460216918388
domInteractive17262459215518288

@mirjanaKukic
Copy link
Contributor

Verified by QA

@adnansahovic adnansahovic force-pushed the transaction-complete-popup branch from 12de561 to 478b8ef Compare October 31, 2022 14:18
@metamaskbot
Copy link
Collaborator

Builds ready [478b8ef]
Page Load Metrics (2083 ± 81 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint90141104136
domContentLoaded17222357207416378
load17222357208316981
domInteractive17222357207416378

@adnansahovic adnansahovic marked this pull request as ready for review November 3, 2022 10:29
@adnansahovic adnansahovic requested a review from a team as a code owner November 3, 2022 10:29
@adnansahovic adnansahovic force-pushed the transaction-complete-popup branch from 478b8ef to b23803b Compare November 15, 2022 12:56
@metamaskbot
Copy link
Collaborator

Builds ready [b23803b]
Page Load Metrics (1993 ± 107 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint87159104157
domContentLoaded154426131977226108
load154426131993224107
domInteractive154426131977226108
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 bytes
  • ui: 0 bytes
  • common: 279 bytes

brad-decker
brad-decker previously approved these changes Nov 21, 2022
@brad-decker
Copy link
Contributor

@adnansahovic needs a rebase.

deleted upperCase function

deleted replaceAll

fixed lint
@adnansahovic adnansahovic force-pushed the transaction-complete-popup branch from 0a6fcec to e5d14a2 Compare November 22, 2022 14:34
@metamaskbot
Copy link
Collaborator

Builds ready [e5d14a2]
Page Load Metrics (2572 ± 259 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint9999218018890
domContentLoaded192341762562521250
load192342562572539259
domInteractive192341762562521250
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 bytes
  • ui: 0 bytes
  • common: 279 bytes

@adnansahovic
Copy link
Contributor Author

@adnansahovic needs a rebase.

Hi @brad-decker, Done.

@@ -160,10 +162,11 @@ export default class ExtensionPlatform {

const url = getBlockExplorerLink(txMeta, rpcPrefs);
const nonce = parseInt(txMeta.txParams.nonce, 16);
const view = getURLHostName(url).replace(/([.]\w+)$/u, '');
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Is this way of deriving view name from URL good enough ?
  • startCase(toLower(view)) this conversion can also be probably done here.

@metamaskbot
Copy link
Collaborator

Builds ready [cc5f3b8]
Page Load Metrics (2355 ± 152 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1002014249408196
domContentLoaded178630362340316152
load187030362355317152
domInteractive178630362340316152
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 bytes
  • ui: 0 bytes
  • common: 279 bytes

@@ -160,10 +162,13 @@ export default class ExtensionPlatform {

const url = getBlockExplorerLink(txMeta, rpcPrefs);
const nonce = parseInt(txMeta.txParams.nonce, 16);
const view = startCase(
toLower(getURLHostName(url).replace(/([.]\w+)$/u, '')),
Copy link
Contributor

Choose a reason for hiding this comment

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

I have to agree with @jpuri on this one. Your screenshot for Mumbai PolygonScan makes it appear that this works with subdomains (mumbai) but then Ehterscan would have a 'www' proceeding it? And if I do a naive assertion on this regex statement in console:

const y = new URL('https://mumbai.polygonscan.com/');
> undefined
y.hostname.replace(/([.]\w+)$/u, '')
> 'mumbai.polygonscan'
y.hostname.replace(/([.]\w+)$/ug, '')
> 'mumbai.polygonscan'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @jpuri and @brad-decker,
I tried this solution again, I changed Mumbai block explorer link to Etherscan link and I saw this notification "View on Etherscan" (this is just for testing). Can you please review this again?
You can see the following video:

Screen.Recording.2022-12-02.at.11.32.07.mov

Copy link
Contributor

Choose a reason for hiding this comment

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

I missed the call to 'startCase' which is the reason the magic works. Alright i'm good with this. Thanks for pushing back @adnansahovic

@VSaric VSaric requested a review from jpuri December 22, 2022 15:31
@metamaskbot
Copy link
Collaborator

Builds ready [3b788b0]
Page Load Metrics (1297 ± 91 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint88134113136
domContentLoaded11251723128319593
load11441746129719091
domInteractive11251723128319593
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 bytes
  • ui: -188272 bytes
  • common: 188551 bytes

@darkwing
Copy link
Contributor

darkwing commented Jan 4, 2023

Merging as there are two approvals!

@darkwing darkwing merged commit 54cbc66 into develop Jan 4, 2023
@darkwing darkwing deleted the transaction-complete-popup branch January 4, 2023 15:40
@github-actions github-actions bot locked and limited conversation to collaborators Jan 4, 2023
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.

[Bug]: Transaction complete popup shows etherscan text on any chain transaction
7 participants