Skip to content

Commit

Permalink
fix: updated firebase-admin lib version and deprecated sendMulticast
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabadesso committed Nov 25, 2024
1 parent 7a1179c commit e2e0884
Show file tree
Hide file tree
Showing 4 changed files with 380 additions and 631 deletions.
2 changes: 1 addition & 1 deletion packages/wallet-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"bitcoinjs-message": "2.2.0",
"bitcore-lib": "8.25.10",
"bitcore-mnemonic": "8.25.10",
"firebase-admin": "11.3.0",
"firebase-admin": "13.0.0",
"joi": "17.4.0",
"jsonwebtoken": "8.5.1",
"lodash": "4.17.21",
Expand Down
3 changes: 2 additions & 1 deletion packages/wallet-service/src/utils/pushnotification.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ export class PushNotificationUtils {
},
},
};
const multicastResult = await messaging().sendMulticast(message);

const multicastResult = await messaging().sendEachForMulticast(message);

if (multicastResult.failureCount === 0) {
return { success: true };
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet-service/tests/utils/firebase-admin.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default jest.mock('firebase-admin', () => ({
},
initializeApp: initFirebaseAdminMock,
messaging: messaging.mockImplementation(() => ({
sendMulticast: sendMulticastMock.mockReturnValue({
sendEachForMulticast: sendMulticastMock.mockReturnValue({
failureCount: 0,
}),
})),
Expand Down
Loading

0 comments on commit e2e0884

Please sign in to comment.