+ {Object.entries(policies.contracts ?? {}).map(([address, p]) => {
+ const c = parsedContracts[address];
+ return (
+
+ );
+ })}
+
+ {policies.messages && policies.messages.length > 0 && (
+
)}
-
-
- {Object.entries(policies.contracts ?? {}).map(([contractAddress, p]) =>
- p.methods.map((m) => (
-
- {({ isExpanded }) => (
- <>
-
-
-
- {m.entrypoint}
-
-
-
-
-
-
-
-
-
-
- {m.description && (
-
- {m.description}
-
- )}
-
-
- >
- )}
-
- )),
- )}
- {policies.messages?.map((p) => (
-
- {({ isExpanded }) => (
- <>
-
-
- Sign Message
-
-
-
-
-
-
-
-
-
-
- Domain: {p.domain.name}
-
-
- Primary Type: {p.primaryType}
-
-
- Types:
-
- {Object.keys(p.types).map((key) =>
- key === "StarknetDomain" ||
- key === "StarkNetDomain" ? null : (
-
- {key}: {JSON.stringify(p.types[key])}
-
- ),
- )}
-
-
- >
- )}
-
- ))}
-
-
+
);
}
diff --git a/packages/keychain/src/components/session/ContractCard.tsx b/packages/keychain/src/components/session/ContractCard.tsx
index 9d1651c7e..b6c24a014 100644
--- a/packages/keychain/src/components/session/ContractCard.tsx
+++ b/packages/keychain/src/components/session/ContractCard.tsx
@@ -64,10 +64,12 @@ export function ContractCard({