@@ -18,13 +18,12 @@ type verifierFunc func(address std.Address, name string) bool
18
18
var (
19
19
Ownable = ownable.NewWithAddress("g1manfred47kzduec920z88wfr64ylksmdcedlf5") // @moul > dropped in genesis via Enable
20
20
21
- checkFunc = defaultVerifier // Callback for the namespace check
22
- enabled = false // set to true in genesis
21
+ enabled = false // set to true in genesis
23
22
)
24
23
25
24
// IsAuthorizedAddressForName ensures that the given address has ownership of the given name.
26
25
func IsAuthorizedAddressForName(address std.Address, name string) bool {
27
- return checkFunc (enabled, address, name)
26
+ return verifier (enabled, address, name)
28
27
}
29
28
30
29
// Enable enables the namespace check and drops centralized ownership of this realm.
@@ -44,7 +43,7 @@ func IsEnabled() bool {
44
43
// defaultVerifyFunction checks the store to see that the
45
44
// user has properly registered the given name.
46
45
// This function considers as valid an `address` that matches the `name`.
47
- func defaultVerifier (enabled bool, address std.Address, name string) bool {
46
+ func verifier (enabled bool, address std.Address, name string) bool {
48
47
if !enabled {
49
48
return true // only in pre-genesis cases
50
49
}
@@ -69,13 +68,3 @@ func defaultVerifier(enabled bool, address std.Address, name string) bool {
69
68
70
69
return userData.Addr() == address
71
70
}
72
-
73
- // NewVerifyCallExecutor allows updating the verifier function via a GovDAO proposal
74
- func NewVerifyCallExecutor(newVerifyCall func(enabled bool, address std.Address, name string) bool) dao.Executor {
75
- callback := func() error {
76
- checkFunc = newVerifyCall
77
- return nil
78
- }
79
-
80
- return bridge.GovDAO().NewGovDAOExecutor(callback)
81
- }
0 commit comments