@@ -402,12 +402,12 @@ public async Task<List<SignerPermissions>> GetAllActiveSigners()
402402 /// <param name="reqValidityEndTimestamp">The timestamp when the request validity ends. Make use of our Utils to get UNIX timestamps.</param>
403403 public async Task < ThirdwebTransactionReceipt > CreateSessionKey (
404404 string signerAddress ,
405- List < string > approvedTargets ,
406- string nativeTokenLimitPerTransactionInWei ,
407- string permissionStartTimestamp ,
408- string permissionEndTimestamp ,
409- string reqValidityStartTimestamp ,
410- string reqValidityEndTimestamp
405+ List < string > approvedTargets = null ,
406+ string nativeTokenLimitPerTransactionInWei = null ,
407+ string permissionStartTimestamp = null ,
408+ string permissionEndTimestamp = null ,
409+ string reqValidityStartTimestamp = null ,
410+ string reqValidityEndTimestamp = null
411411 )
412412 {
413413 if ( await Utils . IsZkSync ( this . Client , this . ActiveChainId ) . ConfigureAwait ( false ) )
@@ -419,12 +419,12 @@ string reqValidityEndTimestamp
419419 {
420420 Signer = signerAddress ,
421421 IsAdmin = 0 ,
422- ApprovedTargets = approvedTargets ,
423- NativeTokenLimitPerTransaction = BigInteger . Parse ( nativeTokenLimitPerTransactionInWei ) ,
424- PermissionStartTimestamp = BigInteger . Parse ( permissionStartTimestamp ) ,
425- PermissionEndTimestamp = BigInteger . Parse ( permissionEndTimestamp ) ,
426- ReqValidityStartTimestamp = BigInteger . Parse ( reqValidityStartTimestamp ) ,
427- ReqValidityEndTimestamp = BigInteger . Parse ( reqValidityEndTimestamp ) ,
422+ ApprovedTargets = approvedTargets ?? new List < string > { Constants . ADDRESS_ZERO } ,
423+ NativeTokenLimitPerTransaction = BigInteger . Parse ( nativeTokenLimitPerTransactionInWei ?? "0" ) ,
424+ PermissionStartTimestamp = BigInteger . Parse ( permissionStartTimestamp ?? "0" ) ,
425+ PermissionEndTimestamp = BigInteger . Parse ( permissionEndTimestamp ?? Utils . GetUnixTimeStampIn10Years ( ) . ToString ( ) ) ,
426+ ReqValidityStartTimestamp = BigInteger . Parse ( reqValidityStartTimestamp ?? "0" ) ,
427+ ReqValidityEndTimestamp = BigInteger . Parse ( reqValidityEndTimestamp ?? Utils . GetUnixTimeStampIn10Years ( ) . ToString ( ) ) ,
428428 Uid = Guid . NewGuid ( ) . ToByteArray ( ) ,
429429 } ;
430430
0 commit comments