Skip to content

Commit

Permalink
console: Convert EUIs to Base64 before calling Unclaim request
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishnaIyer committed Jul 10, 2023
1 parent 50f830d commit f5055d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/webui/console/views/device-general-settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
selectNsConfig,
} from '@ttn-lw/lib/selectors/env'

import { hexToBase64 } from '@console/lib/bytes'
import {
mayEditApplicationDeviceKeys,
mayReadApplicationDeviceKeys,
Expand Down Expand Up @@ -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 () => {
Expand Down

0 comments on commit f5055d9

Please sign in to comment.