This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from keep-network/automatic-wallet-modal
Automatic wallet modal The "Connect to a wallet" modal will be shown whenever web3 is required to take action - on the start pages for deposit and redemption and any route that is wrapped in the <Loadable> component. This changes the <ConnectWalletDialog> state to be controlled by redux state rather than React state.
- Loading branch information
Showing
8 changed files
with
106 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { OPEN_WALLET_MODAL, CLOSE_WALLET_MODAL } from "../actions" | ||
|
||
const initialState = { | ||
isOpen: false, | ||
} | ||
|
||
const walletModal = (state = initialState, action) => { | ||
switch (action.type) { | ||
case OPEN_WALLET_MODAL: | ||
return { | ||
...state, | ||
isOpen: true, | ||
} | ||
case CLOSE_WALLET_MODAL: | ||
return { | ||
...state, | ||
isOpen: false, | ||
} | ||
default: | ||
return state | ||
} | ||
} | ||
|
||
export default walletModal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters