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 contacts #1735

Merged
merged 2 commits into from Oct 20, 2023
Merged

Fix contacts #1735

merged 2 commits into from Oct 20, 2023

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Oct 19, 2023

Issue1:

  • add two contacts with the same name
  • select second one
  • see address1 in input

Issue2:

  • add contacts
  • open wallet in new tab
  • see zero contacts

@lukaw3d lukaw3d requested a review from buberdds October 19, 2023 19:48
@github-actions
Copy link

github-actions bot commented Oct 19, 2023

Deployed to Cloudflare Pages

Latest commit: 296f5e64e33831788a78016972b3f39125ce1cb4
Status:✅ Deploy successful!
Preview URL: https://36bd15d3.oasis-wallet.pages.dev

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #1735 (296f5e6) into master (a2df8e9) will increase coverage by 0.06%.
Report is 1 commits behind head on master.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1735      +/-   ##
==========================================
+ Coverage   82.68%   82.75%   +0.06%     
==========================================
  Files         181      181              
  Lines        4626     4627       +1     
  Branches      826      826              
==========================================
+ Hits         3825     3829       +4     
+ Misses        801      798       -3     
Flag Coverage Δ
cypress 48.56% <0.00%> (-0.02%) ⬇️
jest 78.52% <0.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/app/state/persist/syncTabs.ts 80.00% <ø> (ø)
...ges/AccountPage/Features/SendTransaction/index.tsx 89.36% <0.00%> (-1.95%) ⬇️

... and 2 files with indirect coverage changes

@@ -31,6 +31,7 @@ export function receiveInitialTabSyncState(
...prevState,
theme: initialSyncState.theme,
wallet: initialSyncState.wallet,
contacts: initialSyncState.contacts,
Copy link
Contributor

@buberdds buberdds Oct 20, 2023

Choose a reason for hiding this comment

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

As far as I remember this is covered byPlaywright syncTabs. Why it's not failing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Expanded those tests so they would fail #1741

onSuggestionSelect={event =>
setRecipient(contacts.find(contact => contact.name === event.suggestion)?.address || '')
setRecipient(
contacts.find(contact => contact.address === event.suggestion?.value)?.address || '',
Copy link
Contributor

Choose a reason for hiding this comment

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

What's a value in adding contacts with the same names? This can be harmful imo. Shouldn't we block that behavior? cc @donouwens

Copy link
Contributor

Choose a reason for hiding this comment

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

Anyway, if we will need to change behavior I will create ClickUp task. For now I will merge this and make a release just in case we will have a deploy. Thanks Luka!

@buberdds buberdds merged commit 5237b6f into master Oct 20, 2023
11 of 12 checks passed
@buberdds buberdds deleted the lw/fix-contacts branch October 20, 2023 08:31
lukaw3d added a commit that referenced this pull request Oct 20, 2023
lukaw3d added a commit that referenced this pull request Oct 20, 2023
lukaw3d added a commit that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants