fix: loading systemAddress

This commit is contained in:
Mohamed Sohail 2023-03-11 09:39:26 +00:00
parent 94f1f3bc2c
commit 8b14445c88
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D

View File

@ -9,10 +9,13 @@ import (
) )
var ( var (
systemAddress = ko.MustString("chain.system_address") systemAddress string
) )
func initAddressFilter() filter.Filter { func initAddressFilter() filter.Filter {
// TODO: Temporary shortcut
systemAddress = ko.MustString("chain.system_address")
// TODO: Bootstrap addresses from smart contract // TODO: Bootstrap addresses from smart contract
// TODO: Add route to update cache // TODO: Add route to update cache
cache := &sync.Map{} cache := &sync.Map{}
@ -22,9 +25,8 @@ func initAddressFilter() filter.Filter {
cache.Store(strings.ToLower(ko.MustString("chain.user_index_address")), "UserIndex") cache.Store(strings.ToLower(ko.MustString("chain.user_index_address")), "UserIndex")
return filter.NewAddressFilter(filter.AddressFilterOpts{ return filter.NewAddressFilter(filter.AddressFilterOpts{
Cache: cache, Cache: cache,
Logg: lo, Logg: lo,
// TODO: Temporary shortcut
SystemAddress: systemAddress, SystemAddress: systemAddress,
}) })
} }