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