diff options
Diffstat (limited to 'src/util/amount.c')
| -rw-r--r-- | src/util/amount.c | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util/amount.c b/src/util/amount.c index ae9ae652..3ce8c071 100644 --- a/src/util/amount.c +++ b/src/util/amount.c @@ -253,6 +253,20 @@ TALER_amount_is_zero (const struct TALER_Amount *amount)  } +enum GNUNET_GenericReturnValue +TALER_amount_is_currency (const struct TALER_Amount *amount, +                          const char *currency) +{ +  if (GNUNET_OK != +      TALER_amount_is_valid (amount)) +    return GNUNET_SYSERR; +  return (0 == strcasecmp (currency, +                           amount->currency)) +    ? GNUNET_OK +    : GNUNET_NO; +} + +  /**   * Test if @a a is valid, NBO variant.   *  | 
