@latticexyz/entrykit 2.2.23-63fb9640350ff7d87d226fa827ad53e1e79f77e9 → 2.2.23-65e4592911440a38680d2d5d525deb6242614125
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.
|
@@ -1340,7 +1340,7 @@ function Allowance({ isActive, isExpanded, userAddress }) {
|
|
|
1340
1340
|
import { useEffect as useEffect7 } from "react";
|
|
1341
1341
|
|
|
1342
1342
|
// src/onboarding/useSetupSession.ts
|
|
1343
|
-
import { encodeFunctionData, parseEventLogs as parseEventLogs2 } from "viem";
|
|
1343
|
+
import { encodeFunctionData, parseEventLogs as parseEventLogs2, zeroAddress } from "viem";
|
|
1344
1344
|
import { useMutation as useMutation2, useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
|
1345
1345
|
import { getAction as getAction5 } from "viem/utils";
|
|
1346
1346
|
import { entryPoint07Abi as entryPoint07Abi2, sendUserOperation as sendUserOperation2, waitForUserOperationReceipt } from "viem/account-abstraction";
|
|
@@ -1566,6 +1566,25 @@ function useSetupSession({ connector, userClient }) {
|
|
|
1566
1566
|
]
|
|
1567
1567
|
})
|
|
1568
1568
|
);
|
|
1569
|
+
await (async () => {
|
|
1570
|
+
console.log("creating session account by sending empty user op");
|
|
1571
|
+
const hash = await getAction5(
|
|
1572
|
+
sessionClient,
|
|
1573
|
+
sendUserOperation2,
|
|
1574
|
+
"sendUserOperation"
|
|
1575
|
+
)({
|
|
1576
|
+
calls: [{ to: zeroAddress }]
|
|
1577
|
+
});
|
|
1578
|
+
const receipt2 = await getAction5(
|
|
1579
|
+
bundlerClient,
|
|
1580
|
+
waitForUserOperationReceipt,
|
|
1581
|
+
"waitForUserOperationReceipt"
|
|
1582
|
+
)({ hash });
|
|
1583
|
+
console.log("got user op receipt", receipt2);
|
|
1584
|
+
if (!receipt2.success) {
|
|
1585
|
+
console.error("not successful?", receipt2);
|
|
1586
|
+
}
|
|
1587
|
+
})();
|
|
1569
1588
|
} else if (userClient.account.type === "smart") {
|
|
1570
1589
|
const calls = [];
|
|
1571
1590
|
if (registerSpender && paymaster?.type === "quarry") {
|