From 74ba88569436fae3d32d023272ae2e1e4e3e95ef Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Fri, 19 Jan 2024 23:34:31 -0800 Subject: [PATCH 1/2] use cosmos-kit --- templates/connect-chain/package.json | 8 ++------ templates/connect-chain/pages/_app.tsx | 10 ++++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/templates/connect-chain/package.json b/templates/connect-chain/package.json index e988c5d78..5f4fdeb4e 100644 --- a/templates/connect-chain/package.json +++ b/templates/connect-chain/package.json @@ -16,14 +16,10 @@ "@chakra-ui/react": "2.5.1", "@cosmjs/cosmwasm-stargate": "0.31.1", "@cosmjs/stargate": "0.31.1", - "@cosmos-kit/core": "^2.6.6", - "@cosmos-kit/cosmostation": "^2.3.11", - "@cosmos-kit/keplr": "^2.3.13", - "@cosmos-kit/leap": "^2.3.10", - "@cosmos-kit/react": "^2.8.4", "@emotion/react": "11.10.6", "@emotion/styled": "11.10.6", "chain-registry": "1.20.0", + "cosmos-kit": "2.7.9", "framer-motion": "9.0.7", "next": "12.2.5", "react": "18.2.0", @@ -39,4 +35,4 @@ "generate-lockfile": "0.0.12", "typescript": "4.9.3" } -} +} \ No newline at end of file diff --git a/templates/connect-chain/pages/_app.tsx b/templates/connect-chain/pages/_app.tsx index 29e9baa07..cad75042e 100644 --- a/templates/connect-chain/pages/_app.tsx +++ b/templates/connect-chain/pages/_app.tsx @@ -1,13 +1,11 @@ import '../styles/globals.css'; import type { AppProps } from 'next/app'; -import { ChainProvider } from '@cosmos-kit/react'; import { ChakraProvider } from '@chakra-ui/react'; -import { wallets as keplrWallets } from '@cosmos-kit/keplr'; -import { wallets as cosmostationWallets } from '@cosmos-kit/cosmostation'; -import { wallets as leapWallets } from '@cosmos-kit/leap'; -import { SignerOptions } from '@cosmos-kit/core'; +import { ChainProvider } from '@cosmos-kit/react'; +import { SignerOptions, wallets } from 'cosmos-kit'; import { chains, assets } from 'chain-registry'; + import { defaultTheme } from '../config'; import '@interchain-ui/react/styles'; @@ -23,7 +21,7 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) { Date: Sat, 20 Jan 2024 14:17:33 -0800 Subject: [PATCH 2/2] from branch --- packages/create-cosmos-app/src/utils.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/create-cosmos-app/src/utils.ts b/packages/create-cosmos-app/src/utils.ts index 56e68c47f..fa0784282 100644 --- a/packages/create-cosmos-app/src/utils.ts +++ b/packages/create-cosmos-app/src/utils.ts @@ -39,7 +39,22 @@ export const cloneRepo = (argv, repo, name) => { const dir = join(argv.tmpdir || tmpdir(), tempname); mkdirp(dir); shell.cd(dir); - shell.exec(`git clone --depth 1 ${repo} ${name}`); + + // Initialize the command arguments in an array + let gitCloneArgs = ['git', 'clone', '--depth', '1']; + + // Add the branch argument if argv.fromBranch is provided + if (argv.fromBranch) { + gitCloneArgs.push('-b', argv.fromBranch); + } + + // Add the repository and name arguments + gitCloneArgs.push.apply(repo, name); + + // Join the arguments with spaces to form the command + const gitCloneCommand = gitCloneArgs.join(' '); + + shell.exec(gitCloneCommand); return dir; }