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: don't show address suggestions after a valid address has been entered #3268

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

jmealy
Copy link
Contributor

@jmealy jmealy commented Feb 15, 2024

What it solves

Resolves #3252

How this PR fixes it

Check if the current address input is a valid address. If it is then do not show any suggestions from the address book.

How to test it

  • Create a transaction that transfers any asset
  • Enter destination address (something not in the address book)
  • Click on the address input
  • The autocomplete should not show any suggestions.

Copy link

github-actions bot commented Feb 15, 2024

Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 1.03 MB (-3 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Four Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/new-safe/create 31.95 KB (🟡 +40 B) 1.06 MB
/new-safe/load 19.33 KB (🟡 +40 B) 1.04 MB
/transactions 92.68 KB (🟡 +36 B) 1.12 MB
/transactions/history 92.65 KB (🟡 +36 B) 1.12 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.71% (+0.02% 🔼)
11571/14700
🔴 Branches
56.82% (+0.02% 🔼)
2595/4567
🟡 Functions
63.6% (-0.02% 🔻)
1842/2896
🟢 Lines
80.03% (+0.02% 🔼)
10434/13037
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / index.tsx
93.02% (-1.71% 🔻)
88.24% (+0.74% 🔼)
76.92% (-6.41% 🔻)
94.74% (-2.32% 🔻)

Test suite run success

1404 tests passing in 191 suites.

Report generated by 🧪jest coverage report action from 9e51721

Copy link
Member

@mmv08 mmv08 left a comment

Choose a reason for hiding this comment

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

looks sound mate

@liliya-soroka
Copy link
Member

liliya-soroka commented Feb 16, 2024

Screen.Recording.2024-02-16.at.13.00.25.mov

Current result:

  1. The enter field is cleaned after the click
  2. no drop-down with address book suggestions

Is the enter field cleaning expected?

@jmealy
Copy link
Contributor Author

jmealy commented Feb 19, 2024

Screen.Recording.2024-02-16.at.13.00.25.mov
Current result:

  1. The enter field is cleaned after the click
  2. no drop-down with address book suggestions

Is the enter field cleaning expected?

It is maintaining current behaviour so it's like this in prod already. I suggest handling this as a separate issue (but personally I think that this behaviour is fine)

@francovenica
Copy link
Contributor

LGTM

Is notisable when you copy/paste an address that is not in the address book already

Also I checked that, if the address is wrong or invalid, it shows the list of elments back to pick another address (which I think is the correct behavior)
image

@katspaugh katspaugh added this to the 1.30.0 milestone Feb 19, 2024
@jmealy jmealy merged commit 1be52b5 into dev Feb 19, 2024
13 checks passed
@jmealy jmealy deleted the address-suggestions branch February 19, 2024 15:21
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2024
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.

Unrelated address book entries are shown when there's already a valid address in the input
5 participants