From 8c0c4b5331d3cb467bb24c253fae3ca623ba5205 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 17 Oct 2016 15:58:36 +0200 Subject: automatic refresh --- lib/wallet/cryptoLib.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/wallet/cryptoLib.ts') diff --git a/lib/wallet/cryptoLib.ts b/lib/wallet/cryptoLib.ts index 3b9d6d228..2782327ac 100644 --- a/lib/wallet/cryptoLib.ts +++ b/lib/wallet/cryptoLib.ts @@ -203,6 +203,8 @@ namespace RpcFunctions { let newAmount = new native.Amount(cd.coin.currentAmount); newAmount.sub(coinSpend); cd.coin.currentAmount = newAmount.toJson(); + cd.coin.dirty = true; + cd.coin.transactionPending = true; let d = new native.DepositRequestPS({ h_contract: native.HashCode.fromCrock(offer.H_contract), @@ -338,4 +340,8 @@ namespace RpcFunctions { return refreshSession; } + export function hashString(str: string): string { + const b = native.ByteArray.fromStringWithNull(str); + return b.hash().toCrock(); + } } \ No newline at end of file -- cgit v1.2.3