commit 606d25c3f17e219334ba744970843902f8d4117f
parent f1b3d8742d5675423d84a9f6185b5fdfa5cb9b45
Author: MS <ms@taler.net>
Date: Tue, 21 Feb 2023 13:07:12 +0100
fix warnings
Diffstat:
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/libeufin/api-common.rst b/libeufin/api-common.rst
@@ -16,6 +16,18 @@ Contact details
Phone numbers should start with the ``+`` symbol and the country code.
+Ratios and Fees
+^^^^^^^^^^^^^^^
+
+.. ts:def:: LibeufinNumber
+
+ type LibeufinNumber = number;
+
+**Note:** this quantity is normally enforced to have at most
+two decimal digits. The reason is to preserve the 2-decimal
+digits policy of the `Amount` type, as `LibeufinNumber` is used
+to multiply `Amount`.
+
Amounts
^^^^^^^
diff --git a/libeufin/api-sandbox.rst b/libeufin/api-sandbox.rst
@@ -410,8 +410,7 @@ Cashouts
:http:statuscode:`409 Conflict`:
At least the following two cases are possible
* an institutional user (``admin`` or ``bank``) tried the operation
- * the user changed their cash-out address between the creation
- and the confirmation of ``$cashoutId``.
+ * the user changed their cash-out address between the creation and the confirmation of ``$cashoutId``.
:http:statuscode:`412 Precondition failed`:
``$cashoutId`` was already confirmed.
@@ -440,13 +439,13 @@ Cashouts
interface RatiosAndFees {
// Exchange rate to buy the circuit currency from fiat.
- buy_at_ratio: float;
+ buy_at_ratio: LibeufinNumber;
// Exchange rate to sell the circuit currency for fiat.
- sell_at_ratio: float;
+ sell_at_ratio: LibeufinNumber;
// Fee to subtract after applying the buy ratio.
- buy_in_fee: float;
+ buy_in_fee: LibeufinNumber;
// Fee to subtract after applying the sell ratio.
- sell_out_fee: float;
+ sell_out_fee: LibeufinNumber;
}