Skip to content

Conversation

defispartan
Copy link
Collaborator

General Changes

  • Disable screening endpoint call for mocked address

To test: check different combinations of connecting, disconnecting, and switching between normal and mocked wallet and check that no request is made to https://aave-api-v2.aave.com/addresses/status?address for mocked wallet

Developer Notes

Does not use existing watchModeOnlyAddress parameter which is exported from Web3Provider because currentAccount and watchModeOnlyAddress are updated asyncronously


Author Checklist

Please ensure you, the author, have gone through this checklist to ensure there is an efficient workflow for the reviewers.

  • The base branch is set to main
  • The title is using Conventional Commit formatting
  • The Github issue has been linked to the PR in the Development section
  • The General Changes section has been filled out
  • Developer Notes have been added (optional)

If the PR is ready for review:

  • The PR is in Open state and not in Draft mode
  • The Ready for Dev Review label has been added

Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code style generally follows existing patterns
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)
  • Code changes have been quality checked in the ephemeral URL
  • QA verification has been completed
  • There are two or more approvals from the core team
  • Squash and merge has been checked

@defispartan defispartan added the Ready for QA Review Ready for QA engineer reviews label Dec 7, 2022
drewcook
drewcook previously approved these changes Dec 7, 2022
Copy link
Contributor

@drewcook drewcook left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 471.43 KB (🟡 +46 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!

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

@github-actions
Copy link

github-actions bot commented Dec 7, 2022

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

@MareskoY
Copy link
Contributor

MareskoY commented Dec 8, 2022

all good,
but I found one more point where we could optimise request

case

  1. connect via any wallet = request https://aave-api-v2.aave.com/addresses/status?address
  2. open the switch wallet modal and choose any option (walletconnect)
  3. cancel connect

result:

I think we don't need to make a second request
cc @defispartan

@defispartan
Copy link
Collaborator Author

all good, but I found one more point where we could optimise request

case

1. connect via any wallet = request https://aave-api-v2.aave.com/addresses/status?address

2. open the switch wallet modal and choose any option (walletconnect)

3. cancel connect

result:

* after canceling we again sent a request https://aave-api-v2.aave.com/addresses/status?address with the address from the step1 for which we already connect

I think we don't need to make a second request cc @defispartan

Unfortunately, this isn't something that can be changed on the interface side. The account variable of the Web3React library determines which wallet is connected so if this is not being updated correctly there's no way to modify it

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

@defispartan defispartan merged commit 4784101 into main Dec 12, 2022
@defispartan defispartan deleted the chore/screening-optimisations branch December 12, 2022 15:42
grothem added a commit that referenced this pull request Dec 16, 2022
* chore: export state to exclude mock wallet from screening

* chore: disable screening  if watch mode enabled

* fix: stub address screening api call

* fix: tests wallet connect

* fix: revet intercept

Co-authored-by: Mark Grothe <[email protected]>
Co-authored-by: NikitaY <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants