Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f989fe0

Browse files
committed
add validation
1 parent 6388ff4 commit f989fe0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,16 @@ public async Task<ThirdwebTransactionReceipt> CreateSessionKey(
465465
throw new InvalidOperationException("CreateSessionKey is only supported for EIP7702 and EIP7702Sponsored execution modes.");
466466
}
467467

468+
if (string.IsNullOrEmpty(signerAddress))
469+
{
470+
throw new ArgumentException("Signer address cannot be null or empty.", nameof(signerAddress));
471+
}
472+
473+
if (durationInSeconds <= 0)
474+
{
475+
throw new ArgumentException("Duration must be greater than zero.", nameof(durationInSeconds));
476+
}
477+
468478
var sessionKeyParams = new SessionSpec()
469479
{
470480
Signer = signerAddress,

0 commit comments

Comments
 (0)