summaryrefslogtreecommitdiff
path: root/src/util/wallet_signatures.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-14 16:04:32 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-14 16:04:40 +0100
commit1a1fafbd438f3f21a15c990d904e192b045d2391 (patch)
treecdd32023fd1d7c530caeae0487528d7eaac2aa29 /src/util/wallet_signatures.c
parentbf54ee30d4727217264f470321cc2f91facf63cc (diff)
downloadexchange-1a1fafbd438f3f21a15c990d904e192b045d2391.tar.gz
exchange-1a1fafbd438f3f21a15c990d904e192b045d2391.tar.bz2
exchange-1a1fafbd438f3f21a15c990d904e192b045d2391.zip
introducing GNUNET_TIME_Timestamp, recoup now with amounts
Diffstat (limited to 'src/util/wallet_signatures.c')
-rw-r--r--src/util/wallet_signatures.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/util/wallet_signatures.c b/src/util/wallet_signatures.c
index 8700d4a80..b895de14b 100644
--- a/src/util/wallet_signatures.c
+++ b/src/util/wallet_signatures.c
@@ -31,9 +31,9 @@ TALER_wallet_deposit_sign (
const struct TALER_PrivateContractHash *h_contract_terms,
const struct TALER_ExtensionContractHash *h_extensions,
const struct TALER_DenominationHash *h_denom_pub,
- struct GNUNET_TIME_Absolute wallet_timestamp,
+ struct GNUNET_TIME_Timestamp wallet_timestamp,
const struct TALER_MerchantPublicKeyP *merchant_pub,
- struct GNUNET_TIME_Absolute refund_deadline,
+ struct GNUNET_TIME_Timestamp refund_deadline,
const struct TALER_CoinSpendPrivateKeyP *coin_priv,
struct TALER_CoinSpendSignatureP *coin_sig)
{
@@ -43,17 +43,13 @@ TALER_wallet_deposit_sign (
.h_contract_terms = *h_contract_terms,
.h_wire = *h_wire,
.h_denom_pub = *h_denom_pub,
- .wallet_timestamp = GNUNET_TIME_absolute_hton (wallet_timestamp),
- .refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline),
+ .wallet_timestamp = GNUNET_TIME_timestamp_hton (wallet_timestamp),
+ .refund_deadline = GNUNET_TIME_timestamp_hton (refund_deadline),
.merchant = *merchant_pub
};
if (NULL != h_extensions)
dr.h_extensions = *h_extensions;
- GNUNET_assert (GNUNET_OK ==
- GNUNET_TIME_round_abs (&wallet_timestamp));
- GNUNET_assert (GNUNET_OK ==
- GNUNET_TIME_round_abs (&refund_deadline));
TALER_amount_hton (&dr.amount_with_fee,
amount);
TALER_amount_hton (&dr.deposit_fee,
@@ -72,9 +68,9 @@ TALER_wallet_deposit_verify (
const struct TALER_PrivateContractHash *h_contract_terms,
const struct TALER_ExtensionContractHash *h_extensions,
const struct TALER_DenominationHash *h_denom_pub,
- struct GNUNET_TIME_Absolute wallet_timestamp,
+ struct GNUNET_TIME_Timestamp wallet_timestamp,
const struct TALER_MerchantPublicKeyP *merchant_pub,
- struct GNUNET_TIME_Absolute refund_deadline,
+ struct GNUNET_TIME_Timestamp refund_deadline,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_CoinSpendSignatureP *coin_sig)
{
@@ -84,8 +80,8 @@ TALER_wallet_deposit_verify (
.h_contract_terms = *h_contract_terms,
.h_wire = *h_wire,
.h_denom_pub = *h_denom_pub,
- .wallet_timestamp = GNUNET_TIME_absolute_hton (wallet_timestamp),
- .refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline),
+ .wallet_timestamp = GNUNET_TIME_timestamp_hton (wallet_timestamp),
+ .refund_deadline = GNUNET_TIME_timestamp_hton (refund_deadline),
.merchant = *merchant_pub
};