Skip to content

Commit ae9dbee

Browse files
committed
remove sim
1 parent 91119f7 commit ae9dbee

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

Thirdweb.Console/Program.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -360,20 +360,13 @@
360360

361361
#region EIP-7702
362362

363-
var chain = 11155111; // sepolia
363+
var chain = 11155111; // 7702-compatible chain
364364

365365
// Connect to EOA
366-
var smartEoa = await InAppWallet.Create(client, authProvider: AuthProvider.Google, executionMode: ExecutionMode.EIP7702Sponsored);
366+
var smartEoa = await InAppWallet.Create(client, authProvider: AuthProvider.Guest, executionMode: ExecutionMode.EIP7702Sponsored);
367367
if (!await smartEoa.IsConnected())
368368
{
369-
_ = await smartEoa.LoginWithOauth(
370-
isMobile: false,
371-
(url) =>
372-
{
373-
var psi = new ProcessStartInfo { FileName = url, UseShellExecute = true };
374-
_ = Process.Start(psi);
375-
}
376-
);
369+
_ = await smartEoa.LoginWithGuest(defaultSessionIdOverride: new Guid().ToString());
377370
}
378371
var smartEoaAddress = await smartEoa.GetAddress();
379372
Console.WriteLine($"User Wallet address: {await smartEoa.GetAddress()}");
@@ -396,8 +389,8 @@
396389
Signer = await Utils.GetAddressFromENS(client, "vitalik.eth"),
397390
IsWildcard = true,
398391
ExpiresAt = Utils.GetUnixTimeStampNow() + 86400, // 1 day
399-
CallPolicies = new List<CallSpec>(),
400-
TransferPolicies = new List<TransferSpec>(),
392+
CallPolicies = new List<CallSpec>() { },
393+
TransferPolicies = new List<TransferSpec>() { },
401394
Uid = "my-session-key-uid".HashMessage().HexToBytes()
402395
}
403396
);

Thirdweb/Thirdweb.Wallets/InAppWallet/EcosystemWallet/EcosystemWallet.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,6 @@ public async Task<ThirdwebTransactionReceipt> CreateSessionKey(BigInteger chainI
461461
var sessionKeySig = await EIP712.GenerateSignature_SmartAccount_7702("MinimalAccount", "1", chainId, userWalletAddress, sessionKeyParams, this);
462462
var userContract = await ThirdwebContract.Create(this.Client, userWalletAddress, chainId, Constants.MINIMAL_ACCOUNT_7702_ABI);
463463
var sessionKeyCallData = userContract.CreateCallData("createSessionWithSig", sessionKeyParams, sessionKeySig.HexToBytes());
464-
465-
var tx = await ThirdwebTransaction.Create(this, new ThirdwebTransactionInput(chainId: chainId, to: userWalletAddress, value: 0, data: sessionKeyCallData));
466-
var result = await ThirdwebTransaction.Simulate(tx).ConfigureAwait(false);
467-
Console.WriteLine($"Simulated session key creation transaction: {result}");
468-
469464
return await this.ExecuteTransaction(new ThirdwebTransactionInput(chainId: chainId, to: userWalletAddress, value: 0, data: sessionKeyCallData));
470465
}
471466

0 commit comments

Comments
 (0)