aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/context/config.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-04-04 16:24:55 -0300
committerSebastian <sebasjm@gmail.com>2024-04-04 16:25:08 -0300
commit072ac43b9f69807b8514eb11f8214637561a2573 (patch)
treeb5b464682589f2b80dc4d8f547e9d549a4df353a /packages/aml-backoffice-ui/src/context/config.ts
parent01838bfcc74a2e4e828885d5ab0d6f64cc96f328 (diff)
downloadwallet-core-072ac43b9f69807b8514eb11f8214637561a2573.tar.xz
fix some API differences including whatwg-url params
Diffstat (limited to 'packages/aml-backoffice-ui/src/context/config.ts')
-rw-r--r--packages/aml-backoffice-ui/src/context/config.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/aml-backoffice-ui/src/context/config.ts b/packages/aml-backoffice-ui/src/context/config.ts
index 0ea491ca4..7004225eb 100644
--- a/packages/aml-backoffice-ui/src/context/config.ts
+++ b/packages/aml-backoffice-ui/src/context/config.ts
@@ -65,7 +65,9 @@ export const ExchangeApiProvider = ({
useEffect(() => {
api.getConfig()
.then((resp) => {
- if (api.isCompatible(resp.body.version)) {
+ if (resp.type === "fail") {
+ setChecked({ type: "error", error: TalerError.fromUncheckedDetail(resp.detail) });
+ }else if (api.isCompatible(resp.body.version)) {
setChecked({ type: "ok", config: resp.body });
} else {
setChecked({ type: "incompatible", result: resp.body, supported: api.PROTOCOL_VERSION })