updating generate command to generate deploy script
This commit is contained in:
parent
8041ce5ddb
commit
417bd0f5f8
@ -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>
|
||||
);
|
||||
|
@ -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']>(
|
@ -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
|
||||
);
|
@ -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>;
|
||||
|
@ -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...') });
|
Loading…
Reference in New Issue
Block a user