accounts 0.15.3 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,9 +81,9 @@ export function codeAuth(options: codeAuth.Options = {}): Handler {
81
81
  try {
82
82
  const request = z.decode(CliAuth.createRequest, await readJson(c.req.raw, maxBodyBytes))
83
83
  const chainId = request.chainId ?? defaultChain.id
84
- getClient(chainId)
85
84
  const result = await CliAuth.createDeviceCode({
86
85
  chainId,
86
+ client: getClient(chainId),
87
87
  ...(now ? { now } : {}),
88
88
  ...(policy ? { policy } : {}),
89
89
  ...(random ? { random } : {}),
@@ -123,7 +123,9 @@ export function codeAuth(options: codeAuth.Options = {}): Handler {
123
123
  try {
124
124
  const request = z.decode(CliAuth.authorizeRequest, await readJson(c.req.raw, maxBodyBytes))
125
125
  const result = await CliAuth.authorize({
126
- client: getClient(request.keyAuthorization.chainId),
126
+ client: getClient(
127
+ request.action === 'updateAccessKey' ? request.chainId : request.keyAuthorization.chainId,
128
+ ),
127
129
  ...(now ? { now } : {}),
128
130
  request,
129
131
  store,