fix: Use correct chains when checking permissions: mainnet or testnet (#4793)
Fix #18896
This commit is contained in:
parent
3959948c4c
commit
ba7faea027
|
@ -155,10 +155,17 @@ func (m *DefaultTokenManager) GetAllChainIDs() ([]uint64, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
areTestNetworksEnabled, err := m.tokenManager.RPCClient.NetworkManager.GetTestNetworksEnabled()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
chainIDs := make([]uint64, 0)
|
||||
for _, network := range networks {
|
||||
if areTestNetworksEnabled == network.IsTest {
|
||||
chainIDs = append(chainIDs, network.ChainID)
|
||||
}
|
||||
}
|
||||
return chainIDs, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -320,3 +320,7 @@ func (nm *Manager) GetCombinedNetworks() ([]*CombinedNetwork, error) {
|
|||
func (nm *Manager) GetConfiguredNetworks() []params.Network {
|
||||
return nm.configuredNetworks
|
||||
}
|
||||
|
||||
func (nm *Manager) GetTestNetworksEnabled() (result bool, err error) {
|
||||
return nm.accountsDB.GetTestNetworksEnabled()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue