Skip to content
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

feat/364-information-storage-steps #429

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

Sworzen1
Copy link
Contributor

@Sworzen1 Sworzen1 commented Mar 7, 2024

List of changes

add storage information screens

only uI without build metadata and metadata hash:
#378

Checklist

  • related issue
  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the changelog
  • I have added tests that prove my fix is effective or that my feature works

@Sworzen1 Sworzen1 marked this pull request as ready for review March 7, 2024 16:56
Copy link
Contributor

@MSzalowski MSzalowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just replace the link to sancho docs - rest of the comments are for the future purpose

generateJsonBody,
getValues,
watch,
} = useCreateGovernanceActionForm();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That most likely will be moved to Governance Provider which would also include logic for hashing metadata & validation of metadata submitted to some storage by user.


// TODO: change link when available
const openLink = () => {
openInNewTab("https://www.google.com");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace it with https://docs.sanchogov.tools in case it is forgotten

@@ -26,9 +30,28 @@ export const useCreateGovernanceActionForm = () => {
reset,
} = useFormContext<createGovernanceActionValues>();

const onSubmit = useCallback(async () => {
setIsLoading(true);
const generateJsonBody = (data: createGovernanceActionValues) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be replaced with .jsonld with preset default CIP columns and body based on the governance action type.

const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent(json)}`;
const link = document.createElement("a");
link.href = jsonString;
link.download = `${fileName ? fileName : "data"}.json`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fileName should be replaced with governance action type eg.: treasury-withdrawal.jsonld

@Sworzen1 Sworzen1 merged commit cd58d28 into develop Mar 8, 2024
1 check passed
@Sworzen1 Sworzen1 deleted the feat/364-information-storage-steps branch March 8, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖥 Frontend Frontend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants