Skip to content

Commit

Permalink
fix: remove chain spec downlaod
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvsadana committed Aug 26, 2023
1 parent 30741ad commit 8dba94c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
16 changes: 0 additions & 16 deletions src/main/madara.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,12 @@ import { MadaraConfig } from './types';
import { MADARA_RELEASES_URL } from '../../config/constants';

const RELEASES_FOLDER = `${MADARA_APP_PATH}/releases`;

// we download the chain specs for now because of an issue in the binaries
// we can skip this step once this is fixed - https://github.com/keep-starknet-strange/madara/issues/728
const CHAIN_SPECS_FOLDER = `${app.getPath('home')}/.madara/chain-specs`;
const CHAIN_DB_FOLDER = `${MADARA_APP_PATH}/data`;

const EQUALITY_FLAGS = ['RPCMethods', 'RPCCors'];
const BOOLEAN_FLAGS = ['RPCExternal', 'developmentMode'];

const SETUP_FILES = [
{
url: `https://raw.githubusercontent.com/keep-starknet-strange/madara/main/crates/node/chain-specs/testnet-sharingan.json`,
directory: CHAIN_SPECS_FOLDER,
showProgress: false,
saveFilename: 'testnet-sharingan.json',
},
{
url: `https://raw.githubusercontent.com/keep-starknet-strange/madara/main/crates/node/chain-specs/testnet-sharingan-raw.json`,
directory: CHAIN_SPECS_FOLDER,
showProgress: false,
saveFilename: 'testnet-sharingan-raw.json',
},
{
url: getReleaseUrl,
directory: RELEASES_FOLDER,
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/features/nodeSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ export type configTypes =
| 'release'
| 'developmentMode';

const STARTING_LOGS = 'Starting...';

const initialState = {
logs: '',
logs: STARTING_LOGS,
isRunning: false,
config: {
RPCCors: '',
Expand Down Expand Up @@ -106,7 +108,7 @@ export const stopNode = () => async (dispatch: any, getState: any) => {

export const deleteNode = () => async (dispatch: any) => {
dispatch(setIsRunning(false));
dispatch(setLogs(''));
dispatch(setLogs(STARTING_LOGS));
dispatch(closeAllApps());
await window.electron.ipcRenderer.madara.delete();
};
Expand Down

0 comments on commit 8dba94c

Please sign in to comment.