Merge pull request #7463 from BlueWallet/structure

FIX: structuredClone isnt available on RN
This commit is contained in:
GLaDOS 2025-01-06 19:10:20 +00:00 committed by GitHub
commit 1c01d133e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,8 @@ export const NOTIFICATIONS_NO_AND_DONT_ASK_FLAG = 'NOTIFICATIONS_NO_AND_DONT_ASK
let alreadyConfigured = false;
let baseURI = groundControlUri;
const deepClone = obj => JSON.parse(JSON.stringify(obj));
const checkAndroidNotificationPermission = async () => {
try {
const { status } = await checkNotifications();
@ -324,7 +326,7 @@ export const configureNotifications = async onProcessNotifications => {
const handleNotification = async notification => {
// Deep clone to avoid modifying the original object
const payload = structuredClone({
const payload = deepClone({
...notification,
...notification.data,
});