-add more accounting fields to reserve table
This commit is contained in:
parent
cf358f9546
commit
b054c969cb
@ -106,6 +106,10 @@ BEGIN
|
||||
',reserve_pub BYTEA PRIMARY KEY CHECK(LENGTH(reserve_pub)=32)'
|
||||
',current_balance_val INT8 NOT NULL'
|
||||
',current_balance_frac INT4 NOT NULL'
|
||||
',purses_active INT8 NOT NULL DEFAULT(0)'
|
||||
',purses_allowed INT8 NOT NULL DEFAULT(0)'
|
||||
',kyc_required BOOLEAN NOT NULL DEFAULT(FALSE)'
|
||||
',kyc_passed BOOLEAN NOT NULL DEFAULT(FALSE)'
|
||||
',expiration_date INT8 NOT NULL'
|
||||
',gc_date INT8 NOT NULL'
|
||||
') %s ;'
|
||||
@ -2331,7 +2335,7 @@ BEGIN
|
||||
DROP CONSTRAINT IF EXISTS wads_in_pkey CASCADE
|
||||
,DROP CONSTRAINT IF EXISTS wads_in_wad_id_origin_exchange_url_key
|
||||
;
|
||||
|
||||
|
||||
ALTER TABLE IF EXISTS wad_in_entries
|
||||
DROP CONSTRAINT IF EXISTS wad_in_entries_pkey CASCADE
|
||||
;
|
||||
|
@ -99,7 +99,15 @@ COMMENT ON TABLE reserves
|
||||
COMMENT ON COLUMN reserves.reserve_pub
|
||||
IS 'EdDSA public key of the reserve. Knowledge of the private key implies ownership over the balance.';
|
||||
COMMENT ON COLUMN reserves.current_balance_val
|
||||
IS 'Current balance remaining with the reserve';
|
||||
IS 'Current balance remaining with the reserve.';
|
||||
COMMENT ON COLUMN reserves.purses_active
|
||||
IS 'Number of purses that were created by this reserve that are not expired and not fully paid.';
|
||||
COMMENT ON COLUMN reserves.purses_allowed
|
||||
IS 'Number of purses that this reserve is allowed to have active at most.';
|
||||
COMMENT ON COLUMN reserves.kyc_required
|
||||
IS 'True if a KYC check must have been passed before withdrawing from this reserve. Set to true once a reserve received a P2P payment.';
|
||||
COMMENT ON COLUMN reserves.kyc_passed
|
||||
IS 'True once KYC was passed for this reserve. The KYC details are then available via the wire_targets table under the key of wire_target_h_payto which is to be derived from the reserve_pub and the base URL of this exchange.';
|
||||
COMMENT ON COLUMN reserves.expiration_date
|
||||
IS 'Used to trigger closing of reserves that have not been drained after some time';
|
||||
COMMENT ON COLUMN reserves.gc_date
|
||||
|
@ -345,7 +345,7 @@ TALER_EXCHANGE_purse_create_with_merge (
|
||||
GNUNET_free (pcm);
|
||||
return NULL;
|
||||
}
|
||||
TALER_wallet_purse_create_sign (purse_expiration,
|
||||
TALER_wallet_purse_create_sign (pcm->purse_expiration,
|
||||
&pcm->h_contract_terms,
|
||||
&merge_pub,
|
||||
min_age,
|
||||
@ -359,7 +359,7 @@ TALER_EXCHANGE_purse_create_with_merge (
|
||||
&merge_sig);
|
||||
TALER_wallet_account_merge_sign (merge_timestamp,
|
||||
&pcm->purse_pub,
|
||||
purse_expiration,
|
||||
pcm->purse_expiration,
|
||||
&pcm->h_contract_terms,
|
||||
&pcm->purse_value_after_fees,
|
||||
min_age,
|
||||
@ -416,7 +416,7 @@ TALER_EXCHANGE_purse_create_with_merge (
|
||||
GNUNET_JSON_pack_timestamp ("merge_timestamp",
|
||||
merge_timestamp),
|
||||
GNUNET_JSON_pack_timestamp ("purse_expiration",
|
||||
purse_expiration));
|
||||
pcm->purse_expiration));
|
||||
GNUNET_assert (NULL != create_with_merge_obj);
|
||||
GNUNET_free (econtract);
|
||||
eh = TALER_EXCHANGE_curl_easy_get_ (pcm->url);
|
||||
|
Loading…
Reference in New Issue
Block a user