Skip to content

fix: migrate project to org#2815

Merged
blushi merged 1 commit intomainfrom
fix-migrate-projects-fee-granter
Mar 24, 2026
Merged

fix: migrate project to org#2815
blushi merged 1 commit intomainfrom
fix-migrate-projects-fee-granter

Conversation

@blushi
Copy link
Copy Markdown
Member

@blushi blushi commented Mar 23, 2026

Description

Fixing this bug https://regen-network.slack.com/archives/C07GB7717H6/p1773957974731169 when trying to migrate an on chain project.

Screenshot 2026-03-19 at 3 04 22 PM

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • provided a link to the relevant issue or specification
  • provided instructions on how to test
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

How to test

  1. Create an on chain project from your user account
  2. Once published, try to migrate this project to your organization

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items
.

I have...

  • confirmed all author checklist items have been addressed
  • reviewed code correctness and readability
  • verified React components follow DRY principles
  • reviewed documentation is accurate
  • reviewed tests
  • manually tested (if applicable)

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 23, 2026

Deploy Preview for terrasos ready!

Name Link
🔨 Latest commit aaace2f
🔍 Latest deploy log https://app.netlify.com/projects/terrasos/deploys/69c0f342ffebdd00087d40d6
😎 Deploy Preview https://deploy-preview-2815--terrasos.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a bug preventing the successful migration of on-chain projects to organizations. The core of the fix involves refactoring the useMigrateProject hook to explicitly accept and pass a feeGranter parameter, ensuring that the necessary fee delegation is correctly handled during the migration process. This change improves the robustness of project migration functionality.

Highlights

  • Refactored useMigrateProject hook: The useMigrateProject hook has been refactored to accept an object as its argument, allowing for more explicit and flexible passing of parameters like project, navigateToOrg, and a new feeGranter.
  • Explicit feeGranter handling: The feeGranter is now explicitly passed to the underlying useMigrateProjects hook, resolving an issue where on-chain project migrations to an organization might fail due to a missing fee granter.
  • Integration of useDaoOrganization: The BasicInfoForm component now directly uses the useDaoOrganization hook to retrieve the DAO organization's address, which is then provided as the feeGranter to useMigrateProject.
  • Updated hook calls: Components like BasicInfoForm, ManageProject.Collaborators, and ManageProject have been updated to conform to the new object-based argument structure of the useMigrateProject hook.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@blushi
Copy link
Copy Markdown
Member Author

blushi commented Mar 23, 2026

@erikalogie @S4mmyb see testing instructions

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request refactors the useMigrateProject hook to accept an object as an argument, which includes project, navigateToOrg, and an optional feeGranter. This change improves the flexibility and clarity of the hook's API. The useDaoOrganization hook is now called directly in BasicInfoForm.tsx to provide the feeGranter when needed, centralizing the responsibility for obtaining the organization's address. This refactoring addresses the reported bug related to migrating on-chain projects by correctly passing the feeGranter.

@S4mmyb
Copy link
Copy Markdown
Member

S4mmyb commented Mar 23, 2026

LGTM! We should note though that when we support being part of multiple organizations that the user should be able to choose which org it goes to.

@blushi
Copy link
Copy Markdown
Member Author

blushi commented Mar 24, 2026

LGTM! We should note though that when we support being part of multiple organizations that the user should be able to choose which org it goes to.

indeed that's a good point. Do we have design for this already @erikalogie ?

@blushi blushi merged commit aaace2f into main Mar 24, 2026
14 checks passed
@blushi blushi deleted the fix-migrate-projects-fee-granter branch March 24, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants