summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2020-11-16 14:12:37 +0100
committerFlorian Dold <florian@dold.me>2020-11-16 14:12:37 +0100
commit292160f7e979a0d9fdea7430f0d26b2dc1122a16 (patch)
treef82a576398408ebbe04d96a93355de61d745c925 /packages/taler-wallet-core/src/operations
parentcdf5cc583cd7fc938f38137da25aaee2aeaf28a9 (diff)
downloadwallet-core-292160f7e979a0d9fdea7430f0d26b2dc1122a16.tar.gz
wallet-core-292160f7e979a0d9fdea7430f0d26b2dc1122a16.tar.bz2
wallet-core-292160f7e979a0d9fdea7430f0d26b2dc1122a16.zip
fix tip record creation, migrate DB
Diffstat (limited to 'packages/taler-wallet-core/src/operations')
-rw-r--r--packages/taler-wallet-core/src/operations/tip.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts
index 08f45eb89..3b8ac0269 100644
--- a/packages/taler-wallet-core/src/operations/tip.ts
+++ b/packages/taler-wallet-core/src/operations/tip.ts
@@ -46,6 +46,7 @@ import { Logger } from "../util/logging";
import { checkDbInvariant } from "../util/invariants";
import { TalerErrorCode } from "../TalerErrorCode";
import { initRetryInfo, updateRetryInfoTimeout } from "../util/retries";
+import { j2s } from '../util/helpers';
const logger = new Logger("operations/tip.ts");
@@ -68,7 +69,7 @@ export async function prepareTip(
merchantResp,
codecForTipPickupGetResponse(),
);
- logger.trace(`status ${tipPickupStatus}`);
+ logger.trace(`status ${j2s(tipPickupStatus)}`);
const amount = Amounts.parseOrThrow(tipPickupStatus.tip_amount);
@@ -80,6 +81,7 @@ export async function prepareTip(
]);
if (!tipRecord) {
+ logger.trace("new tip, creating tip record");
await updateExchangeFromUrl(ws, tipPickupStatus.exchange_url);
const withdrawDetails = await getExchangeWithdrawalInfo(
ws,
@@ -232,7 +234,7 @@ async function processTipImpl(
}));
const tipStatusUrl = new URL(
- `/tips/${tipRecord.merchantTipId}/pickup`,
+ `tips/${tipRecord.merchantTipId}/pickup`,
tipRecord.merchantBaseUrl,
);