From 9e7d7bbee2666592ef98418ff9a789df7101d61c Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Tue, 14 Aug 2018 11:09:13 +0100 Subject: [PATCH] Misc fixes after rebase --- embark-ui/src/actions/index.js | 15 ++++++++------- embark-ui/src/containers/TransactionsContainer.js | 2 +- embark-ui/src/reducers/index.js | 2 +- embark-ui/src/reducers/selectors.js | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/embark-ui/src/actions/index.js b/embark-ui/src/actions/index.js index 425370f97..5871682d7 100644 --- a/embark-ui/src/actions/index.js +++ b/embark-ui/src/actions/index.js @@ -147,6 +147,14 @@ export const ensRecords = { failure: (error) => action(ENS_RECORDS[FAILURE], {error}) }; + +export const FIDDLE = createRequestTypes('FIDDLE'); +export const fiddle = { + request: (codeToCompile) => action(FIDDLE[REQUEST], {codeToCompile}), + success: (fiddle) => action(FIDDLE[SUCCESS], {fiddles: [fiddle]}), + failure: (error) => action(FIDDLE[FAILURE], {error}) +}; + // Web Socket export const WATCH_NEW_PROCESS_LOGS = 'WATCH_NEW_PROCESS_LOGS'; export const WATCH_NEW_CONTRACT_LOGS = 'WATCH_NEW_CONTRACT_LOGS'; @@ -171,11 +179,4 @@ export function initBlockHeader(){ }; } -export const FIDDLE = createRequestTypes('FIDDLE'); -export const fiddle = { - request: (codeToCompile) => action(FIDDLE[REQUEST], {codeToCompile}), - success: (fiddle) => action(FIDDLE[SUCCESS], {fiddle}), - failure: (error) => action(FIDDLE[FAILURE], {error}) -}; - diff --git a/embark-ui/src/containers/TransactionsContainer.js b/embark-ui/src/containers/TransactionsContainer.js index 402fc1e84..63ab3a09e 100644 --- a/embark-ui/src/containers/TransactionsContainer.js +++ b/embark-ui/src/containers/TransactionsContainer.js @@ -42,7 +42,7 @@ function mapStateToProps(state) { } TransactionsContainer.propTypes = { - transactions: PropTypes.object, + transactions: PropTypes.arrayOf(PropTypes.object), fetchTransactions: PropTypes.func, error: PropTypes.string, loading: PropTypes.bool diff --git a/embark-ui/src/reducers/index.js b/embark-ui/src/reducers/index.js index 9f9c552b6..9a0701148 100644 --- a/embark-ui/src/reducers/index.js +++ b/embark-ui/src/reducers/index.js @@ -16,7 +16,7 @@ const entitiesDefaultState = { commands: [], messages: [], messageChannels: [], - fiddle: null, + fiddles: [], versions: [], plugins: [], ensRecords: [] diff --git a/embark-ui/src/reducers/selectors.js b/embark-ui/src/reducers/selectors.js index 7112032d2..f5d2258cf 100644 --- a/embark-ui/src/reducers/selectors.js +++ b/embark-ui/src/reducers/selectors.js @@ -91,7 +91,7 @@ export function getMessages(state) { } export function getFiddle(state) { - return state.entities.fiddle; + return state.entities.fiddles[0]; } export function getEnsRecords(state) {