Merge pull request 'default-env-pool' (#76) from default-env-pool into master
Some checks failed
release / docker (push) Has been cancelled

Reviewed-on: #76
This commit is contained in:
Alfred Kamanda 2025-05-20 12:18:30 +02:00
commit 1d23a0cc4b
4 changed files with 27 additions and 8 deletions

View File

@ -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=

View File

@ -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", "")
}

View File

@ -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
}

View File

@ -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."
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."