@@ -49,16 +49,16 @@ export class Auth {
49
49
if ( ! options . sdkUrl && ! options . useMpc ) {
50
50
if ( options . buildEnv === BUILD_ENV . DEVELOPMENT ) {
51
51
options . sdkUrl = "http://localhost:3000" ;
52
- options . dashboardUrl = "http://localhost:5173/wallet/account " ;
52
+ options . dashboardUrl = "http://localhost:5173" ;
53
53
} else if ( options . buildEnv === BUILD_ENV . STAGING ) {
54
54
options . sdkUrl = "https://staging-auth.web3auth.io" ;
55
- options . dashboardUrl = "https://staging-account.web3auth.io/wallet/account " ;
55
+ options . dashboardUrl = "https://staging-account.web3auth.io" ;
56
56
} else if ( options . buildEnv === BUILD_ENV . TESTING ) {
57
57
options . sdkUrl = "https://develop-auth.web3auth.io" ;
58
- options . dashboardUrl = "https://develop-account.web3auth.io/wallet/account " ;
58
+ options . dashboardUrl = "https://develop-account.web3auth.io" ;
59
59
} else {
60
60
options . sdkUrl = "https://auth.web3auth.io" ;
61
- options . dashboardUrl = "https://account.web3auth.io/wallet/account " ;
61
+ options . dashboardUrl = "https://account.web3auth.io" ;
62
62
}
63
63
}
64
64
@@ -129,6 +129,12 @@ export class Auth {
129
129
return `${ this . options . sdkUrl } /v${ version . split ( "." ) [ 0 ] } ` ;
130
130
}
131
131
132
+ private get dashboardUrl ( ) : string {
133
+ // testing and develop don't have versioning
134
+ if ( ! this . addVersionInUrls ) return `${ this . options . sdkUrl } ` ;
135
+ return `${ this . options . sdkUrl } /v${ version . split ( "." ) [ 0 ] } ` ;
136
+ }
137
+
132
138
async init ( ) : Promise < void > {
133
139
// get sessionNamespace from the redirect result.
134
140
const params = getHashQueryParams ( this . options . replaceUrlOnRedirect ) ;
@@ -303,7 +309,7 @@ export class Auth {
303
309
// in case of redirect mode, redirect url will be dapp specified
304
310
// in case of popup mode, redirect url will be sdk specified
305
311
const defaultParams = {
306
- redirectUrl : this . options . dashboardUrl ,
312
+ redirectUrl : ` ${ this . dashboardUrl } /wallet/account` ,
307
313
dappUrl : `${ window . location . origin } ${ window . location . pathname } ` ,
308
314
} ;
309
315
0 commit comments