@@ -16,6 +16,7 @@ import type {
1616 EmailLinkConfig ,
1717 EmailLinkFactor ,
1818 EnterpriseSSOConfig ,
19+ GenerateSignature ,
1920 PassKeyConfig ,
2021 PasskeyFactor ,
2122 PhoneCodeConfig ,
@@ -468,8 +469,8 @@ export class SignIn extends BaseResource implements SignInResource {
468469 } ) ;
469470 } ;
470471
471- public authenticateWithSolana = async ( params ? : AuthenticateWithSolanaParams ) : Promise < SignInResource > => {
472- const identifier = await getSolanaIdentifier ( { walletName : params ? .walletName } ) ;
472+ public authenticateWithSolana = async ( params : AuthenticateWithSolanaParams ) : Promise < SignInResource > => {
473+ const identifier = await getSolanaIdentifier ( params . walletName ) ;
473474 return this . authenticateWithWeb3 ( {
474475 identifier,
475476 generateSignature : generateSignatureWithSolana ,
@@ -982,11 +983,12 @@ class SignInFuture implements SignInFutureResource {
982983
983984 async web3 ( params : SignInFutureWeb3Params ) : Promise < { error : ClerkError | null } > {
984985 const { strategy } = params ;
985- const provider = strategy . replace ( 'web3_' , '' ) . replace ( '_signature' , '' ) as Web3Provider ;
986+ const provider = strategy . replace ( 'web3_' , '' ) . replace ( '_signature' , '' ) ;
987+ // as Web3Provider;
986988
987989 return runAsyncResourceTask ( this . resource , async ( ) => {
988990 let identifier ;
989- let generateSignature ;
991+ let generateSignature : GenerateSignature ;
990992 switch ( provider ) {
991993 case 'metamask' :
992994 identifier = await getMetamaskIdentifier ( ) ;
@@ -1006,11 +1008,9 @@ class SignInFuture implements SignInFutureResource {
10061008 break ;
10071009 case 'solana' :
10081010 if ( ! params . walletName ) {
1009- throw new ClerkRuntimeError ( 'walletName is required for solana web3 authentication' , {
1010- code : 'missing_wallet_name' ,
1011- } ) ;
1011+ throw new Error ( 'walletName is required for solana web3 authentication' ) ;
10121012 }
1013- identifier = await getSolanaIdentifier ( { walletName : params . walletName } ) ;
1013+ identifier = await getSolanaIdentifier ( params . walletName ) ;
10141014 generateSignature = generateSignatureWithSolana ;
10151015 break ;
10161016 default :
@@ -1041,7 +1041,7 @@ class SignInFuture implements SignInFutureResource {
10411041 signature = await generateSignature ( {
10421042 identifier,
10431043 nonce : message ,
1044- walletName : params . walletName ,
1044+ walletName : params ? .walletName ,
10451045 } ) ;
10461046 } catch ( err ) {
10471047 // There is a chance that as a user when you try to setup and use the Coinbase Wallet with an existing
@@ -1054,7 +1054,6 @@ class SignInFuture implements SignInFutureResource {
10541054 signature = await generateSignature ( {
10551055 identifier,
10561056 nonce : message ,
1057- walletName : params . walletName ,
10581057 } ) ;
10591058 } else {
10601059 throw err ;
0 commit comments