Fix parseKeys related to price alert open action

pull/290/head
Vuong 3 years ago
parent fdc9664842
commit 6402c67a34
No known key found for this signature in database
GPG Key ID: 6180BBA961D18ED4

@ -51,8 +51,11 @@ func (ct *Cointop) ParseKeys(s string) (interface{}, tcell.ModMask) {
mod := tcell.ModNone
// translate legacy and special names for keys
keyName := keyMap(s)
if len(s) > 1 {
keyName := strings.TrimSpace(strings.Replace(s, "+", "-", -1))
split := strings.Split(keyName, "-")
if len(split) > 1 {
m := strings.ToLower(strings.TrimSpace(split[0]))
k := strings.TrimSpace(split[1])
@ -71,8 +74,7 @@ func (ct *Cointop) ParseKeys(s string) (interface{}, tcell.ModMask) {
keyName = m + "-" + k
}
// TODO: other mods?
} else {
keyName = keyMap(keyName)
}
}
// First try looking up keyname directly

Loading…
Cancel
Save