Skip to content

Commit

Permalink
refactor(cca): fix dropdrown and improve msg
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Jan 23, 2025
1 parent 9906666 commit cd2f6bc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cca/cmd/scaffold.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ func ExecuteScaffold(ctx context.Context, cmd *plugin.ExecutedCommand) error {
return fmt.Errorf("failed to write CCA: %w", err)
}

return session.Printf("🎉 Ignite CCA added (`%[1]v`).\n", c.AppPath(), c.Name())
return session.Printf("🎉 Ignite CCA added (`%[1]v/web`).\n", c.AppPath(), c.Name())
}
8 changes: 4 additions & 4 deletions cca/templates/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Templates

The template is based on Cosmology's [chain-admin template](https://github.com/cosmology-tech/create-cosmos-app/tree/fd87039feee9568a86aa8d8d19edea8f4a78f599/templates/chain-template) at commit `fd87039feee9568a86aa8d8d19edea8f4a78f599`.
The template is based on Cosmology's [chain-template](https://github.com/cosmology-tech/create-cosmos-app/tree/fd87039feee9568a86aa8d8d19edea8f4a78f599/templates/chain-template) at commit `fd87039feee9568a86aa8d8d19edea8f4a78f599`.

Some modifications have been done to make it work nicer with Ignite scaffolded chains.
An exhaustive list of changes compared to the original template can be found [here](./ignite-chain-admin.patch).
An exhaustive list of changes compared to the original template can be found [here](./ignite-chain-template.patch).

## Development Instructions

When upgrading the templates:

- checkout `github.com/cosmology-tech/create-cosmos-app` at the above mentioned commit.
- apply the git patch to the `chain-template` directory (`git apply ignite-chain-admin.patch`)
- apply the git patch to the `chain-template` directory (`git apply ignite-chain-template.patch`)
- merge upstream changes from main
- commit the changes (as a single commit, rewriting history if necessary -- `git reset $(git merge-base main $(git branch --show-current))`)
- export the changes to a patch file (`git diff main > ignite-chain-admin.patch`)
- export the changes to a patch file (`git diff main > ignite-chain-template.patch`)
Original file line number Diff line number Diff line change
Expand Up @@ -2647,6 +2647,20 @@ index aae05fd1..57e3c1ea 100644
if (proposal.status === ProposalStatus.PROPOSAL_STATUS_VOTING_PERIOD) {
(async () => {
for (const { address } of chain?.apis?.rest || []) {
diff --git a/templates/chain-template/next.config.js b/templates/chain-template/next.config.js
index 59bb75ea..f3cafd6d 100644
--- a/templates/chain-template/next.config.js
+++ b/templates/chain-template/next.config.js
@@ -16,6 +16,9 @@ module.exports = {
{
hostname: 'raw.githubusercontent.com',
},
+ {
+ hostname: 'ignite.com',
+ },
],
},
};
diff --git a/templates/chain-template/package.json b/templates/chain-template/package.json
index 3d285bd8..b4f20c68 100644
--- a/templates/chain-template/package.json
Expand Down
3 changes: 3 additions & 0 deletions cca/templates/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module.exports = {
{
hostname: 'raw.githubusercontent.com',
},
{
hostname: 'ignite.com',
}
],
},
};

0 comments on commit cd2f6bc

Please sign in to comment.