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
fe82dcf2
Commit
fe82dcf2
authored
Dec 04, 2019
by
Ian Lapham
Committed by
Noah Zinsmeister
Dec 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hosted wallets (#531)
parent
28672100
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
PendingView.js
src/components/WalletModal/PendingView.js
+3
-2
index.js
src/components/WalletModal/index.js
+10
-2
No files found.
src/components/WalletModal/PendingView.js
View file @
fe82dcf2
...
@@ -64,7 +64,7 @@ const ErrorButton = styled.div`
...
@@ -64,7 +64,7 @@ const ErrorButton = styled.div`
}
}
`
`
export
default
function
PendingView
({
uri
=
''
,
size
,
connector
,
error
=
false
,
tryActivation
})
{
export
default
function
PendingView
({
uri
=
''
,
size
,
connector
,
error
=
false
,
setPendingError
,
tryActivation
})
{
const
isMetamask
=
window
.
ethereum
&&
window
.
ethereum
.
isMetaMask
const
isMetamask
=
window
.
ethereum
&&
window
.
ethereum
.
isMetaMask
return
(
return
(
...
@@ -77,6 +77,7 @@ export default function PendingView({ uri = '', size, connector, error = false,
...
@@ -77,6 +77,7 @@ export default function PendingView({ uri = '', size, connector, error = false,
<
div
>
Error
connecting
.
<
/div
>
<
div
>
Error
connecting
.
<
/div
>
<
ErrorButton
<
ErrorButton
onClick
=
{()
=>
{
onClick
=
{()
=>
{
setPendingError
(
false
)
tryActivation
(
connector
)
tryActivation
(
connector
)
}}
}}
>
>
...
@@ -86,7 +87,7 @@ export default function PendingView({ uri = '', size, connector, error = false,
...
@@ -86,7 +87,7 @@ export default function PendingView({ uri = '', size, connector, error = false,
)
:
connector
===
walletconnect
?
(
)
:
connector
===
walletconnect
?
(
'
Scan QR code with a compatible wallet...
'
'
Scan QR code with a compatible wallet...
'
)
:
(
)
:
(
'
Waiting for connection
...
'
'
Initializing
...
'
)}
)}
<
/div
>
<
/div
>
<
/LoadingMessage
>
<
/LoadingMessage
>
...
...
src/components/WalletModal/index.js
View file @
fe82dcf2
...
@@ -13,7 +13,7 @@ import { usePrevious } from '../../hooks'
...
@@ -13,7 +13,7 @@ import { usePrevious } from '../../hooks'
import
{
Link
}
from
'
../../theme
'
import
{
Link
}
from
'
../../theme
'
import
MetamaskIcon
from
'
../../assets/images/metamask.png
'
import
MetamaskIcon
from
'
../../assets/images/metamask.png
'
import
{
ReactComponent
as
Close
}
from
'
../../assets/images/x.svg
'
import
{
ReactComponent
as
Close
}
from
'
../../assets/images/x.svg
'
import
{
injected
,
walletconnect
,
fortmatic
}
from
'
../../connectors
'
import
{
injected
,
walletconnect
,
fortmatic
,
portis
}
from
'
../../connectors
'
import
{
useWalletModalToggle
,
useWalletModalOpen
}
from
'
../../contexts/Application
'
import
{
useWalletModalToggle
,
useWalletModalOpen
}
from
'
../../contexts/Application
'
import
{
OVERLAY_READY
}
from
'
../../connectors/Fortmatic
'
import
{
OVERLAY_READY
}
from
'
../../connectors/Fortmatic
'
...
@@ -176,6 +176,11 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
...
@@ -176,6 +176,11 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
const
option
=
SUPPORTED_WALLETS
[
key
]
const
option
=
SUPPORTED_WALLETS
[
key
]
// check for mobile options
// check for mobile options
if
(
isMobile
)
{
if
(
isMobile
)
{
//disable portis on mobile for now
if
(
option
.
connector
===
portis
)
{
return
null
}
if
(
!
window
.
web3
&&
!
window
.
ethereum
&&
option
.
mobile
)
{
if
(
!
window
.
web3
&&
!
window
.
ethereum
&&
option
.
mobile
)
{
return
(
return
(
<
Option
<
Option
...
@@ -230,7 +235,9 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
...
@@ -230,7 +235,9 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
!
option
.
mobileOnly
&&
(
!
option
.
mobileOnly
&&
(
<
Option
<
Option
onClick
=
{()
=>
{
onClick
=
{()
=>
{
option
.
connector
!==
connector
&&
!
option
.
href
&&
tryActivation
(
option
.
connector
)
option
.
connector
===
connector
?
setWalletView
(
WALLET_VIEWS
.
ACCOUNT
)
:
!
option
.
href
&&
tryActivation
(
option
.
connector
)
}}
}}
key
=
{
key
}
key
=
{
key
}
active
=
{
option
.
connector
===
connector
}
active
=
{
option
.
connector
===
connector
}
...
@@ -302,6 +309,7 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
...
@@ -302,6 +309,7 @@ export default function WalletModal({ pendingTransactions, confirmedTransactions
size
=
{
220
}
size
=
{
220
}
connector
=
{
pendingWallet
}
connector
=
{
pendingWallet
}
error
=
{
pendingError
}
error
=
{
pendingError
}
setPendingError
=
{
setPendingError
}
tryActivation
=
{
tryActivation
}
tryActivation
=
{
tryActivation
}
/
>
/
>
)
:
(
)
:
(
...
...
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