mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 13:26:33 +01:00
FIX: structuredClone isnt available on RN
This commit is contained in:
parent
4f4131c7cd
commit
d9840b3202
@ -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();
|
||||
@ -323,8 +325,8 @@ export const configureNotifications = async onProcessNotifications => {
|
||||
};
|
||||
|
||||
const handleNotification = async notification => {
|
||||
// Deep clone to avoid modifying the original object
|
||||
const payload = structuredClone({
|
||||
// Deep clone to avoid modifying the original object
|
||||
const payload = deepClone({
|
||||
...notification,
|
||||
...notification.data,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user