aboutsummaryrefslogtreecommitdiff
path: root/src/wallet-impl
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-12-06 11:01:39 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-12-06 11:01:39 +0100
commit52da599ddbf5a72115544bc230cdefdb12811fd1 (patch)
treeabd90966659b0c60b8020643e2828bd913ad3db0 /src/wallet-impl
parente01f94e345bd94afe1643b55434a00c106d18954 (diff)
downloadwallet-core-52da599ddbf5a72115544bc230cdefdb12811fd1.tar.xz
don't die on auto-refund, fix pending operations
Diffstat (limited to 'src/wallet-impl')
-rw-r--r--src/wallet-impl/pending.ts19
-rw-r--r--src/wallet-impl/reserves.ts1
2 files changed, 4 insertions, 16 deletions
diff --git a/src/wallet-impl/pending.ts b/src/wallet-impl/pending.ts
index 2d4b16cf4..02f8d9ef9 100644
--- a/src/wallet-impl/pending.ts
+++ b/src/wallet-impl/pending.ts
@@ -18,7 +18,6 @@
* Imports.
*/
import {
- PendingOperationInfo,
PendingOperationsResponse,
getTimestampNow,
Timestamp,
@@ -158,20 +157,6 @@ async function gatherReservePending(
});
break;
case ReserveRecordStatus.WAIT_CONFIRM_BANK:
- if (onlyDue) {
- break;
- }
- resp.pendingOperations.push({
- type: "reserve",
- givesLifeness: false,
- stage: reserve.reserveStatus,
- timestampCreated: reserve.created,
- reserveType,
- reservePub: reserve.reservePub,
- bankWithdrawConfirmUrl: reserve.bankWithdrawConfirmUrl,
- retryInfo: reserve.retryInfo,
- });
- break;
case ReserveRecordStatus.WITHDRAWING:
case ReserveRecordStatus.QUERYING_STATUS:
case ReserveRecordStatus.REGISTERING_BANK:
@@ -327,9 +312,11 @@ async function gatherProposalPending(
resp.pendingOperations.push({
type: "proposal-download",
givesLifeness: true,
- merchantBaseUrl: proposal.download!!.contractTerms.merchant_base_url,
+ merchantBaseUrl: proposal.download?.contractTerms.merchant_base_url || "",
proposalId: proposal.proposalId,
proposalTimestamp: proposal.timestamp,
+ lastError: proposal.lastError,
+ retryInfo: proposal.retryInfo,
});
}
});
diff --git a/src/wallet-impl/reserves.ts b/src/wallet-impl/reserves.ts
index 8b8fbc7e3..d6568bd30 100644
--- a/src/wallet-impl/reserves.ts
+++ b/src/wallet-impl/reserves.ts
@@ -326,6 +326,7 @@ async function processReserveBankStatusImpl(
r.bankWithdrawConfirmUrl = status.confirm_transfer_url;
return r;
});
+ await incrementReserveRetry(ws, reservePub, undefined);
}
ws.notify( { type: NotificationType.Wildcard });
}