updating generate command to generate deploy script

This commit is contained in:
Edmond Lee 2020-05-21 15:27:34 -07:00 committed by Jev Björsell
parent 8041ce5ddb
commit 417bd0f5f8
No known key found for this signature in database
GPG Key ID: 03F50CB91981EC9E
5 changed files with 9 additions and 9 deletions

View File

@ -7,7 +7,7 @@ import { DeployAction } from '../../redux/actions/deploy';
import { DryRunAction } from '../../redux/actions/dry-run';
import { EvaluateFunctionAction } from '../../redux/actions/evaluate-function';
import { EvaluateValueAction } from '../../redux/actions/evaluate-value';
import { GenerateCommandAction } from '../../redux/actions/generate-command';
import { GenerateDeployScript } from '../../redux/actions/generate-deploy-script';
import { AppState } from '../../redux/app';
import { ChangeDispatchedAction, ChangeSelectedAction, CommandState } from '../../redux/command';
import { Command } from '../../redux/types';
@ -17,7 +17,7 @@ import { DeployPaneComponent } from './deploy-pane';
import { DryRunPaneComponent } from './dry-run-pane';
import { EvaluateFunctionPaneComponent } from './evaluate-function-pane';
import { EvaluateValuePaneComponent } from './evaluate-value-pane';
import { GenerateCommandPaneComponent } from './generate-command-pane';
import { GenerateDeployScriptPane } from './generate-deploy-script-pane';
const Container = styled.div<{ visible?: boolean }>`
position: absolute;
@ -77,7 +77,7 @@ function createAction(command: Command) {
case Command.EvaluateFunction:
return new EvaluateFunctionAction();
case Command.GenerateCommand:
return new GenerateCommandAction();
return new GenerateDeployScript();
default:
throw new Error('Unsupported command');
}
@ -148,7 +148,7 @@ export const ConfigureTabComponent = (props: {
<EvaluateValuePaneComponent></EvaluateValuePaneComponent>
)) ||
(command === Command.GenerateCommand && (
<GenerateCommandPaneComponent></GenerateCommandPaneComponent>
<GenerateDeployScriptPane></GenerateDeployScriptPane>
))}
</Container>
);

View File

@ -18,7 +18,7 @@ const Container = styled.div`
overflow: auto;
`;
export const GenerateCommandPaneComponent = () => {
export const GenerateDeployScriptPane = () => {
const dispatch = useDispatch();
const tool = useSelector<AppState, GenerateCommandState['tool']>(

View File

@ -24,7 +24,7 @@ const Pre = styled.pre`
margin: 0;
`;
export const GenerateCommandOutputPane = () => {
export const GenerateDeployScriptOutputPane = () => {
const output = useSelector<AppState, ResultState['output']>(
state => state.result.output
);

View File

@ -8,7 +8,7 @@ import { ResultState } from '../../redux/result';
import { Command } from '../../redux/types';
import { CompileOutputPane } from './compile-output-pane';
import { DeployOutputPane } from './deploy-output-pane';
import { GenerateCommandOutputPane } from './generate-command-output-pane';
import { GenerateDeployScriptOutputPane } from './generate-deploy-script-output-pane';
import { Loading } from './loading';
import { OutputPane } from './output-pane';
@ -56,7 +56,7 @@ export const OutputTab = (props: {
} else if (command === Command.Deploy) {
return <DeployOutputPane></DeployOutputPane>;
} else if (command === Command.GenerateCommand) {
return <GenerateCommandOutputPane></GenerateCommandOutputPane>;
return <GenerateDeployScriptOutputPane></GenerateDeployScriptOutputPane>;
}
return <OutputPane></OutputPane>;

View File

@ -22,7 +22,7 @@ export async function fetchRandomPrivateKey(): Promise<string> {
return response.text();
}
export class GenerateCommandAction extends CancellableAction {
export class GenerateDeployScript extends CancellableAction {
getAction() {
return async (dispatch: Dispatch, getState: () => AppState) => {
dispatch({ ...new UpdateLoadingAction('Compiling contract...') });