taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 3fd51ec65de79ac50be0e927a29eeb281ce15aff
parent f0e6ba86795d3669e10e5d108d849f9985dbb6c9
Author: Sebastian <sebasjm@gmail.com>
Date:   Wed, 31 Jul 2024 12:04:27 -0300

add support to taler proto duration

Diffstat:
Mpackages/merchant-backoffice-ui/src/components/form/InputDuration.tsx | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/packages/merchant-backoffice-ui/src/components/form/InputDuration.tsx b/packages/merchant-backoffice-ui/src/components/form/InputDuration.tsx @@ -52,7 +52,10 @@ export function InputDuration<T>({ const { error, required, value: anyValue, onChange } = useField<T>(name); let strValue = ""; - const value: Duration = anyValue; + const value: Duration = + anyValue.d_us !== undefined + ? Duration.fromTalerProtocolDuration(anyValue) + : anyValue; if (!value) { strValue = ""; } else if (value.d_ms === "forever") {