Skip to content

Commit

Permalink
Merge branch 'master' into feature/pangea_mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
n13 committed Oct 24, 2024
2 parents d4b92ea + 2d14e36 commit fa45d20
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 38 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/pangea-testnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- feature/deploy-with-github-actions
- feature/pangea_testnet

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -41,6 +40,24 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Debug Environment Variables
run: |
echo "Debugging Environment Variables:"
echo "chainId: $chainId"
echo "eosHistoryEndpoint: $eosHistoryEndpoint"
echo "eosHttpEndpoint: $eosHttpEndpoint"
echo "authVerifier: $authVerifier"
echo "authContract: $authContract"
echo "authRetries: $authRetries"
echo "startAuthTimeout: $startAuthTimeout"
echo "minAuthTimeout: $minAuthTimeout"
echo "authCodeMinutesTTL: $authCodeMinutesTTL"
echo "accessTokenMinutesTTL: $accessTokenMinutesTTL"
echo "refreshTokenMinutesTTL: $refreshTokenMinutesTTL"
echo "sentryDsn is set"
echo "sendGridKey is set"
echo "twilioAuthToken is set"
- name: serverless deploy
uses: serverless/github-action@v3.1
with:
Expand Down
6 changes: 3 additions & 3 deletions get-chats.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as Sentry from '@sentry/node';
// import * as Sentry from '@sentry/node';
import { ResponseUtil } from './util';
import { ChatDao } from "./dao";
import { AuthApiFactory } from "./service";

Sentry.init({ dsn: process.env.sentryDsn });
// Sentry.init({ dsn: process.env.sentryDsn });

const chatDao = new ChatDao();

Expand Down Expand Up @@ -32,7 +32,7 @@ export async function main(event, context) {
});
} catch (e) {
console.error(e);
Sentry.captureException(e);
// Sentry.captureException(e);
return ResponseUtil.failure(e);
}
}
6 changes: 3 additions & 3 deletions get-messages.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as Sentry from '@sentry/node';
// import * as Sentry from '@sentry/node';
import { ResponseUtil } from './util';
import { MessageDao } from "./dao";
import { AuthApiFactory } from "./service";

Sentry.init({ dsn: process.env.sentryDsn });
// Sentry.init({ dsn: process.env.sentryDsn });
const messageDao = new MessageDao();

export async function main(event, context) {
Expand Down Expand Up @@ -34,7 +34,7 @@ export async function main(event, context) {
});
} catch (e) {
console.error(e);
Sentry.captureException(e);
// Sentry.captureException(e);
return ResponseUtil.failure(e);
}
}
6 changes: 3 additions & 3 deletions get-profile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as Sentry from '@sentry/node';
// import * as Sentry from '@sentry/node';
import { ProfileFetchTypes } from "@hypha-dao/ppp-common";
import { ResponseUtil } from './util';
import { ProfileDao } from "./dao";
import { AuthApiFactory, OauthAuthApi } from "./service";
import { AccessTypes } from "./const";

Sentry.init({ dsn: process.env.sentryDsn });
// Sentry.init({ dsn: process.env.sentryDsn });

const profileDao = new ProfileDao();

Expand Down Expand Up @@ -39,7 +39,7 @@ export async function main(event, context) {
});
} catch (e) {
console.error(e);
Sentry.captureException(e);
// Sentry.captureException(e);
return ResponseUtil.failure(e);
}
}
6 changes: 3 additions & 3 deletions get-profiles.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as Sentry from '@sentry/node';
// import * as Sentry from '@sentry/node';
import { AppIds, ProfileFetchTypes } from "@hypha-dao/ppp-common";
import { ResponseUtil } from './util';
import { ProfileDao } from "./dao";
import { AuthApiFactory } from "./service";
import { AccessTypes } from "./const";

Sentry.init({ dsn: process.env.sentryDsn });
// Sentry.init({ dsn: process.env.sentryDsn });

const profileDao = new ProfileDao();

Expand Down Expand Up @@ -38,7 +38,7 @@ export async function main(event, context) {
return ResponseUtil.success({ status: true, profiles });
} catch (e) {
console.error(e);
Sentry.captureException(e);
// Sentry.captureException(e);
return ResponseUtil.failure(e);
}
}
6 changes: 3 additions & 3 deletions register.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as Sentry from '@sentry/node';
// import * as Sentry from '@sentry/node';
import { ProfileFetchTypes } from "@hypha-dao/ppp-common";
import { ResponseUtil } from './util';
import { ProfileDao } from "./dao";
import { Profile } from "./domain";
import { AuthApiFactory } from "./service";
import { AccessTypes } from "./const";

Sentry.init({ dsn: process.env.sentryDsn });
// Sentry.init({ dsn: process.env.sentryDsn });

const profileDao = new ProfileDao();

