-deep rename
This commit is contained in:
parent
357457018c
commit
fddc6eb4f2
@ -2030,7 +2030,7 @@ export interface PayCoinSelection {
|
||||
customerDepositFees: AmountString;
|
||||
}
|
||||
|
||||
export interface PreparePeerPushPaymentRequest {
|
||||
export interface CheckPeerPushDebitRequest {
|
||||
/**
|
||||
* Preferred exchange to use for the p2p payment.
|
||||
*/
|
||||
@ -2045,13 +2045,13 @@ export interface PreparePeerPushPaymentRequest {
|
||||
}
|
||||
|
||||
export const codecForPreparePeerPushPaymentRequest =
|
||||
(): Codec<PreparePeerPushPaymentRequest> =>
|
||||
buildCodecForObject<PreparePeerPushPaymentRequest>()
|
||||
(): Codec<CheckPeerPushDebitRequest> =>
|
||||
buildCodecForObject<CheckPeerPushDebitRequest>()
|
||||
.property("exchangeBaseUrl", codecOptional(codecForString()))
|
||||
.property("amount", codecForAmountString())
|
||||
.build("InitiatePeerPushPaymentRequest");
|
||||
.build("CheckPeerPushDebitRequest");
|
||||
|
||||
export interface PreparePeerPushPaymentResponse {
|
||||
export interface CheckPeerPushDebitResponse {
|
||||
amountRaw: AmountString;
|
||||
amountEffective: AmountString;
|
||||
}
|
||||
@ -2080,7 +2080,7 @@ export interface CheckPeerPushPaymentRequest {
|
||||
talerUri: string;
|
||||
}
|
||||
|
||||
export interface CheckPeerPullPaymentRequest {
|
||||
export interface PreparePeerPullDebitRequest {
|
||||
talerUri: string;
|
||||
}
|
||||
|
||||
@ -2090,7 +2090,7 @@ export interface CheckPeerPushPaymentResponse {
|
||||
peerPushPaymentIncomingId: string;
|
||||
}
|
||||
|
||||
export interface CheckPeerPullPaymentResponse {
|
||||
export interface PreparePeerPullDebitResponse {
|
||||
contractTerms: PeerContractTerms;
|
||||
/**
|
||||
* @deprecated Redundant field with bad name, will be removed soon.
|
||||
@ -2110,12 +2110,12 @@ export const codecForCheckPeerPushPaymentRequest =
|
||||
.build("CheckPeerPushPaymentRequest");
|
||||
|
||||
export const codecForCheckPeerPullPaymentRequest =
|
||||
(): Codec<CheckPeerPullPaymentRequest> =>
|
||||
buildCodecForObject<CheckPeerPullPaymentRequest>()
|
||||
(): Codec<PreparePeerPullDebitRequest> =>
|
||||
buildCodecForObject<PreparePeerPullDebitRequest>()
|
||||
.property("talerUri", codecForString())
|
||||
.build("CheckPeerPullPaymentRequest");
|
||||
.build("PreparePeerPullDebitRequest");
|
||||
|
||||
export interface AcceptPeerPushPaymentRequest {
|
||||
export interface ConfirmPeerPushCreditRequest {
|
||||
/**
|
||||
* Transparent identifier of the incoming peer push payment.
|
||||
*/
|
||||
@ -2130,12 +2130,12 @@ export interface AcceptPeerPullPaymentResponse {
|
||||
}
|
||||
|
||||
export const codecForAcceptPeerPushPaymentRequest =
|
||||
(): Codec<AcceptPeerPushPaymentRequest> =>
|
||||
buildCodecForObject<AcceptPeerPushPaymentRequest>()
|
||||
(): Codec<ConfirmPeerPushCreditRequest> =>
|
||||
buildCodecForObject<ConfirmPeerPushCreditRequest>()
|
||||
.property("peerPushPaymentIncomingId", codecForString())
|
||||
.build("AcceptPeerPushPaymentRequest");
|
||||
.build("ConfirmPeerPushCreditRequest");
|
||||
|
||||
export interface AcceptPeerPullPaymentRequest {
|
||||
export interface ConfirmPeerPullDebitRequest {
|
||||
/**
|
||||
* Transparent identifier of the incoming peer pull payment.
|
||||
*/
|
||||
@ -2162,40 +2162,40 @@ export const codecForApplyDevExperiment =
|
||||
.build("ApplyDevExperimentRequest");
|
||||
|
||||
export const codecForAcceptPeerPullPaymentRequest =
|
||||
(): Codec<AcceptPeerPullPaymentRequest> =>
|
||||
buildCodecForObject<AcceptPeerPullPaymentRequest>()
|
||||
(): Codec<ConfirmPeerPullDebitRequest> =>
|
||||
buildCodecForObject<ConfirmPeerPullDebitRequest>()
|
||||
.property("peerPullPaymentIncomingId", codecForString())
|
||||
.build("AcceptPeerPllPaymentRequest");
|
||||
.build("ConfirmPeerPullDebitRequest");
|
||||
|
||||
export interface PreparePeerPullPaymentRequest {
|
||||
export interface CheckPeerPullCreditRequest {
|
||||
exchangeBaseUrl?: string;
|
||||
amount: AmountString;
|
||||
}
|
||||
export const codecForPreparePeerPullPaymentRequest =
|
||||
(): Codec<PreparePeerPullPaymentRequest> =>
|
||||
buildCodecForObject<PreparePeerPullPaymentRequest>()
|
||||
(): Codec<CheckPeerPullCreditRequest> =>
|
||||
buildCodecForObject<CheckPeerPullCreditRequest>()
|
||||
.property("amount", codecForAmountString())
|
||||
.property("exchangeBaseUrl", codecOptional(codecForString()))
|
||||
.build("PreparePeerPullPaymentRequest");
|
||||
.build("CheckPeerPullCreditRequest");
|
||||
|
||||
export interface PreparePeerPullPaymentResponse {
|
||||
export interface CheckPeerPullCreditResponse {
|
||||
exchangeBaseUrl: string;
|
||||
amountRaw: AmountString;
|
||||
amountEffective: AmountString;
|
||||
}
|
||||
export interface InitiatePeerPullPaymentRequest {
|
||||
export interface InitiatePeerPullCreditRequest {
|
||||
exchangeBaseUrl?: string;
|
||||
partialContractTerms: PeerContractTerms;
|
||||
}
|
||||
|
||||
export const codecForInitiatePeerPullPaymentRequest =
|
||||
(): Codec<InitiatePeerPullPaymentRequest> =>
|
||||
buildCodecForObject<InitiatePeerPullPaymentRequest>()
|
||||
(): Codec<InitiatePeerPullCreditRequest> =>
|
||||
buildCodecForObject<InitiatePeerPullCreditRequest>()
|
||||
.property("partialContractTerms", codecForPeerContractTerms())
|
||||
.property("exchangeBaseUrl", codecOptional(codecForString()))
|
||||
.build("InitiatePeerPullPaymentRequest");
|
||||
.build("InitiatePeerPullCreditRequest");
|
||||
|
||||
export interface InitiatePeerPullPaymentResponse {
|
||||
export interface InitiatePeerPullCreditResponse {
|
||||
/**
|
||||
* Taler URI for the other party to make the payment
|
||||
* that was requested.
|
||||
|
@ -19,17 +19,17 @@
|
||||
*/
|
||||
import {
|
||||
AbsoluteTime,
|
||||
AcceptPeerPullPaymentRequest,
|
||||
ConfirmPeerPullDebitRequest,
|
||||
AcceptPeerPullPaymentResponse,
|
||||
AcceptPeerPushPaymentRequest,
|
||||
ConfirmPeerPushCreditRequest,
|
||||
AcceptPeerPushPaymentResponse,
|
||||
AgeCommitmentProof,
|
||||
AmountJson,
|
||||
Amounts,
|
||||
AmountString,
|
||||
buildCodecForObject,
|
||||
CheckPeerPullPaymentRequest,
|
||||
CheckPeerPullPaymentResponse,
|
||||
PreparePeerPullDebitRequest,
|
||||
PreparePeerPullDebitResponse,
|
||||
CheckPeerPushPaymentRequest,
|
||||
CheckPeerPushPaymentResponse,
|
||||
Codec,
|
||||
@ -48,8 +48,8 @@ import {
|
||||
ExchangePurseMergeRequest,
|
||||
ExchangeReservePurseRequest,
|
||||
getRandomBytes,
|
||||
InitiatePeerPullPaymentRequest,
|
||||
InitiatePeerPullPaymentResponse,
|
||||
InitiatePeerPullCreditRequest,
|
||||
InitiatePeerPullCreditResponse,
|
||||
InitiatePeerPushPaymentRequest,
|
||||
InitiatePeerPushPaymentResponse,
|
||||
j2s,
|
||||
@ -58,10 +58,10 @@ import {
|
||||
parsePayPushUri,
|
||||
PayPeerInsufficientBalanceDetails,
|
||||
PeerContractTerms,
|
||||
PreparePeerPullPaymentRequest,
|
||||
PreparePeerPullPaymentResponse,
|
||||
PreparePeerPushPaymentRequest,
|
||||
PreparePeerPushPaymentResponse,
|
||||
CheckPeerPullCreditRequest,
|
||||
CheckPeerPullCreditResponse,
|
||||
CheckPeerPushDebitRequest,
|
||||
CheckPeerPushDebitResponse,
|
||||
RefreshReason,
|
||||
strcmp,
|
||||
TalerErrorCode,
|
||||
@ -389,8 +389,8 @@ export async function getTotalPeerPaymentCost(
|
||||
|
||||
export async function preparePeerPushPayment(
|
||||
ws: InternalWalletState,
|
||||
req: PreparePeerPushPaymentRequest,
|
||||
): Promise<PreparePeerPushPaymentResponse> {
|
||||
req: CheckPeerPushDebitRequest,
|
||||
): Promise<CheckPeerPushDebitResponse> {
|
||||
const instructedAmount = Amounts.parseOrThrow(req.amount);
|
||||
const coinSelRes = await selectPeerCoins(ws, instructedAmount);
|
||||
if (coinSelRes.type === "failure") {
|
||||
@ -900,7 +900,7 @@ export async function processPeerPushCredit(
|
||||
|
||||
export async function acceptPeerPushPayment(
|
||||
ws: InternalWalletState,
|
||||
req: AcceptPeerPushPaymentRequest,
|
||||
req: ConfirmPeerPushCreditRequest,
|
||||
): Promise<AcceptPeerPushPaymentResponse> {
|
||||
let peerInc: PeerPushPaymentIncomingRecord | undefined;
|
||||
let contractTerms: PeerContractTerms | undefined;
|
||||
@ -1019,7 +1019,7 @@ export async function processPeerPullDebit(
|
||||
|
||||
export async function acceptIncomingPeerPullPayment(
|
||||
ws: InternalWalletState,
|
||||
req: AcceptPeerPullPaymentRequest,
|
||||
req: ConfirmPeerPullDebitRequest,
|
||||
): Promise<AcceptPeerPullPaymentResponse> {
|
||||
const peerPullInc = await ws.db
|
||||
.mktx((x) => [x.peerPullPaymentIncoming])
|
||||
@ -1115,8 +1115,8 @@ export async function acceptIncomingPeerPullPayment(
|
||||
*/
|
||||
export async function preparePeerPullCredit(
|
||||
ws: InternalWalletState,
|
||||
req: CheckPeerPullPaymentRequest,
|
||||
): Promise<CheckPeerPullPaymentResponse> {
|
||||
req: PreparePeerPullDebitRequest,
|
||||
): Promise<PreparePeerPullDebitResponse> {
|
||||
const uri = parsePayPullUri(req.talerUri);
|
||||
|
||||
if (!uri) {
|
||||
@ -1389,8 +1389,8 @@ async function getPreferredExchangeForCurrency(
|
||||
*/
|
||||
export async function checkPeerPullPaymentInitiation(
|
||||
ws: InternalWalletState,
|
||||
req: PreparePeerPullPaymentRequest,
|
||||
): Promise<PreparePeerPullPaymentResponse> {
|
||||
req: CheckPeerPullCreditRequest,
|
||||
): Promise<CheckPeerPullCreditResponse> {
|
||||
// FIXME: We don't support exchanges with purse fees yet.
|
||||
// Select an exchange where we have money in the specified currency
|
||||
// FIXME: How do we handle regional currency scopes here? Is it an additional input?
|
||||
@ -1419,8 +1419,8 @@ export async function checkPeerPullPaymentInitiation(
|
||||
*/
|
||||
export async function initiatePeerPullPayment(
|
||||
ws: InternalWalletState,
|
||||
req: InitiatePeerPullPaymentRequest,
|
||||
): Promise<InitiatePeerPullPaymentResponse> {
|
||||
req: InitiatePeerPullCreditRequest,
|
||||
): Promise<InitiatePeerPullCreditResponse> {
|
||||
const currency = Amounts.currencyOf(req.partialContractTerms.amount);
|
||||
let maybeExchangeBaseUrl: string | undefined;
|
||||
if (req.exchangeBaseUrl) {
|
||||
|
@ -29,8 +29,8 @@ import {
|
||||
AcceptExchangeTosRequest,
|
||||
AcceptManualWithdrawalRequest,
|
||||
AcceptManualWithdrawalResult,
|
||||
AcceptPeerPullPaymentRequest as ConfirmPeerPullDebitRequest,
|
||||
AcceptPeerPushPaymentRequest as ConfirmPeerPushCreditRequest,
|
||||
ConfirmPeerPullDebitRequest,
|
||||
ConfirmPeerPushCreditRequest,
|
||||
AcceptTipRequest,
|
||||
AcceptTipResponse,
|
||||
AcceptWithdrawalResponse,
|
||||
@ -42,8 +42,8 @@ import {
|
||||
ApplyRefundResponse,
|
||||
BackupRecovery,
|
||||
BalancesResponse,
|
||||
CheckPeerPullPaymentRequest as PreparePeerPullDebitRequest,
|
||||
CheckPeerPullPaymentResponse as PreparePeerPullDebitResponse,
|
||||
PreparePeerPullDebitRequest,
|
||||
PreparePeerPullDebitResponse,
|
||||
CheckPeerPushPaymentRequest,
|
||||
CheckPeerPushPaymentResponse,
|
||||
CoinDumpJson,
|
||||
@ -64,8 +64,8 @@ import {
|
||||
GetFeeForDepositRequest,
|
||||
GetWithdrawalDetailsForAmountRequest,
|
||||
GetWithdrawalDetailsForUriRequest,
|
||||
InitiatePeerPullPaymentRequest as InitiatePeerPullCreditRequest,
|
||||
InitiatePeerPullPaymentResponse as InitiatePeerPullCreditResponse,
|
||||
InitiatePeerPullCreditRequest,
|
||||
InitiatePeerPullCreditResponse,
|
||||
InitiatePeerPushPaymentRequest,
|
||||
InitiatePeerPushPaymentResponse,
|
||||
InitRequest,
|
||||
@ -79,10 +79,10 @@ import {
|
||||
PreparePayRequest,
|
||||
PreparePayResult,
|
||||
PreparePayTemplateRequest,
|
||||
PreparePeerPullPaymentRequest as CheckPeerPullCreditRequest,
|
||||
PreparePeerPullPaymentResponse as CheckPeerPullCreditResponse,
|
||||
PreparePeerPushPaymentRequest as CheckPeerPushDebitRequest,
|
||||
PreparePeerPushPaymentResponse as CheckPeerPushDebitResponse,
|
||||
CheckPeerPullCreditRequest,
|
||||
CheckPeerPullCreditResponse,
|
||||
CheckPeerPushDebitRequest,
|
||||
CheckPeerPushDebitResponse,
|
||||
PrepareRefundRequest,
|
||||
PrepareRefundResult,
|
||||
PrepareTipRequest,
|
||||
|
Loading…
Reference in New Issue
Block a user