-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contact name and addres refactored out to global and not local state
- Loading branch information
1 parent
ccfa7c0
commit a7bbfe5
Showing
6 changed files
with
109 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
// import { | ||
// SET_ACTIVE_CONTACT_TAB, | ||
// UPDATE_WALLET_CONTACTS, | ||
// INITIALIZE_WALLET_CONTACTS, | ||
// SET_CONTACT_ADDRESS, | ||
// INITIALIZE_CONTACT_TOKENS, | ||
// SET_TEMPORARY_QR_ADDRESS | ||
// } from "../actionTypes/ContactTypes"; | ||
import { | ||
SET_ACTIVE_CONTACT_TAB, | ||
UPDATE_WALLET_CONTACTS, | ||
SET_TEMP_CONTACT_NAME, | ||
INITIALIZE_WALLET_CONTACTS, | ||
SET_CONTACT_ETHEREUM_ADDRESS, | ||
INITIALIZE_CONTACT_TOKENS, | ||
} from '../actionTypes/ContactTypes'; | ||
|
||
import { | ||
SET_TEMPORARY_QR_ADDRESS, | ||
} from '../actionTypes/AppConfigTypes'; | ||
|
||
export function setContactTabState(tabText) { | ||
return (dispatch) => { | ||
dispatch({ type: SET_ACTIVE_CONTACT_TAB, payload: tabText }); | ||
}; | ||
} | ||
|
||
export function setContactTempName(name) { | ||
return (dispatch) => { | ||
dispatch({ type: SET_TEMP_CONTACT_NAME, payload: name }); | ||
}; | ||
} | ||
|
||
export function setContactEthereumAddress(address) { | ||
return (dispatch) => { | ||
dispatch({ type: SET_CONTACT_ETHEREUM_ADDRESS, payload: address }); | ||
}; | ||
} |
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
/** | ||
* Contact related action types | ||
*/ | ||
export const SET_ACTIVE_CONTACT_TAB = 'SET_ACTIVE_CONTACT_TAB'; | ||
export const UPDATE_WALLET_CONTACTS = 'UPDATE_WALLET_CONTACTS'; | ||
export const INITIALIZE_WALLET_CONTACTS = 'INITIALIZE_WALLET_CONTACT'; | ||
export const SET_CONTACT_ADDRESS = 'SET_CONTACT_ADDRESS'; | ||
export const SET_TEMP_CONTACT_NAME = 'SET_TEMP_CONTACT_NAME'; | ||
export const INITIALIZE_WALLET_CONTACTS = ' INITIALIZE_WALLET_CONTACTS'; | ||
export const SET_CONTACT_ETHEREUM_ADDRESS = 'SET_CONTACT_ETHEREUM_ADDRESS'; | ||
export const INITIALIZE_CONTACT_TOKENS = 'INITIALIZE_CONTACT_TOKENS'; | ||
|
||
|
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