Skip to content

Commit 1533c20

Browse files
committed
fix: resolve review comments
1 parent 4184593 commit 1533c20

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

packages/core/src/actions/account/public/get-total-value.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ export async function getTotalValue({
2020
},
2121
})
2222
const res = await proxyQueryClient.totalValue()
23+
// @TODO: might overflow a number
2324
return +res.total_value
2425
}

packages/core/src/actions/account/wallet/remove-namespace.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ import { WithArgsAndCosmWasmSignOptions } from '../../../types/with-args'
44
import { getVersionControlClientFromApi } from '../../wallet/get-version-control-client-from-api'
55
import { getNamespace } from '../public/get-namespace'
66

7-
export type RemoveNamespaceParameters = WithArgsAndCosmWasmSignOptions<{
7+
export type RevokeNamespaceParameters = WithArgsAndCosmWasmSignOptions<{
88
accountId: VersionControlTypes.AccountId
99
signingCosmWasmClient: SigningCosmWasmClient
1010
apiUrl: string
1111
sender: string
1212
}>
1313

14-
export async function removeNamespace({
14+
export async function revokeNamespace({
1515
args: { accountId, signingCosmWasmClient, apiUrl, sender },
1616
fee,
1717
memo,
1818
funds,
19-
}: RemoveNamespaceParameters) {
19+
}: RevokeNamespaceParameters) {
2020
const versionControlClient = await getVersionControlClientFromApi({
2121
args: {
2222
signingCosmWasmClient,

packages/core/src/actions/get-version-control-address-from-api.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ export async function getVersionControlAddressFromApi({
1414
apiUrl,
1515
gql(/* GraphQL */ `
1616
query VersionControlDeployment($chain: ID!) {
17-
version
1817
deployment(chain: $chain) {
1918
registry
2019
}
21-
chainInfo(chain: $chain) {
22-
rpcUrl
23-
}
2420
}
2521
`),
2622
{

packages/core/src/actions/public/get-abstract-module-address-from-version-control.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function getAbstractModuleAddressFromVersionControl({
2727
},
2828
})
2929

30-
const [accountFactoryAddress] = await versionControlQueryClient
30+
const [moduleAddress] = await versionControlQueryClient
3131
.modules({
3232
infos: [
3333
{
@@ -41,11 +41,11 @@ export async function getAbstractModuleAddressFromVersionControl({
4141
modules.map(({ module }) => versionControlModuleToAddress(module)),
4242
)
4343

44-
if (!accountFactoryAddress) {
44+
if (!moduleAddress) {
4545
throw new Error(
4646
`Could not fetch address for module ${moduleName} version ${version} from registry ${versionControlAddress}`,
4747
)
4848
}
4949

50-
return accountFactoryAddress
50+
return moduleAddress
5151
}

packages/core/src/clients/decorators/account-wallet.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { deposit } from '../../actions/account/wallet/deposit'
55
import { execute } from '../../actions/account/wallet/execute'
66
import { getManagerClientFromApi } from '../../actions/account/wallet/get-manager-client-from-api'
77
import { getProxyClientFromApi } from '../../actions/account/wallet/get-proxy-client-from-api'
8-
import { removeNamespace } from '../../actions/account/wallet/remove-namespace'
8+
import { revokeNamespace } from '../../actions/account/wallet/remove-namespace'
99
import { withdraw } from '../../actions/account/wallet/withdraw'
1010
import { VersionControlTypes } from '../../codegen/abstract/index'
1111
import { CutArgs } from '../../types/with-args'
@@ -39,9 +39,9 @@ export type AccountWalletActions = {
3939
getProxyClientFromApi(
4040
args: CutSpecificArgsFromParameter<typeof getProxyClientFromApi>,
4141
): ReturnType<typeof getProxyClientFromApi>
42-
removeNamespace(
43-
args: CutSpecificArgsFromParameter<typeof removeNamespace>,
44-
): ReturnType<typeof removeNamespace>
42+
revokeNamespace(
43+
args: CutSpecificArgsFromParameter<typeof revokeNamespace>,
44+
): ReturnType<typeof revokeNamespace>
4545
withdraw(
4646
args: CutSpecificArgsFromParameter<typeof withdraw>,
4747
): ReturnType<typeof withdraw>
@@ -89,8 +89,8 @@ export function accountWalletActions(
8989
args: { ...args, accountId, signingCosmWasmClient, apiUrl, sender },
9090
...rest,
9191
}),
92-
removeNamespace: ({ args, ...rest }) =>
93-
removeNamespace({
92+
revokeNamespace: ({ args, ...rest }) =>
93+
revokeNamespace({
9494
args: { ...args, accountId, signingCosmWasmClient, apiUrl, sender },
9595
...rest,
9696
}),

0 commit comments

Comments
 (0)