mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 07:28:07 +01:00
Update blue_modules/notifications.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
43d5a44ad0
commit
8ab9f19b42
1 changed files with 6 additions and 3 deletions
|
@ -279,9 +279,12 @@ export const configureNotifications = async onProcessNotifications => {
|
|||
|
||||
if (notification.data?.data) {
|
||||
// Validate data before merging
|
||||
const validData = Object.entries(notification.data.data)
|
||||
.filter(([_, value]) => value !== null && value !== undefined)
|
||||
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {});
|
||||
const validData = {};
|
||||
for (const [key, value] of Object.entries(notification.data.data)) {
|
||||
if (value != null) {
|
||||
validData[key] = value;
|
||||
}
|
||||
}
|
||||
Object.assign(payload, validData);
|
||||
}
|
||||
payload.data = undefined;
|
||||
|
|
Loading…
Add table
Reference in a new issue