Skip to content

Commit fc24322

Browse files
committed
Ensure that adapters are generated properly
1 parent b1d2fd0 commit fc24322

File tree

3 files changed

+39
-17
lines changed

3 files changed

+39
-17
lines changed

packages/cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"type": "module",
3737
"dependencies": {
3838
"@abstract-money/bundle-require": "workspace:*",
39-
"@abstract-money/ts-codegen": "0.37.0-beta-3",
39+
"@abstract-money/ts-codegen": "0.37.0-beta-5",
4040
"@cosmjs/cosmwasm-stargate": "^0.32.3",
4141
"@cosmjs/stargate": "^0.32.3",
4242
"abort-controller": "^3.0.0",

packages/cli/src/plugins/react.ts

+16-8
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,22 @@ export function react(options: ReactOptions = {}): ReactResult {
6969
(guardedContract) => guardedContract.name !== name,
7070
),
7171
)
72-
.map(({ name, path }) => ({ name, dir: path }))
73-
console.log('absContracts', absContracts)
74-
75-
await codegen({
76-
options: codegenOptions,
77-
contracts: absContracts,
78-
outPath: cosmwasmCodegenDirPath,
79-
})
72+
.map(({ name, path, moduleType }) => ({ name, dir: path, moduleType }))
73+
console.debug('absContracts', absContracts)
74+
75+
await Promise.all(
76+
absContracts.map(
77+
async ({ moduleType, ...contract }) =>
78+
await codegen({
79+
options: {
80+
...codegenOptions,
81+
abstractApp: { ...codegenOptions.abstractApp, moduleType },
82+
},
83+
contracts: [contract],
84+
outPath: cosmwasmCodegenDirPath,
85+
}),
86+
),
87+
)
8088

8189
if (contractsWithoutAbstractApp.length !== 0)
8290
await codegen({

pnpm-lock.yaml

+22-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)