Skip to content

Commit

Permalink
fix: Major
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Jun 20, 2023
1 parent bc1ead1 commit 04bfe96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/meta/strategies.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func GetMetaStrategy(chainID uint64, strategyAddress common.Address) (*models.TS
** _metaStrategyMap variable.
**********************************************************************************************/
func ListMetaStrategies(chainID uint64) []*models.TStrategyFromMeta {
syncMap := initOrGetMetaProtocolMap(chainID)
syncMap := initOrGetMetaStrategyMap(chainID)
var retValue []*models.TStrategyFromMeta
syncMap.Range(func(_, data interface{}) bool {
retValue = append(retValue, data.(*models.TStrategyFromMeta))
Expand Down
8 changes: 4 additions & 4 deletions internal/meta/tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ import (
var _metaTokentMap = make(map[uint64]*sync.Map)

func initOrGetMetaTokenMap(chainID uint64) *sync.Map {
syncMap := _metaProtocolMap[chainID]
syncMap := _metaTokentMap[chainID]
if syncMap == nil {
syncMap = &sync.Map{}
_metaProtocolMap[chainID] = syncMap
_metaTokentMap[chainID] = syncMap
}
return syncMap
}

func init() {
for _, chainID := range env.SUPPORTED_CHAIN_IDS {
if _, ok := _metaProtocolMap[chainID]; !ok {
_metaProtocolMap[chainID] = &sync.Map{}
if _, ok := _metaTokentMap[chainID]; !ok {
_metaTokentMap[chainID] = &sync.Map{}
}
}
}
Expand Down

0 comments on commit 04bfe96

Please sign in to comment.