Skip to content

Commit

Permalink
Move policies to ControllerOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura authored and broody committed Aug 20, 2024
1 parent 14b15b7 commit 9e69d51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ const cartridge = new CartridgeConnector({
],
url:
!process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ||
process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL.split(".")[0] ===
process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL.split(".")[0] ===
"cartridge-starknet-react-next"
? process.env.XFRAME_URL
: "https://" +
(process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? "").replace(
"cartridge-starknet-react-next",
"keychain",
),
(process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL ?? "").replace(
"cartridge-starknet-react-next",
"keychain",
),
rpc: process.env.NEXT_PUBLIC_RPC_SEPOLIA,
paymaster: {
caller: shortString.encodeShortString("ANY_CALLER"),
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Home() {
switch (context.type) {
case "connect": {
// TODO: show missing policies if mismatch
if (!context.policies.length || controller.account.sessionJson()) {
if (!context.policies?.length || controller.account.sessionJson()) {
context.resolve({
code: ResponseCodes.SUCCESS,
address: controller.address,
Expand Down

0 comments on commit 9e69d51

Please sign in to comment.