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: disable bnb network option on uniwallet #6452

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

JFrankfurt
Copy link
Contributor

@JFrankfurt JFrankfurt commented Apr 26, 2023

Slack thread: https://uniswapteam.slack.com/archives/C04D07TQBT4/p1682535435459049

Screen capture

Before After (Desktop)
image image

Test plan

connect to the app with the uniswap wallet and confirm both options are disabled

connect to the app with anything else and confirm all options are enabled

@JFrankfurt JFrankfurt requested review from a team, mz- and grabbou and removed request for a team April 26, 2023 19:09
@vercel
Copy link

vercel bot commented Apr 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2023 8:35pm

Copy link
Contributor

@tinaszheng tinaszheng left a comment

Choose a reason for hiding this comment

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

seems better to have a supported list for uni wallet rather than use a list of unsupported?

@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.32 🎉

Comparison is base (3d8d29f) 58.76% compared to head (db4af1f) 59.08%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6452      +/-   ##
==========================================
+ Coverage   58.76%   59.08%   +0.32%     
==========================================
  Files         702      702              
  Lines       21858    21859       +1     
  Branches     7057     7057              
==========================================
+ Hits        12844    12916      +72     
+ Misses       8922     8851      -71     
  Partials       92       92              
Flag Coverage Δ
e2e-tests 59.16% <100.00%> (+0.56%) ⬆️
unit-tests 17.43% <0.00%> (ø)

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

Impacted Files Coverage Δ
src/components/NavBar/ChainSelector.tsx 78.37% <100.00%> (ø)
src/constants/chains.ts 100.00% <100.00%> (ø)

