diff options
author | Sebastian <sebasjm@gmail.com> | 2024-03-22 15:15:15 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-03-26 16:57:58 -0300 |
commit | 5181d060cf09ffc7250c9f1069920da0724e0284 (patch) | |
tree | 477312c567976c63caa101202bc525490727c096 /packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx | |
parent | e2bfbced7ab027c901913e83ff7dd82240661990 (diff) | |
download | wallet-core-5181d060cf09ffc7250c9f1069920da0724e0284.tar.xz |
wip, doesn't compile. now merchant doesn't have it's own definition of types... it uses the one defined by taler-util
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx b/packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx index f60508504..76d38db84 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx @@ -20,9 +20,9 @@ */ import { useMerchantApiContext } from "@gnu-taler/web-util/browser"; import { ComponentChildren, h, VNode } from "preact"; -import { Amount } from "../../declaration.js"; import { InputWithAddon } from "./InputWithAddon.js"; import { InputProps } from "./useField.js"; +import { AmountString } from "@gnu-taler/taler-util"; export interface Props<T> extends InputProps<T> { expand?: boolean; @@ -57,7 +57,7 @@ export function InputCurrency<T>({ addonAfter={addonAfter} inputType="number" expand={expand} - toStr={(v?: Amount) => v?.split(":")[1] || ""} + toStr={(v?: AmountString) => v?.split(":")[1] || ""} fromStr={(v: string) => (!v ? undefined : `${config.currency}:${v}`)} inputExtra={{ min: 0 }} > |