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
dc368ed7
Unverified
Commit
dc368ed7
authored
May 14, 2022
by
DhruvJain1122
Committed by
GitHub
May 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Adding Tally Ho wallet with name & logo for Tally Ho Users (#3820)
* changes * add tally
parent
b109248b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
tally.png
src/assets/images/tally.png
+0
-0
index.tsx
src/components/WalletModal/index.tsx
+20
-0
react-app-env.d.ts
src/react-app-env.d.ts
+1
-0
No files found.
src/assets/images/tally.png
0 → 100644
View file @
dc368ed7
13.4 KB
src/components/WalletModal/index.tsx
View file @
dc368ed7
...
@@ -11,6 +11,7 @@ import { UnsupportedChainIdError, useWeb3React } from 'web3-react-core'
...
@@ -11,6 +11,7 @@ import { UnsupportedChainIdError, useWeb3React } from 'web3-react-core'
import
{
WalletConnectConnector
}
from
'
web3-react-walletconnect-connector
'
import
{
WalletConnectConnector
}
from
'
web3-react-walletconnect-connector
'
import
MetamaskIcon
from
'
../../assets/images/metamask.png
'
import
MetamaskIcon
from
'
../../assets/images/metamask.png
'
import
TallyIcon
from
'
../../assets/images/tally.png
'
import
{
ReactComponent
as
Close
}
from
'
../../assets/images/x.svg
'
import
{
ReactComponent
as
Close
}
from
'
../../assets/images/x.svg
'
import
{
fortmatic
,
injected
}
from
'
../../connectors
'
import
{
fortmatic
,
injected
}
from
'
../../connectors
'
import
{
OVERLAY_READY
}
from
'
../../connectors/Fortmatic
'
import
{
OVERLAY_READY
}
from
'
../../connectors/Fortmatic
'
...
@@ -220,6 +221,7 @@ export default function WalletModal({
...
@@ -220,6 +221,7 @@ export default function WalletModal({
// get wallets user can switch too, depending on device/browser
// get wallets user can switch too, depending on device/browser
function
getOptions
()
{
function
getOptions
()
{
const
isMetamask
=
!!
window
.
ethereum
?.
isMetaMask
const
isMetamask
=
!!
window
.
ethereum
?.
isMetaMask
const
isTally
=
!!
window
.
ethereum
?.
isTally
return
Object
.
keys
(
SUPPORTED_WALLETS
).
map
((
key
)
=>
{
return
Object
.
keys
(
SUPPORTED_WALLETS
).
map
((
key
)
=>
{
const
option
=
SUPPORTED_WALLETS
[
key
]
const
option
=
SUPPORTED_WALLETS
[
key
]
// check for mobile options
// check for mobile options
...
@@ -271,6 +273,24 @@ export default function WalletModal({
...
@@ -271,6 +273,24 @@ export default function WalletModal({
// likewise for generic
// likewise for generic
else
if
(
option
.
name
===
'
Injected
'
&&
isMetamask
)
{
else
if
(
option
.
name
===
'
Injected
'
&&
isMetamask
)
{
return
null
return
null
}
else
if
(
option
.
name
===
'
Injected
'
&&
isTally
)
{
return
(
<
Option
id=
{
`connect-${key}`
}
key=
{
key
}
onClick=
{
()
=>
{
option
.
connector
===
connector
?
setWalletView
(
WALLET_VIEWS
.
ACCOUNT
)
:
!
option
.
href
&&
tryActivation
(
option
.
connector
)
}
}
color=
{
'
#E8831D
'
}
header=
{
<
Trans
>
Tally
</
Trans
>
}
active=
{
option
.
connector
===
connector
}
subheader=
{
null
}
link=
{
null
}
icon=
{
TallyIcon
}
/>
)
}
}
}
}
...
...
src/react-app-env.d.ts
View file @
dc368ed7
...
@@ -13,6 +13,7 @@ interface Window {
...
@@ -13,6 +13,7 @@ interface Window {
// value that is populated and returns true by the Coinbase Wallet mobile dapp browser
// value that is populated and returns true by the Coinbase Wallet mobile dapp browser
isCoinbaseWallet
?:
true
isCoinbaseWallet
?:
true
isMetaMask
?:
true
isMetaMask
?:
true
isTally
?:
false
autoRefreshOnNetworkChange
?:
boolean
autoRefreshOnNetworkChange
?:
boolean
}
}
web3
?:
Record
<
string
,
unknown
>
web3
?:
Record
<
string
,
unknown
>
...
...
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