... and 18 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@JFrankfurt JFrankfurt force-pushed the disable-bnb-on-uniwallet branch from 8f7c7ab to db4af1f Compare April 26, 2023 20:31
@JFrankfurt JFrankfurt requested review from a team and removed request for mz- April 26, 2023 20:42
@@ -76,7 +76,7 @@ export const ChainSelector = ({ leftAlign }: ChainSelectorProps) => {
<Column paddingX="8">
{NETWORK_SELECTOR_CHAINS.map((chainId: SupportedChainId) => (
<ChainSelectorRow
disabled={isUniWallet && chainId === SupportedChainId.CELO}
disabled={isUniWallet && !UniWalletSupportedChains.includes(chainId)}
Copy link
Contributor

Choose a reason for hiding this comment

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

I find it generally a bit confusing that this feature - displayed in the UI as a generic "not supported by your wallet" feature - is specific to Uniwallet. In that case, I'd rather see the wording "not supported by Uniwallet".

Also, it would be great if this feature was expanded in the future into more generic abstraction, especially as we add WalletConnect multi-chain support where all chains become optional and when not present after connecting - it will mean that a give chain is unsupported.

I understand it's out of scope for this PR, so would rather have a follow-up ticket. If you agree, I would appreciate if you could create one!

@JFrankfurt JFrankfurt merged commit 4416a84 into Uniswap:main Apr 27, 2023
GAEAlimited added a commit to DataBank-Financial-Reserve/interface that referenced this pull request May 3, 2023
…occess (#6)

For the Uniswap.Labs/Sentry.Insurance "1,000,000,000.00" ##Leftover to be done by monetary terminal!

=v4.231.0= Decompile the stack for the OneKey to be cleaned up instead of related to Matrix 1-2-3-4
=v4.232.0= Defragment the stack via D-S OneKey to clean up stack related to Matrix 1 over 1B Injector
=v4.233.0= Defragment the stack via D-S OneKey to clean up stack related to Matrix 2 over 1B Injector
=v4.234.0= Defragment the stack via D-S OneKey to clean up stack related to Matrix 3 over 1B Injector
=v4.235.0= Defragment the stack via D-S OneKey to clean up stack related to Matrix 4 over 1B Injector

---> Meaning the final =v4.236.0 will be the connector and the clean version of the OneKey with CID 1-2

* feat: mining mode switch to disable auto-mine (Uniswap#6450)

* feat: mining mode switch to update so we can make assertions about pending transaction state

* update test to use explicit mining

* Update hardhat.config.js

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* build: allow parallel cypress re-run (Uniswap#6449)

* build: allow parallel cypress re-run

* build: add a step

* ci: Emit to slack on merge to releases/* branch (Uniswap#6318)

* Initial draft of Slack notification on releases/* merges

Test

* Add back proper Slack message content

* Feedback revisions

* Update .github/workflows/notify-slack-on-release-merge.yml

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update .github/workflows/notify-slack-on-release-merge.yml

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update .github/workflows/notify-slack-on-release-merge.yml

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Comments

* revert to github env

* Add PR target back

* Revert multi-line

* write to context, add multi-line back

* Try other reference to context

* one other way of settings output...

* Pull from output

* Remove env

* Remove PR target

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* fix: disable bnb network option on uniwallet (Uniswap#6452)

* fix: disable bnb network option on uniwallet

* use supported chain set

* feat: add L2 CG tokenlists (Uniswap#6292)

* feat: add L2 CG tokenlists

* remove extra line

* test: swap modal footer unit test (Uniswap#6353)

* swap footer modal test

* remove empty test

* init

* merge main and jordan comment

* init

* use test constants

* use constants

* change address

* more comprehensive tests

* merge constants

* fix errors

* remove dual import noop

* update snapshot

* Update src/components/swap/SwapModalFooter.test.tsx

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* update snapshot

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* test: advanced swap details component unit test (Uniswap#6363)

* init

* init

* init

* use test constants

* use constants

* change address

* more comprehensive tests

* move noop

* add eslint rule

* return null in noop

* merge

* checkpoint

* fixes

* add tooltip test

* remove unused file

* merge swap modal header

* add third test

* add test for syncing and loading case

* respond to comments

* more descriptive comments

* update snapshot

* update

* change to act

* chore: updating listing marketplace icons (Uniswap#6458)

* chore: updating listing marketplace icons

* removing svgs from public

* responding to comments

* test: swap details dropdown unit test (Uniswap#6349)

* init for swap details dropdown test

* more tests

* complete tests, ready for review

* add to dev deps

* init

* merge main

* init

* use test constants

* use constants

* change address

* more comprehensive tests

* merge with constants

* move noop

* add eslint rule

* return null in noop

* merge

* update snapshot

* constant name

* snapshot change

* lint

* undo eslint change

* Update src/components/swap/SwapDetailsDropdown.test.tsx

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update src/components/swap/SwapDetailsDropdown.test.tsx

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update src/components/swap/SwapDetailsDropdown.test.tsx

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* respond comments

* update snapshot

* merge main

* user event instead

* add act

* import fix

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* test: unsupported currency footer unit test (Uniswap#6360)

* tests are complete

* update comment

* remove console log, and test close icon

* init

* lets try something else to avoid timeout

* try splitting up last test for timeout

* undo, it wasnt working

* revert order test

* add comment for sanity check

* test another way

* try userEvent

* increase timeout

* move timeout

* init

* use test constants

* use constants

* change address

* more comprehensive tests

* merge constants and use mocked

* remove comments

* remove dual import

* Update src/components/swap/UnsupportedCurrencyFooter.test.tsx

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* respond comments

* update tests

* remove console log

* fixes

* add act

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* chore: moving nft test fixtures to their own file (Uniswap#6456)

* chore: moving nft test fixtures to their own file

* refactoring structure

* renaming file

* build: update default test settings (Uniswap#6441)

build: coverage on CI by default

* test: upgrade cypress-hardhat (Uniswap#6462)

* build: upgrade sentry-release action (Uniswap#6463)

* fix: spoof origin and referer (Uniswap#6468)

* fix: spoof origin and referer

* comments, chaining, and an accurate replication of amplitude response bodies

* refactor: activation hook w/ global state (Uniswap#6413)

* feat: moved tryActivation to global hook/state

* test: activation hook

* fix: merge conflicts

* fix: update file path for render utils in activate.test.ts

* fix: add await for connector deactivation

* fix: pr comment fixes

* fix: update tests

* refactor: use stronger activation state type

* refactor: use global state instead of props in ConnectionErrorView

* fix: re-add uri availability check

* fix: lint

* fix: nits

* fix: css regression

* fix: update test enum usage

* fix: use native disabled attribute

* test: add snapshot tests for different Option states

* fix: zach's PR comments

* test: update snapshots/unit tests

* style: pending boolean names

* fix: updated test import

* docs: added comment explaining analytics difference in wallet connection

* test: assert console.debug calls and fix act() issues

* test: drawer close

* test: import specific drawer fn instead of whole module

* fix: match OneKey more generically (Uniswap#6461)

* fix: match OneKey more generically

* flip

* Update src/tracing/errors.test.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update src/tracing/errors.test.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* Update src/tracing/errors.test.ts

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* backslashes

* fix

---------

* feat: [DetailsV2] Add Trait component content (Uniswap#6460)

* hide trait container when asset has no traits

* add traits header row

* trait value rows and scroll behaviour

* row with placeholder values

* add random filler values and proper scrollbar styles

* working rarity graph

* bar border radius

* move rarity graph to its own file

* always show scrim

* working scrim and move traitrow to its own file

* cleanup

* remove padding

* move scrollbar right

* add snapshot tests

* add comment about randomly generated rarities

* cleanup

* only pass traits

* justify

* not important

* cleanup scrim styles

* remove comment

* add scroll state hook

* lint

* update test

* object over map

* remove spaces

* justify content

* add ticket

* add comments

* update snapshot

* correct padding

---------

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>

* chore: removing pwat feature flag (Uniswap#6467)

* chore: removing pwat flag

* removing it from enum

* updating test

* trade is not the same as usingPwat

* test: keep test output clean (Uniswap#6469)

* feat: [DetailsV2] add link and hover state to trait component (Uniswap#6472)

* hide trait container when asset has no traits

* add traits header row

* trait value rows and scroll behaviour

* row with placeholder values

* add random filler values and proper scrollbar styles

* working rarity graph

* bar border radius

* move rarity graph to its own file

* always show scrim

* working scrim and move traitrow to its own file

* cleanup

* remove padding

* move scrollbar right

* add snapshot tests

* add comment about randomly generated rarities

* cleanup

* only pass traits

* justify

* not important

* cleanup scrim styles

* remove comment

* add scroll state hook

* lint

* update test

* object over map

* remove spaces

* justify content

* add ticket

* add comments

* update snapshot

* add link and hover state to trait component

* correct padding

* respond to comments

* add component and use css for vis

---------

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>

* fix: filter errors with OneKey in stack (Uniswap#6477)

* fix: filter errors with OneKey in stack

* check stack

* test(lint): separate multiline comments (Uniswap#6476)

* build: cap chunk size to 5MB (Uniswap#6479)

* build: cap chunk size to 5MB

* test: rm size-tests

* feat: use Swap Component on TDP (Uniswap#6332)

* test: swap flow cypress tests

* fix: use default parameter

* feat: use Swap Component on TDP

* feat: auto nav for TDP tokens

* chore: merge

* chore: merge

* chore: merge

* chore: merge

* fix: remove extra inputCurrency URL parsing logic

* fix: undo last change

* fix: pass expected chain id to swap component

* fix: search for default tokens on unconnected networks if needed

* test: e2e test for l2 token

* fix: delete irrelevant tests

* fix: address comments

* fix: lint error

* test: update TDP e2e tests

* fix: use pageChainId for filter

* fix: rename chainId

* fix: typecheck

* fix: chainId bug

* fix: chainId required fixes

* fix: bad merge in e2e test

* fix: remove unused test util

* fix: remove unnecessary variable

* fix: token defaults

* fix: address comments

* fix: address comments and fix tests

* fix: e2e test formatting, remove Maybe<>

* fix: remove unused variable

* fix: use feature flag for swap component on TDP

* fix: back button

* chore: remove unused feature flags (Uniswap#6484)

* fix: filter chrome-extension errors (Uniswap#6475)

* fix: filter chrome-extension errors in Sentry

* check stack

* chore: update to listing with seaport 1.5 (Uniswap#6485)

update to listing with seaport 1.5

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>

* test(e2e): (un/)wrap transactions (Uniswap#6474)

* chore: e2e test (un/)wrap transactions

* wrap button should not be disabled (wait for enabled state)

* use automine

* pr feedback

* configure automine

* make tests stop relying on reset

* test(e2e): deadline passed swap error state (Uniswap#6444)

* chore: ignore hardhat cache files

* test: add forking hardhat config

* test: install cypress-hardhat

* build: add cypress-hardhat

* fix: lint

* build: add hardhat

* build: add @sentry/types

* fix: better origin

* test: update cypress VisitOptions to include hardhat

* fix: default to connected wallet user state

* test: add a hardhat provider

* build: update imports

* chore: comments

* fix: massage eth_sendTransaction

* feat: example swap test (Uniswap#6415)

* initial commit

* add intercept for amplitude

* fix: destructure result

* click swap submission

* fix: eth_sendTransaction via bridge

* test works

* finish chain interaction test

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* swap should render an error when a transaction fails due to a passed deadline

* use mining utils to manage transaction confirmation

* update to use new hardhat syntax and make comments more clear

* test a very long timeout in CI

* Revert "test a very long timeout in CI"

This reverts commit 141c28e.

* fiddle with automine settings

* pr feedback

* cleanup

* bump cypress-hardhat

* use setAutomine

* use setAutomine

* remove .reset

---------

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* feat: [DetailsV2] initial details landing page view (Uniswap#6453)

* feat: initial view of details landing page

* gap

* dynamic font sizes

* added test

* responding to comments

* updating snapshot

* linting

* fix: moonpay modal height (Uniswap#6439)

* test(e2e): slippage failure (Uniswap#6464)

* initial draft

* remove logs

* assertions improvement

* add more comments

* add explicit call to disable automine

* test out a very long timeout

* Revert "test out a very long timeout"

This reverts commit 0fc2666.

* improve test reliability

* remove mock list response

* remove hardhat reset and clean up tests

* simplify assertion

* add zzmp's nits

* chore: refactor Bag to use scroll hook (Uniswap#6483)

* chore: refactor Bag to use scroll hook

* remove outdated comment

---------

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>

---------

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
Co-authored-by: lavalamp <lavalamp-@users.noreply.github.com>
Co-authored-by: matteen <105068213+matteenm@users.noreply.github.com>
Co-authored-by: lynn <41491154+lynnshaoyu@users.noreply.github.com>
Co-authored-by: Jack Short <john.short.tj@gmail.com>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
Co-authored-by: cartcrom <39385577+cartcrom@users.noreply.github.com>
Co-authored-by: Charles Bachmeier <charles@bachmeier.io>
Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
Co-authored-by: eddie <66155195+just-toby@users.noreply.github.com>
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.

3 participants