remove type literal
This commit is contained in:
parent
d0d7685f16
commit
d97f440f25
@ -159,6 +159,18 @@ export const codecForGetBalanceDetailRequest =
|
|||||||
.property("currency", codecForString())
|
.property("currency", codecForString())
|
||||||
.build("GetBalanceDetailRequest");
|
.build("GetBalanceDetailRequest");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* How the amount should be interpreted in a transaction
|
||||||
|
* Effective = how the balance is change
|
||||||
|
* Raw = effective amount without fee
|
||||||
|
*
|
||||||
|
* Depending on the transaction, raw can be higher than effective
|
||||||
|
*/
|
||||||
|
export enum TransactionAmountMode {
|
||||||
|
Effective = "effective",
|
||||||
|
Raw = "raw",
|
||||||
|
}
|
||||||
|
|
||||||
export type GetPlanForOperationRequest =
|
export type GetPlanForOperationRequest =
|
||||||
| GetPlanForWithdrawRequest
|
| GetPlanForWithdrawRequest
|
||||||
| GetPlanForDepositRequest;
|
| GetPlanForDepositRequest;
|
||||||
@ -172,7 +184,7 @@ export type GetPlanForOperationRequest =
|
|||||||
|
|
||||||
interface GetPlanForWalletInitiatedOperation {
|
interface GetPlanForWalletInitiatedOperation {
|
||||||
instructedAmount: AmountString;
|
instructedAmount: AmountString;
|
||||||
mode: "raw" | "effective";
|
mode: TransactionAmountMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface GetPlanToCompleteOperation {
|
interface GetPlanToCompleteOperation {
|
||||||
@ -186,8 +198,8 @@ const codecForGetPlanForWalletInitiatedOperation = <
|
|||||||
.property(
|
.property(
|
||||||
"mode",
|
"mode",
|
||||||
codecForEither(
|
codecForEither(
|
||||||
codecForConstString("raw"),
|
codecForConstString(TransactionAmountMode.Raw),
|
||||||
codecForConstString("effective"),
|
codecForConstString(TransactionAmountMode.Effective),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.property("instructedAmount", codecForAmountString());
|
.property("instructedAmount", codecForAmountString());
|
||||||
|
Loading…
Reference in New Issue
Block a user