From f5055d991f7101c64649b293ea4adeabb615b9f3 Mon Sep 17 00:00:00 2001 From: Krishna Iyer Easwaran Date: Thu, 6 Jul 2023 13:29:00 +0200 Subject: [PATCH] console: Convert EUIs to Base64 before calling Unclaim request --- pkg/webui/console/views/device-general-settings/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/webui/console/views/device-general-settings/index.js b/pkg/webui/console/views/device-general-settings/index.js index 8e6c895c45..a34ed6d021 100644 --- a/pkg/webui/console/views/device-general-settings/index.js +++ b/pkg/webui/console/views/device-general-settings/index.js @@ -36,6 +36,7 @@ import { selectNsConfig, } from '@ttn-lw/lib/selectors/env' +import { hexToBase64 } from '@console/lib/bytes' import { mayEditApplicationDeviceKeys, mayReadApplicationDeviceKeys, @@ -100,7 +101,9 @@ const DeviceGeneralSettings = () => { const { ids: { dev_eui: devEui, join_eui: joinEui }, } = device - await dispatch(attachPromise(unclaimDevice(appId, devId, devEui, joinEui))) + await dispatch( + attachPromise(unclaimDevice(appId, devId, hexToBase64(devEui), hexToBase64(joinEui))), + ) }, [appId, devId, device, dispatch]) const handleUnclaimFailure = useCallback(async () => {