Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/create-cosmos-app/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 2 additions & 6 deletions templates/connect-chain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -39,4 +35,4 @@
"generate-lockfile": "0.0.12",
"typescript": "4.9.3"
}
}
}
10 changes: 4 additions & 6 deletions templates/connect-chain/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -23,7 +21,7 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
<ChainProvider
chains={chains}
assetLists={assets}
wallets={[...keplrWallets, ...cosmostationWallets, ...leapWallets]}
wallets={wallets}
walletConnectOptions={{
signClient: {
projectId: 'a8510432ebb71e6948cfd6cde54b70f7',
Expand Down