commit ee15e3d6192eca5dbe9c957dc0fc421efc77abd4
parent 15f1e00a6d1e1202a2fb195adbe28b5b2abe9982
Author: Antoine A <>
Date: Wed, 16 Apr 2025 18:00:16 +0200
wallet-core: fix peer-push-credit
Diffstat:
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts
@@ -474,7 +474,7 @@ export class GlobalTestState {
}
// Now we just log, later we may report the steps that were done
// to easily see where the test hangs.
- console.info(`STEP: ${stepName}`);
+ logger.info(`STEP: ${stepName}`);
let steps = `${this.testDir}/steps.txt`;
fs.appendFileSync(steps, `STEP ${stepName}\n`);
}
diff --git a/packages/taler-wallet-core/src/pay-peer-push-credit.ts b/packages/taler-wallet-core/src/pay-peer-push-credit.ts
@@ -1191,7 +1191,15 @@ async function processPeerPushCreditBalanceKyc(
peerInc.status === PeerPushCreditStatus.PendingBalanceKycInit &&
ret.walletKycStatus === ExchangeWalletKycStatus.Legi
) {
- await ctx.transitionStatus(PeerPushCreditStatus.PendingBalanceKycInit, PeerPushCreditStatus.PendingBalanceKycRequired);
+ await ctx.transition({}, async (rec) => {
+ if (rec.status === PeerPushCreditStatus.PendingBalanceKycInit) {
+ rec.status = PeerPushCreditStatus.PendingBalanceKycRequired
+ rec.kycAccessToken = ret.walletKycAccessToken
+ return TransitionResultType.Transition
+ } else {
+ return TransitionResultType.Stay
+ }
+ })
return TaskRunResult.progress();
} else {
throw Error("not reached");