Skip to content

Commit

Permalink
fix: Push notifications toggle (#4254)
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan authored Sep 27, 2024
1 parent 14c5da5 commit 5087ae8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { registerDevice, unregisterDevice, unregisterSafe } from '@safe-global/safe-gateway-typescript-sdk'
import isEmpty from 'lodash/isEmpty'

import { useAppDispatch } from '@/store'
import { showNotification } from '@/store/notificationsSlice'
Expand All @@ -19,7 +20,7 @@ const registrationFlow = async (registrationFn: Promise<unknown>, callback: () =

// Gateway will return 200 with an empty payload if the device was (un-)registered successfully
// @see https://github.com/safe-global/safe-client-gateway-nest/blob/27b6b3846b4ecbf938cdf5d0595ca464c10e556b/src/routes/notifications/notifications.service.ts#L29
success = response == null
success = isEmpty(response)
} catch (e) {
logError(ErrorCodes._633, e)
}
Expand Down

0 comments on commit 5087ae8

Please sign in to comment.