Skip to content

Commit

Permalink
Make backwards compat with 0.3.40
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Aug 20, 2024
1 parent 3a7c296 commit 387653e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/controller/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ class Controller {

try {
let response = await this.keychain.connect({
rpcUrl: this.rpc.toString(),
policies: this.policies,
rpcUrl: this.rpc.toString(),
});
if (response.code !== ResponseCodes.SUCCESS) {
throw new Error(response.message);
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/connect/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function Form({
credentialId,
});

if (mode === LoginMode.Controller && policies.length > 0) {
if (mode === LoginMode.Controller && policies?.length > 0) {
await controller.approve(origin, expiresAt, policies);
} else {
await doLogin(usernameField.value, credentialId);
Expand Down

0 comments on commit 387653e

Please sign in to comment.