Expand Down Expand Up @@ -41,7 +41,7 @@ export async function main(event, context) {
});
} catch (e) {
console.error(e);
Sentry.captureException(e);
// Sentry.captureException(e);
return ResponseUtil.failure(e);
}
}
6 changes: 3 additions & 3 deletions search-profiles.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as Sentry from '@sentry/node';
// import * as Sentry from '@sentry/node';
import { AppIds, ProfileFetchTypes } from '@hypha-dao/ppp-common';
import { AuthApiFactory } from "./service";
import { ResponseUtil } from './util';
import { ProfileDao } from "./dao";

Sentry.init({ dsn: process.env.sentryDsn });
// Sentry.init({ dsn: process.env.sentryDsn });

const profileDao = new ProfileDao();

Expand Down Expand Up @@ -45,7 +45,7 @@ export async function main(event, context) {
});
} catch (e) {
console.error(e);
Sentry.captureException(e);
// Sentry.captureException(e);
return ResponseUtil.failure(e);
}
}
6 changes: 3 additions & 3 deletions send-msg.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as Sentry from '@sentry/node';
// import * as Sentry from '@sentry/node';
import { ResponseUtil } from './util';
import { ProfileDao, MessageDao } from "./dao";
import { AuthApiFactory, PrivateAuthApi } from "./service";
import { Message } from "./domain";

Sentry.init({ dsn: process.env.sentryDsn });
// Sentry.init({ dsn: process.env.sentryDsn });

const profileDao = new ProfileDao();
const messageDao = new MessageDao();
Expand Down Expand Up @@ -52,7 +52,7 @@ export async function main(event, context) {
return ResponseUtil.success({ status: true, message: `Message sent successfully.`, messageKey: messageKey });
} catch (e) {
console.error(JSON.stringify(e, null, 2));
Sentry.captureException(e);
// Sentry.captureException(e);
return ResponseUtil.failure(e);
}
}
30 changes: 15 additions & 15 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,27 @@ provider:
uniqueAppDomainTableName: ${self:custom.uniqueAppDomainTableName}
oauthTableName: ${self:custom.oauthTableName}
scopeTableName: ${self:custom.scopeTableName}
twilioAccountSid: ${env.twilioAccountSid}
twilioAuthToken: ${env.twilioAuthToken}
twilioAccountSid: ${env:twilioAccountSid}
twilioAuthToken: ${env:twilioAuthToken}
# msgPrefix: ${self:custom.environment.msgPrefix}
sendGridKey: ${env.sendGridKey}
sendGridKey: ${env:sendGridKey}
openIdSignaturePrivateKeyParamName: ${env.openIdSignaturePrivateKeyParamName}
openIdIssuingAuthority: ${env.openIdIssuingAuthority}
userPoolName: ${self:custom.userPoolName}
identityPoolName: ${self:custom.identityPoolName}
userPoolClientName: ${self:custom.userPoolClientName}
eosHistoryEndpoint: ${env.eosHistoryEndpoint}
eosHttpEndpoint: ${env.eosHttpEndpoint}
authContract: ${env.authContract}
authVerifier: ${env.authVerifier}
authRetries: ${env.authRetries}
startAuthTimeout: ${env.startAuthTimeout}
minAuthTimeout: ${env.minAuthTimeout}
chainId: ${env.chainId}
authCodeMinutesTTL: ${env.authCodeMinutesTTL}
accessTokenMinutesTTL: ${env.accessTokenMinutesTTL}
refreshTokenMinutesTTL: ${env.refreshTokenMinutesTTL}
sentryDsn: ${env.sentryDsn}
eosHistoryEndpoint: ${env:eosHistoryEndpoint}
eosHttpEndpoint: ${env:eosHttpEndpoint}
authContract: ${env:authContract}
authVerifier: ${env:authVerifier}
authRetries: ${env:authRetries}
startAuthTimeout: ${env:startAuthTimeout}
minAuthTimeout: ${env:minAuthTimeout}
chainId: ${env:chainId}
authCodeMinutesTTL: ${env:authCodeMinutesTTL}
accessTokenMinutesTTL: ${env:accessTokenMinutesTTL}
refreshTokenMinutesTTL: ${env:refreshTokenMinutesTTL}
sentryDsn: ${env:sentryDsn}

iam:
role:
Expand Down
6 changes: 5 additions & 1 deletion service/CommApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ class CommApi {
constructor() {
const accountSid = process.env.twilioAccountSid; // Your Account SID from www.twilio.com/console
const authToken = process.env.twilioAuthToken; // Your Auth Token from www.twilio.com/console
this.twilio = new twilio(accountSid, authToken);
try {
this.twilio = new twilio(accountSid, authToken);
} catch (error) {
console.error("Twilio exception " + error + " accountSid " + accountSid);
}
}

async sendEmail(emailAddress, subject, message) {
Expand Down

0 comments on commit fa45d20

Please sign in to comment.