Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass gateway to create subscription request #639

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const NOTIFICATIONS_SCHEMA = {
// optional
}),
},
replyPost: {
comment: {
title: (accountId) => `${accountId} replied to your post`,
options: (props) => ({
...getOptions(props),
Expand Down
2 changes: 2 additions & 0 deletions src/utils/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {

const applicationServerKey = 'BH_QFHjBU9x3VlmE9_XM4Awhm5vj2wF9WNQIz5wdlO6hc5anwEHLu6NLW521kCom7o9xChL5xvwTsHLK4dZpVVc';
const HOST = 'https://notification-server-mainnet-7tk2cmmtcq-ew.a.run.app';
const GATEWAY_URL = 'https://beta.near.org';

// Will be used for error handling in future works
const isIOS = () => {
Expand Down Expand Up @@ -97,6 +98,7 @@ export const handleTurnOn = async (accountId: string, hideModal: () => void) =>
await sendToPushServer({
subscription,
accountId,
gateway: GATEWAY_URL,
});

setProcessSuccess();
Expand Down