summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-20 01:20:41 +0100
committerFlorian Dold <florian@dold.me>2023-02-20 01:20:41 +0100
commitfddc6eb4f21e7b85f089d5bf532580c3da874d54 (patch)
treec538bb5485fae6767c70fc031ea4652af0dfd5b3 /packages/taler-wallet-core/src/operations
parent357457018cd4f9feb4f15bc5b801af63bc4779bd (diff)
downloadwallet-core-fddc6eb4f21e7b85f089d5bf532580c3da874d54.tar.gz
wallet-core-fddc6eb4f21e7b85f089d5bf532580c3da874d54.tar.bz2
wallet-core-fddc6eb4f21e7b85f089d5bf532580c3da874d54.zip
-deep rename
Diffstat (limited to 'packages/taler-wallet-core/src/operations')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer.ts40
1 files changed, 20 insertions, 20 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts
index 27363cb3e..ed4e57eea 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer.ts
@@ -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) {