{"size": 378, "ext": "js", "max_stars_repo_path": "app/shared/actions/storage.js", "max_stars_repo_name": "tarassh/anchor", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/shared/actions/storage.js", "max_issues_repo_name": "tarassh/anchor", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/shared/actions/storage.js", "max_forks_repo_name": "tarassh/anchor", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.9, "max_line_length": 47, "alphanum_fraction": 0.6084656085}
import * as types from './types';

export function setStorage(data) {
  return async (dispatch: () => void) => {
    // flush to disk
    if (window && window.persistor) {
      setTimeout(window.persistor.flush, 2000);
    }
    // update store
    return dispatch({
      type: types.WALLET_STORAGE_UPDATE,
      payload: data
    });
  };
}

export default {
  setStorage
};
