@@ -304,6 +304,7 @@ func (a *auth) ToUpdateAuthConfigBody() v1API.UpdateAuthConfigBody {
304
304
a .Email .toAuthConfigBody (& body )
305
305
a .Sms .toAuthConfigBody (& body )
306
306
a .External .toAuthConfigBody (& body )
307
+ a .Web3 .toAuthConfigBody (& body )
307
308
return body
308
309
}
309
310
@@ -330,6 +331,7 @@ func (a *auth) FromRemoteAuthConfig(remoteConfig v1API.AuthConfigResponse) {
330
331
a .Email .fromAuthConfig (remoteConfig )
331
332
a .Sms .fromAuthConfig (remoteConfig )
332
333
a .External .fromAuthConfig (remoteConfig )
334
+ a .Web3 .fromAuthConfig (remoteConfig )
333
335
}
334
336
335
337
func (r rateLimit ) toAuthConfigBody (body * v1API.UpdateAuthConfigBody ) {
@@ -339,6 +341,7 @@ func (r rateLimit) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
339
341
body .RateLimitVerify = cast .Ptr (cast .UintToInt (r .TokenVerifications ))
340
342
// Email rate limit is only updated when SMTP is enabled
341
343
body .RateLimitSmsSent = cast .Ptr (cast .UintToInt (r .SmsSent ))
344
+ body .RateLimitWeb3 = cast .Ptr (cast .UintToInt (r .Web3 ))
342
345
}
343
346
344
347
func (r * rateLimit ) fromAuthConfig (remoteConfig v1API.AuthConfigResponse ) {
@@ -348,6 +351,7 @@ func (r *rateLimit) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
348
351
r .TokenVerifications = cast .IntToUint (cast .Val (remoteConfig .RateLimitVerify , 0 ))
349
352
// Email rate limit is only updated when SMTP is enabled
350
353
r .SmsSent = cast .IntToUint (cast .Val (remoteConfig .RateLimitSmsSent , 0 ))
354
+ r .Web3 = cast .IntToUint (cast .Val (remoteConfig .Web3 , 0 ))
351
355
}
352
356
353
357
func (c captcha ) toAuthConfigBody (body * v1API.UpdateAuthConfigBody ) {
@@ -1149,3 +1153,25 @@ func (a *auth) DiffWithRemote(remoteConfig v1API.AuthConfigResponse) ([]byte, er
1149
1153
}
1150
1154
return diff .Diff ("remote[auth]" , remoteCompare , "local[auth]" , currentValue ), nil
1151
1155
}
1156
+
1157
+ func (w web3 ) toAuthConfigBody (body * v1API.UpdateAuthConfigBody ) {
1158
+ w .solana .toAuthConfigBody (body )
1159
+ body .RateLimitAnonymousUsers = cast .Ptr (cast .UintToInt (r .AnonymousUsers ))
1160
+ body .RateLimitTokenRefresh = cast .Ptr (cast .UintToInt (r .TokenRefresh ))
1161
+ body .RateLimitOtp = cast .Ptr (cast .UintToInt (r .SignInSignUps ))
1162
+ body .RateLimitVerify = cast .Ptr (cast .UintToInt (r .TokenVerifications ))
1163
+ // Email rate limit is only updated when SMTP is enabled
1164
+ body .RateLimitSmsSent = cast .Ptr (cast .UintToInt (r .SmsSent ))
1165
+ }
1166
+
1167
+ func (w * web3 ) fromAuthConfig (remoteConfig v1API.AuthConfigResponse ) {
1168
+ w .solana .fromAuthConfig (remoteConfig )
1169
+ }
1170
+
1171
+ func (s solana ) toAuthConfigBody (body * v1API.UpdateAuthConfigBody ) {
1172
+ body .ExternalWeb3SolanaEnabled = s .Enabled
1173
+ }
1174
+
1175
+ func (s * solana ) fromAuthConfig (remoteConfig v1API.AuthConfigResponse ) {
1176
+ s .Enabled = remoteConfig .ExternalWeb3SolanaEnabled
1177
+ }
0 commit comments