Skip to content

Commit

Permalink
Ensure that adapters are generated properly
Browse files Browse the repository at this point in the history
  • Loading branch information
adairrr committed Dec 11, 2024
1 parent b1d2fd0 commit fc24322
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"type": "module",
"dependencies": {
"@abstract-money/bundle-require": "workspace:*",
"@abstract-money/ts-codegen": "0.37.0-beta-3",
"@abstract-money/ts-codegen": "0.37.0-beta-5",
"@cosmjs/cosmwasm-stargate": "^0.32.3",
"@cosmjs/stargate": "^0.32.3",
"abort-controller": "^3.0.0",
Expand Down
24 changes: 16 additions & 8 deletions packages/cli/src/plugins/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,22 @@ export function react(options: ReactOptions = {}): ReactResult {
(guardedContract) => guardedContract.name !== name,
),
)
.map(({ name, path }) => ({ name, dir: path }))
console.log('absContracts', absContracts)

await codegen({
options: codegenOptions,
contracts: absContracts,
outPath: cosmwasmCodegenDirPath,
})
.map(({ name, path, moduleType }) => ({ name, dir: path, moduleType }))
console.debug('absContracts', absContracts)

await Promise.all(
absContracts.map(
async ({ moduleType, ...contract }) =>
await codegen({
options: {
...codegenOptions,
abstractApp: { ...codegenOptions.abstractApp, moduleType },
},
contracts: [contract],
outPath: cosmwasmCodegenDirPath,
}),
),
)

if (contractsWithoutAbstractApp.length !== 0)
await codegen({
Expand Down
30 changes: 22 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fc24322

Please sign in to comment.