1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 23:06:37 +01:00
metamask-extension/.storybook/reducers/sb-send-reducer.js
2021-09-29 13:43:18 -05:00

20 lines
453 B
JavaScript

import testData from '../test-data';
const initialState = { ...testData.send };
export default function sendSBReducer(state = initialState, action) {
switch (action.type) {
case 'send/updateSendStage':
return {
...state,
stage: action.payload,
};
case 'send/updateSendAsset':
return {
...state,
asset: { ...state.asset, type: action.payload },
};
default:
return state;
}
}