Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Show wallet modal after clicking redeem if web3 inactive
Browse files Browse the repository at this point in the history
Alternative to showing the modal on redemption start on page
load
  • Loading branch information
ironng committed Sep 18, 2020
1 parent 8887a8d commit 6342e73
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/redemption/Start.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ const Start = ({ saveAddresses, resetState, openWalletModal }) => {

const { active } = useWeb3React()

useEffect(() => {
if (!active) {
openWalletModal()
}
}, [active, openWalletModal])

const handleClickConfirm = (evt) => {
evt.preventDefault()
evt.stopPropagation()

if (!active) {
openWalletModal()
return
}

saveAddresses({
btcAddress: btcAddress.address,
depositAddress: depositAddress.address,
Expand Down

0 comments on commit 6342e73

Please sign in to comment.