Skip to content

Commit d1bcacf

Browse files
committed
feat: add support for enabling ethereum provider
1 parent 4811359 commit d1bcacf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/config/auth.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,13 @@ type (
358358
Enabled bool `toml:"enabled"`
359359
}
360360

361+
ethereum struct {
362+
Enabled bool `toml:"enabled"`
363+
}
364+
361365
web3 struct {
362366
Solana solana `toml:"solana"`
367+
Ethereum ethereum `toml:"ethereum"`
363368
}
364369
)
365370

@@ -1318,12 +1323,17 @@ func (e external) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
13181323

13191324
func (w web3) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
13201325
body.ExternalWeb3SolanaEnabled = nullable.NewNullableWithValue(w.Solana.Enabled)
1326+
body.ExternalWeb3EthereumEnabled = nullable.NewNullableWithValue(w.Ethereum.Enabled)
13211327
}
13221328

13231329
func (w *web3) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
13241330
if value, err := remoteConfig.ExternalWeb3SolanaEnabled.Get(); err == nil {
13251331
w.Solana.Enabled = value
13261332
}
1333+
1334+
if value, err := remoteConfig.ExternalWeb3EthereumEnabled.Get(); err == nil {
1335+
w.Ethereum.Enabled = value
1336+
}
13271337
}
13281338

13291339
func (a *auth) DiffWithRemote(remoteConfig v1API.AuthConfigResponse) ([]byte, error) {

0 commit comments

Comments
 (0)