Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiolalombardim committed Nov 25, 2023
2 parents 84fda53 + 2823191 commit 6785736
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/modules/explorer/components/CodeCollapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const CodeCollapse: React.FC<Props> = ({ code }) => {
<TableHeader item container justifyContent="space-between">
<Grid item>
<Typography variant="body2" style={{ fontWeight: "500" }} color="textPrimary">
View Lambda Parameter Code
View Function Parameter Code
</Typography>
</Grid>
<Grid item>
Expand Down
18 changes: 9 additions & 9 deletions src/modules/explorer/components/ConfigProposalFormLambda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ enum LambdaProposalState {
}

const codeEditorPlaceholder = {
addLambda: `Write Michelson Code for Lambda's Implementation
addLambda: `Write Michelson Code for Function's Implementation
Eg:-
Expand All @@ -98,9 +98,9 @@ Eg:-
{ DROP ; UNIT })
"sample")))
`,
existingLambda: `Choose a Lambda from the Dropdown, the implementation will appear here
existingLambda: `Choose a Function from the Dropdown, the implementation will appear here
`,
lambdaExecuteArgumentsCode: `Write Michelson Code for the input Paramerers of your Lambda
lambdaExecuteArgumentsCode: `Write Michelson Code for the input Paramerers of your Function
Eg:-
Expand Down Expand Up @@ -277,7 +277,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
const renderRemoveProposal = () => {
return (
<>
<ProposalFormInput label="Lambda Name">
<ProposalFormInput label="Function Name">
<SearchLambda lambdas={daoLambdas} handleChange={handleSearchChange} />
</ProposalFormInput>
<ProposalCodeEditorInput
Expand All @@ -300,7 +300,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
const renderExecuteProposal = () => {
return (
<>
<ProposalFormInput label="Lambda Name">
<ProposalFormInput label="Function Name">
<SearchLambda lambdas={daoLambdas} handleChange={handleSearchChange} />
</ProposalFormInput>
<ProposalCodeEditorInput
Expand All @@ -317,7 +317,7 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
placeholder={codeEditorPlaceholder.existingLambda}
/>
<ProposalCodeEditorInput
label="Lambda Arguments Code"
label="Function Arguments Code"
containerstyle={codeEditorcontainerstyles}
insertSpaces
ignoreTabKey={false}
Expand Down Expand Up @@ -351,18 +351,18 @@ export const ProposalFormLambda: React.FC<Props> = ({ open, handleClose, action
<ResponsiveDialog
open={open}
onClose={handleClose}
title={ProposalAction[action] + " Lambda Proposal"}
title={ProposalAction[action] + " Function Proposal"}
template="md"
>
{state === LambdaProposalState.write_action ? (
<>
<Grid container direction="row" spacing={4}>
<Grid container direction="row">
{action === ProposalAction.new ? renderNewProposal() : null}
{action === ProposalAction.remove ? renderRemoveProposal() : null}
{action === ProposalAction.execute ? renderExecuteProposal() : null}
</Grid>

<StyledRow container direction="row" spacing={4} justifyContent="flex-end">
<StyledRow container direction="row" justifyContent="flex-end">
<StyledSendButton onClick={lambdaForm.handleSubmit(onSubmit)} disabled={!code}>
Submit
</StyledSendButton>
Expand Down
12 changes: 6 additions & 6 deletions src/modules/explorer/components/ProposalActionsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,20 @@ interface Action {

const getActions = (): Action[] => [
{
name: "Add Lambda",
description: "Write Michelson code to add Lambda",
name: "Add Function",
description: "Write Michelson code to add Function",
id: ProposalAction.new,
isLambda: true
},
{
name: "Remove Lambda",
description: "Choose which Lambda to remove",
name: "Remove Function",
description: "Choose which Function to remove",
id: ProposalAction.remove,
isLambda: true
},
{
name: "Execute Lambda",
description: "Execute a Lambda already installed on DAO",
name: "Execute Function",
description: "Execute a Function already installed on DAO",
id: ProposalAction.execute,
isLambda: true
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@ export const ProposalSelectionMenuLambda: React.FC<Props> = ({ open, handleClose
</Grid>
<Grid container justifyContent="center" style={{ gap: 20 }} direction="column">
<MainButton variant="contained" onClick={() => handleOpenCustomProposalModal(ProposalAction.new)}>
Add Lambda
Add Function
</MainButton>

<MainButton
variant="contained"
color="secondary"
onClick={() => handleOpenCustomProposalModal(ProposalAction.remove)}
>
Remove Lambda
Remove Function
</MainButton>

<MainButton variant="contained" color="secondary" onClick={toggleExecuteUI}>
Execute Lambda
Execute Function
</MainButton>
</Grid>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/explorer/components/ResponsiveDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CloseButton from "modules/common/CloseButton"
import BackButton from "modules/common/BackButton"

const Content = styled(Grid)({
padding: "41px 46px"
padding: "40px 48px"
})

const TitleText = styled(Typography)(({ theme }) => ({
Expand Down
12 changes: 6 additions & 6 deletions src/modules/explorer/pages/Config/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ const getActions = (): Action[] => [
isLambda: true
},
{
name: "Add Lambda",
description: "Write Michelson code to add Lambda",
name: "Add Function",
description: "Write Michelson code to add Function",
id: ProposalAction.new,
isLambda: true
},
{
name: "Remove Lambda",
description: "Choose which Lambda to remove",
name: "Remove Function",
description: "Choose which Function to remove",
id: ProposalAction.remove,
isLambda: true
},
{
name: "Execute Lambda",
description: "Execute a Lambda already installed on DAO",
name: "Execute Function",
description: "Execute a Function already installed on DAO",
id: ProposalAction.execute,
isLambda: true
},
Expand Down
9 changes: 3 additions & 6 deletions src/modules/explorer/pages/ProposalDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ import { CopyButton } from "modules/common/CopyButton"
import { ProposalCodeEditorInput } from "modules/explorer/components/ProposalFormInput"
import Prism, { highlight } from "prismjs"
import { CodeCollapse } from "modules/explorer/components/CodeCollapse"
import { useDAOLambdas } from "services/contracts/baseDAO/hooks/useDAOLambdas"
import { useDAOLambda } from "services/contracts/baseDAO/hooks/useDAOLambda"
import { parseLambdaCode } from "utils"

const Container = styled(ContentContainer)({
"padding": "36px 45px",
Expand Down Expand Up @@ -382,7 +379,7 @@ export const ProposalDetails: React.FC = () => {
<HighlightedBadge justifyContent="center" alignItems="center" direction="row" container>
<Grid item>
<DetailsText variant="body1" color="textPrimary">
Execute Lambda{" "}
Execute Function{" "}
<Typography variant="body1" color="secondary" display={"inline"}>
{_.startCase((proposal as LambdaProposal).metadata.lambdaHandler.handler_name)}
</Typography>{" "}
Expand Down Expand Up @@ -449,7 +446,7 @@ export const ProposalDetails: React.FC = () => {
<HighlightedBadge justifyContent="center" alignItems="center" direction="row" container>
<Grid item>
<DetailsText variant="body1" color="textPrimary">
Add Lambda{" "}
Add Function{" "}
<Typography variant="body1" color="secondary" display={"inline"}>
{(proposal as LambdaProposal).metadata.lambdaHandler.name}
</Typography>{" "}
Expand Down Expand Up @@ -483,7 +480,7 @@ export const ProposalDetails: React.FC = () => {
<HighlightedBadge justifyContent="center" alignItems="center" direction="row" container>
<Grid item>
<DetailsText variant="body1" color="textPrimary">
Remove Lambda{" "}
Remove Function{" "}
<Typography variant="body1" color="secondary" display={"inline"}>
{_.startCase((proposal as LambdaProposal).metadata.lambdaHandler)}
</Typography>{" "}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const useLambdaAddPropose = () => {
// setProposalDone()

openNotification({
message: "Add Lambda proposal transaction confirmed!",
message: "Add Function proposal transaction confirmed!",
autoHideDuration: 10000,
variant: "success",
detailsLink: `https://${networkNameMap[network]}.tzkt.io/` + data.opHash
Expand Down

0 comments on commit 6785736

Please sign in to comment.