diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-02-09 21:56:06 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-02-09 21:56:06 +0100 |
commit | 5e85cd8b8fa25ed3fbfc260b48bcad098978407a (patch) | |
tree | 3c875261e2c3fa2176911caefc4dcf225a04df74 /extension/lib/web-common.ts | |
parent | 42a0076f5951d303635b2e544aa66112cdb9abfe (diff) |
new reserve creation protocol
Diffstat (limited to 'extension/lib/web-common.ts')
-rw-r--r-- | extension/lib/web-common.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extension/lib/web-common.ts b/extension/lib/web-common.ts index 34ae2a1a8..96f9b61b7 100644 --- a/extension/lib/web-common.ts +++ b/extension/lib/web-common.ts @@ -14,8 +14,14 @@ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> */ +import {AmountJson} from "./wallet/types"; export function substituteFulfillmentUrl(url: string, vars) { url = url.replace("${H_contract}", vars.H_contract); url = url.replace("${$}", "$"); return url; +} + +export function amountToPretty(amount: AmountJson): string { + let x = amount.value + amount.fraction / 1e6; + return `${x} ${amount.currency}`; }
\ No newline at end of file |