diff --git a/.env.example b/.env.example index 7287e7c..bae96b5 100644 --- a/.env.example +++ b/.env.example @@ -21,3 +21,10 @@ LANGUAGES=eng, swa #Alias search domains ALIAS_SEARCH_DOMAINS=sarafu.local, sarafu.eth + +#Pool swap +DEFAULT_POOL_NAME="Kenya ROLA Pool" +DEFAULT_POOL_SYMBOL=ROLA +DEFAULT_POOL_CONTRACT_ADDRESS=0x48a953cA5cf5298bc6f6Af3C608351f537AAcb9e +DEFAULT_LIMITER_ADDRESS= +DEFAULT_VOUCHER_REGISTRY= diff --git a/config/config.go b/config/config.go index 863e418..9e8412e 100644 --- a/config/config.go +++ b/config/config.go @@ -25,7 +25,7 @@ const ( defaultSSHHost string = "127.0.0.1" defaultSSHPort uint = 7122 defaultHTTPHost string = "127.0.0.1" - defaultHTTPPort uint = 7123 + defaultHTTPPort uint = 7123 defaultDomain = "sarafu.local" ) @@ -52,7 +52,6 @@ func SearchDomains() []string { return ParsedDomains } - func Language() string { return viseconfig.DefaultLanguage } @@ -76,3 +75,15 @@ func PortSSH() uint { func ATEndpoint() string { return env.GetEnv("AT_ENDPOINT", "/") } + +func DefaultPoolAddress() string { + return env.GetEnv("DEFAULT_POOL_CONTRACT_ADDRESS", "") +} + +func DefaultPoolName() string { + return env.GetEnv("DEFAULT_POOL_NAME", "") +} + +func DefaultPoolSymbol() string { + return env.GetEnv("DEFAULT_POOL_SYMBOL", "") +} diff --git a/handlers/application/menuhandler.go b/handlers/application/menuhandler.go index 40abbe5..65fd259 100644 --- a/handlers/application/menuhandler.go +++ b/handlers/application/menuhandler.go @@ -2738,9 +2738,9 @@ func (h *MenuHandlers) LoadSwapToList(ctx context.Context, sym string, input []b } defaultPool := dataserviceapi.PoolDetails{ - PoolName: "Kenya ROLA Pool", - PoolSymbol: "ROLA", - PoolContractAdrress: "0x48a953cA5cf5298bc6f6Af3C608351f537AAcb9e", + PoolName: config.DefaultPoolName(), + PoolSymbol: config.DefaultPoolSymbol(), + PoolContractAdrress: config.DefaultPoolAddress(), LimiterAddress: "", VoucherRegistry: "", } @@ -2765,8 +2765,9 @@ func (h *MenuHandlers) LoadSwapToList(ctx context.Context, sym string, input []b if !r.CanSwapFrom { res.FlagSet = append(res.FlagSet, flag_incorrect_voucher) res.Content = l.Get( - "%s is not in the KENYA ROLA POOL. Please update your voucher and try again.", + "%s is not in %s. Please update your voucher and try again.", activeSym, + config.DefaultPoolName(), ) return res, nil } diff --git a/services/registration/locale/swa/default.po b/services/registration/locale/swa/default.po index 5e5d456..fbd92fb 100644 --- a/services/registration/locale/swa/default.po +++ b/services/registration/locale/swa/default.po @@ -37,5 +37,5 @@ msgstr "Ombi lako limetumwa. Utapokea SMS wakati %s %s yako itakapobadilishwa ku msgid "%s balance: %s\n" msgstr "%s salio: %s\n" -msgid "%s is not in the KENYA ROLA POOL. Please update your voucher and try again." -msgstr "%s haipo kwenye BWAWA LA KENYA ROLA. Tafadhali badilisha sarafu yako na ujaribu tena." \ No newline at end of file +msgid "%s is not in %s. Please update your voucher and try again." +msgstr "%s haipo kwenye %s. Tafadhali badilisha sarafu yako na ujaribu tena." \ No newline at end of file