aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-09 15:56:05 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-09 15:56:05 +0100
commitee9adea89a5e8d0f33696e4e91967261f60b8f7b (patch)
tree093f638698fdc5e5727ab1ca91c3267c5d5a586f
parent3e6bd6351f5a581175a72200a876fb6c00ab879f (diff)
fix tipping
-rw-r--r--src/wallet.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wallet.ts b/src/wallet.ts
index bd31d3217..744eba16a 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -1185,7 +1185,8 @@ export class Wallet {
}
if (tip.accepted) {
- // Transactionall set coin to fresh.
+ console.log("untainting already accepted tip");
+ // Transactionally set coin to fresh.
const mutateCoin = (c: CoinRecord) => {
if (c.status === CoinStatus.TainedByTip) {
c.status = CoinStatus.Fresh;
@@ -1325,7 +1326,7 @@ export class Wallet {
denomSig,
exchangeBaseUrl: pc.exchangeBaseUrl,
reservePub: pc.reservePub,
- status: CoinStatus.Fresh,
+ status: pc.isFromTip ? CoinStatus.TainedByTip : CoinStatus.Fresh,
};
return coin;
}