some changes to payment text generation

This commit is contained in:
Evan Kranzler 2022-02-19 17:41:57 -05:00
parent fe42bc6e49
commit 4868afe0e0
8 changed files with 25 additions and 48 deletions

View file

@ -1284,8 +1284,11 @@ public final class CardUtil {
return zcc;
}
public static boolean checkCostWords(String text) {
return text != null && costWords.stream().anyMatch(text.toLowerCase(Locale.ENGLISH)::startsWith);
public static String addCostVerb(String text) {
if (costWords.stream().anyMatch(text.toLowerCase(Locale.ENGLISH)::startsWith)) {
return text;
}
return "pay " + text;
}
/**