Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
dalechyn committed Feb 21, 2024
1 parent 61866cd commit 892f7b6
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions packages/core/src/actions/account/wallet/create-sub-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,21 @@ export type CreateSubAccountParameters = WithArgsAndCosmWasmSignOptions<
signingCosmWasmClient: SigningCosmWasmClient
apiUrl: string
sender: string
} & Parameters<typeof ManagerClient.prototype.createSubAccount>[0]
} & Omit<
Parameters<typeof ManagerClient.prototype.createSubAccount>[0],
'accountId'
> & { subAccountId?: number }
>

export async function createSubAccount({
args: { accountId, signingCosmWasmClient, apiUrl, sender, ...rest },
args: {
accountId,
subAccountId,
signingCosmWasmClient,
apiUrl,
sender,
...rest
},
fee,
memo,
funds,
Expand All @@ -26,5 +36,10 @@ export async function createSubAccount({
apiUrl,
},
})
return managerClient.createSubAccount(rest, fee, memo, funds)
return managerClient.createSubAccount(
{ ...rest, accountId: subAccountId },
fee,
memo,
funds,
)
}

0 comments on commit 892f7b6

Please sign in to comment.