Skip to content

Commit a191e38

Browse files
committed
Revert "feat: guard specific contracts from being turned into app clients"
This reverts commit 1df4fde.
1 parent bbce699 commit a191e38

File tree

1 file changed

+2
-36
lines changed

1 file changed

+2
-36
lines changed

packages/cli/src/plugins/react.ts

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ const codegen = (_codegen as any).default as typeof _codegen
1313

1414
type ReactResult = RequiredBy<Plugin, 'run'>
1515

16-
type ReactOptions = {
17-
disableAppstractAppFor?: string[]
18-
}
19-
20-
const DISABLED_APPSTRACT_APP_FOR_GUARD = ['proxy']
21-
22-
export function react(options: ReactOptions = {}): ReactResult {
16+
export function react(): ReactResult {
2317
return {
2418
name: 'React',
2519
async run({ contracts, out, isTypeScript }) {
@@ -42,40 +36,12 @@ export function react(options: ReactOptions = {}): ReactResult {
4236

4337
const cosmwasmCodegenDirPath = join(out, 'cosmwasm-codegen')
4438

45-
// Guard speicfic contracts to not have the abstract app generated
46-
const guardedContracts = contracts.filter(({ name }) =>
47-
DISABLED_APPSTRACT_APP_FOR_GUARD.includes(name),
48-
)
49-
5039
await codegen({
5140
options: codegenOptions,
52-
contracts: contracts
53-
.filter(
54-
({ name }) =>
55-
!options.disableAppstractAppFor?.includes(name) &&
56-
guardedContracts.every(
57-
(guardedContract) => guardedContract.name !== name,
58-
),
59-
)
60-
.map(({ name, path }) => ({ name, dir: path })),
41+
contracts: contracts.map(({ name, path }) => ({ name, dir: path })),
6142
outPath: cosmwasmCodegenDirPath,
6243
})
6344

64-
if (
65-
options.disableAppstractAppFor?.length !== 0 ||
66-
guardedContracts.length !== 0
67-
)
68-
await codegen({
69-
options: { ...codegenOptions, abstractApp: { enabled: false } },
70-
contracts: [
71-
...guardedContracts,
72-
...contracts.filter(({ name }) =>
73-
options.disableAppstractAppFor?.includes(name),
74-
),
75-
].map(({ name, path }) => ({ name, dir: path })),
76-
outPath: cosmwasmCodegenDirPath,
77-
})
78-
7945
const imports: string[] = []
8046
const content: string[] = []
8147

0 commit comments

Comments
 (0)