do not truncate amounts

This commit is contained in:
Florian Dold 2016-11-17 14:29:16 +01:00
parent 2cb642aac0
commit b078844c7f
4 changed files with 5 additions and 4 deletions

View File

@ -4,8 +4,8 @@
"name": "GNU Taler Wallet (git)", "name": "GNU Taler Wallet (git)",
"description": "Privacy preserving and transparent payments", "description": "Privacy preserving and transparent payments",
"author": "GNU Taler Developers", "author": "GNU Taler Developers",
"version": "0.6.28", "version": "0.6.29",
"version_name": "0.1.4", "version_name": "0.1.5",
"minimum_chrome_version": "49", "minimum_chrome_version": "49",
"minimum_opera_version": "36", "minimum_opera_version": "36",

View File

@ -25,7 +25,7 @@ import {AmountJson, Contract, Amounts} from "./types";
export function prettyAmount(amount: AmountJson) { export function prettyAmount(amount: AmountJson) {
let v = amount.value + amount.fraction / Amounts.fractionalBase; let v = amount.value + amount.fraction / Amounts.fractionalBase;
return `${v.toFixed(2)} ${amount.currency}`; return `${v} ${amount.currency}`;
} }
export function renderContract(contract: Contract): JSX.Element { export function renderContract(contract: Contract): JSX.Element {

View File

@ -509,7 +509,7 @@ export type PayCoinInfo = Array<{ updatedCoin: CoinRecord, sig: CoinPaySig }>;
export namespace Amounts { export namespace Amounts {
export const fractionalBase = 1e6; export const fractionalBase = 1e8;
export interface Result { export interface Result {
amount: AmountJson; amount: AmountJson;

View File

@ -728,6 +728,7 @@ export class Wallet {
private async processPreCoin(preCoin: PreCoinRecord, private async processPreCoin(preCoin: PreCoinRecord,
retryDelayMs = 200): Promise<void> { retryDelayMs = 200): Promise<void> {
return;
if (this.processPreCoinConcurrent >= 1) { if (this.processPreCoinConcurrent >= 1) {
console.log("delaying processPreCoin"); console.log("delaying processPreCoin");
setTimeout(() => this.processPreCoin(preCoin, retryDelayMs * 2), setTimeout(() => this.processPreCoin(preCoin, retryDelayMs * 2),