-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added new contract task type in the admin dashboard #843
Merged
Marchand-Nicolas
merged 11 commits into
lfglabs-dev:testnet
from
PoulavBhowmick03:testnet
Oct 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8cd7973
added new contract task type in the admin dashboard
PoulavBhowmick03 3607c21
added new contract task type in the admin dashboard 2
PoulavBhowmick03 a14e4ed
Merge branch 'lfglabs-dev:testnet' into testnet
PoulavBhowmick03 1d05f15
fixes
PoulavBhowmick03 0dc904c
fixes
PoulavBhowmick03 6a85acf
Merge branch 'testnet' into testnet
PoulavBhowmick03 077bb2b
fixed
PoulavBhowmick03 54db25b
fixed
PoulavBhowmick03 a52008e
fixed merging issues
PoulavBhowmick03 8c6d97b
fixed
PoulavBhowmick03 bf2e368
fixes
PoulavBhowmick03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import TextInput from "../textInput"; | ||
|
||
type ContractStepProps = { | ||
handleTasksInputChange: ( | ||
e: React.ChangeEvent<HTMLInputElement>, | ||
index: number | ||
) => void; | ||
step: StepMap; | ||
index: number; | ||
}; | ||
Marchand-Nicolas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
const ContractStep: FunctionComponent<ContractStepProps> = ({ | ||
handleTasksInputChange, | ||
step, | ||
index, | ||
}) => { | ||
return ( | ||
<div className="flex flex-col gap-4 pt-2"> | ||
<TextInput | ||
onChange={(e) => handleTasksInputChange(e, index)} | ||
value={step.data.contract_name || ""} | ||
name="contract_name" | ||
label="Name" | ||
placeholder="Name" | ||
/> | ||
<TextInput | ||
onChange={(e) => handleTasksInputChange(e, index)} | ||
value={step.data.contract_desc || ""} | ||
name="contract_desc" | ||
label="Description" | ||
placeholder="Description" | ||
multiline={4} | ||
/> | ||
<TextInput | ||
onChange={(e) => handleTasksInputChange(e, index)} | ||
value={step.data.contract_href || ""} | ||
name="contract_href" | ||
label="URL" | ||
placeholder="URL" | ||
/> | ||
<TextInput | ||
onChange={(e) => handleTasksInputChange(e, index)} | ||
value={step.data.contract_cta || ""} | ||
name="contract_cta" | ||
label="CTA" | ||
placeholder="CTA" | ||
/> | ||
<TextInput | ||
onChange={(e) => handleTasksInputChange(e, index)} | ||
value={step.data.calls || ""} | ||
PoulavBhowmick03 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name="calls" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still not working, because here it should be |
||
label="Calls (JSON)" | ||
placeholder='e.g., {"function": "transfer", "params": {"to": "0x...", "value": "1000"}}' | ||
multiline={4} | ||
/> | ||
Marchand-Nicolas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</div> | ||
); | ||
}; | ||
|
||
export default ContractStep; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -315,7 +315,8 @@ type StepMap = | |
| { type: "Custom"; data: CustomInputType } | ||
| { type: "None"; data: object } | ||
| { type: "Domain"; data: DomainInputType } | ||
| { type: "Balance"; data: BalanceInputType }; | ||
| { type: "Balance"; data: BalanceInputType } | ||
| { type: "Contract"; data: ContractInputType }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the ";" at the end of this line |
||
|
||
type CustomInputType = typeof CustomInput; | ||
type DiscordInputType = typeof DiscordInput; | ||
|
@@ -324,6 +325,7 @@ type QuizInputType = typeof QuizDefaultInput; | |
type TwitterFwInputType = typeof TwitterFwInput; | ||
type TwitterRwInputType = typeof TwitterRwInput; | ||
type BalanceInputType = typeof BalanceInput; | ||
type ContractInputType = typeof ContractInput; | ||
type TaskType = | ||
| "Quiz" | ||
| "TwitterFw" | ||
|
@@ -332,6 +334,7 @@ type TaskType = | |
| "TwitterRw" | ||
| "Domain" | ||
| "Balance" | ||
| "Contract" | ||
| "None"; | ||
|
||
type networks = "MAINNET" | "TESTNET"; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing closing parenthesis