1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/.storybook/reducers/sb-send-reducer.js

20 lines
453 B
JavaScript
Raw Normal View History

2021-09-29 20:43:18 +02:00
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;
}
}