Skip to content

Commit

Permalink
Fix registeredModules conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
adairrr committed Dec 21, 2024
1 parent bae70dd commit 0b57fe7
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 51 deletions.
4 changes: 2 additions & 2 deletions src/formulas/formulas/contract/abstract/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ export const module: ContractFormula<
if (!args || !args.namespace || !args.name) return undefined
const moduleParam = args as ModuleInfoParameter

const registeredModules = await registeredModules.compute(env)
const registeredModulesList = await registeredModules.compute(env)

const filteredModules = registeredModules.filter(
const filteredModules = registeredModulesList.filter(
({ info: { name, namespace } }) => {
return namespace === moduleParam.namespace && name === moduleParam.name
}
Expand Down
86 changes: 37 additions & 49 deletions static/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
"contract"
],
"summary": "abstract > registry > accountsByModule",
"description": "retrieves account (that use abstract governance to manage ownership) where the account is the owner",
"description": "Filters accounts by module id, version, or address. Returns account id and address",
"parameters": [
{
"name": "chainId",
Expand All @@ -295,33 +295,21 @@
"schema": {
"type": "string"
}
},
{
"name": "key",
"description": "optional code ID key to filter by",
"required": false,
"schema": {
"type": "string"
},
"in": "query"
}
],
"responses": {
"200": {
"description": "success"
},
"400": {
"description": "missing required arguments"
}
}
}
},
"/{chainId}/contract/{address}/abstract/registry/listLocalAccounts": {
"/{chainId}/contract/{address}/abstract/registry/localAccounts": {
"get": {
"tags": [
"contract"
],
"summary": "abstract > registry > listLocalAccounts",
"summary": "abstract > registry > localAccounts",
"description": "Lists local accounts on chain",
"parameters": [
{
Expand Down Expand Up @@ -350,40 +338,6 @@
}
}
},
"/{chainId}/contract/{address}/abstract/registry/listRegisteredModules": {
"get": {
"tags": [
"contract"
],
"summary": "abstract > registry > listRegisteredModules",
"description": "Lists registered modules in registry",
"parameters": [
{
"name": "chainId",
"in": "path",
"description": "chain ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "address",
"in": "path",
"description": "contract address",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "success"
}
}
}
},
"/{chainId}/contract/{address}/abstract/registry/module": {
"get": {
"tags": [
Expand Down Expand Up @@ -512,6 +466,40 @@
}
}
},
"/{chainId}/contract/{address}/abstract/registry/registeredModules": {
"get": {
"tags": [
"contract"
],
"summary": "abstract > registry > registeredModules",
"description": "Lists registered modules in registry",
"parameters": [
{
"name": "chainId",
"in": "path",
"description": "chain ID",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "address",
"in": "path",
"description": "contract address",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "success"
}
}
}
},
"/{chainId}/contract/{address}/cw1Whitelist/adminList": {
"get": {
"tags": [
Expand Down

0 comments on commit 0b57fe7

Please sign in to comment.