summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts27
1 files changed, 4 insertions, 23 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index 01df4a5e1..6009ff096 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -80,7 +80,7 @@ import {
codecForGetWithdrawalDetailsForUri,
codecForImportDbRequest,
codecForInitiatePeerPullPaymentRequest,
- codecForInitiatePeerPushPaymentRequest,
+ codecForInitiatePeerPushDebitRequest,
codecForIntegrationTestArgs,
codecForIntegrationTestV2Args,
codecForListKnownBankAccounts,
@@ -202,7 +202,7 @@ import {
confirmPeerPullDebit,
confirmPeerPushCredit,
initiatePeerPullPayment,
- initiatePeerPushPayment,
+ initiatePeerPushDebit,
preparePeerPullDebit,
preparePeerPushCredit,
processPeerPullCredit,
@@ -1443,8 +1443,8 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>(
return await checkPeerPushDebit(ws, req);
}
case WalletApiOperation.InitiatePeerPushDebit: {
- const req = codecForInitiatePeerPushPaymentRequest().decode(payload);
- return await initiatePeerPushPayment(ws, req);
+ const req = codecForInitiatePeerPushDebitRequest().decode(payload);
+ return await initiatePeerPushDebit(ws, req);
}
case WalletApiOperation.PreparePeerPushCredit: {
const req = codecForPreparePeerPushCreditRequest().decode(payload);
@@ -1502,23 +1502,6 @@ export function getVersion(ws: InternalWalletState): WalletCoreVersion {
return version;
}
-function translateLegacyOperationNames(operation: string): string {
- switch (operation) {
- case "initiatePeerPullPayment":
- return WalletApiOperation.InitiatePeerPullCredit.toString();
- case "initiatePeerPushPayment":
- return WalletApiOperation.InitiatePeerPushDebit.toString();
- case "checkPeerPullPayment":
- return WalletApiOperation.PreparePeerPullDebit.toString();
- case "acceptPeerPullPayment":
- return WalletApiOperation.ConfirmPeerPullDebit.toString();
- case "checkPeerPushPayment":
- return WalletApiOperation.PreparePeerPushCredit.toString();
- case "acceptPeerPushPayment":
- return WalletApiOperation.ConfirmPeerPushCredit.toString();
- }
- return operation;
-}
/**
* Handle a request to the wallet-core API.
@@ -1529,8 +1512,6 @@ export async function handleCoreApiRequest(
id: string,
payload: unknown,
): Promise<CoreApiResponse> {
- operation = translateLegacyOperationNames(operation);
-
try {
const result = await dispatchRequestInternal(ws, operation as any, payload);
return {