Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
55d85d26
Unverified
Commit
55d85d26
authored
Dec 02, 2022
by
Vignesh Mohankumar
Committed by
GitHub
Dec 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: show Browser Wallet instead of Injected (#5531)
* feat: show Browser Wallet instead of Injected * fix test
parent
7fb7517a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
index.test.tsx
src/components/WalletModal/index.test.tsx
+1
-1
utils.ts
src/connection/utils.ts
+1
-1
No files found.
src/components/WalletModal/index.test.tsx
View file @
55d85d26
...
...
@@ -76,7 +76,7 @@ it('loads Wallet Modal on desktop with generic Injected', async () => {
jest
.
spyOn
(
connectionUtils
,
'
getIsCoinbaseWallet
'
).
mockReturnValue
(
false
)
render
(<
WalletModal
pendingTransactions=
{
[]
}
confirmedTransactions=
{
[]
}
/>)
expect
(
screen
.
getByText
(
'
Injected
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Browser Wallet
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Coinbase Wallet
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
WalletConnect
'
)).
toBeInTheDocument
()
expect
(
screen
.
getAllByTestId
(
'
wallet-modal-option
'
)).
toHaveLength
(
3
)
...
...
src/connection/utils.ts
View file @
55d85d26
...
...
@@ -53,7 +53,7 @@ export function getConnection(c: Connector | ConnectionType) {
export
function
getConnectionName
(
connectionType
:
ConnectionType
,
isMetaMask
?:
boolean
)
{
switch
(
connectionType
)
{
case
ConnectionType
.
INJECTED
:
return
isMetaMask
?
'
MetaMask
'
:
'
Injected
'
return
isMetaMask
?
'
MetaMask
'
:
'
Browser Wallet
'
case
ConnectionType
.
COINBASE_WALLET
:
return
'
Coinbase Wallet
'
case
ConnectionType
.
WALLET_CONNECT
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment