aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet.ts')
-rw-r--r--src/wallet.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wallet.ts b/src/wallet.ts
index 9498fe820..01db8c612 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -2532,6 +2532,10 @@ export class Wallet {
}
}
+ /**
+ * Accept a refund, return the contract hash for the contract
+ * that was involved in the refund.
+ */
async acceptRefund(refundUrl: string): Promise<string> {
console.log("processing refund");
let resp;
@@ -2598,7 +2602,8 @@ export class Wallet {
return refundPermissions[0].h_contract_terms;
}
- async submitRefunds(contractTermsHash: string): Promise<void> {
+
+ private async submitRefunds(contractTermsHash: string): Promise<void> {
const purchase = await this.q().get(Stores.purchases, contractTermsHash);
if (!purchase) {
console.error("not submitting refunds, contract terms not found:", contractTermsHash);
@@ -2644,7 +2649,6 @@ export class Wallet {
return c;
};
-
await this.q()
.mutate(Stores.purchases, contractTermsHash, transformPurchase)
.mutate(Stores.coins, perm.coin_pub, transformCoin)