Skip to content

Commit aa9f030

Browse files
chore(ci): update dapp CI workflows and pushSecretScript
1 parent 5b24dff commit aa9f030

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/dapp-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
MJ_APIKEY_PRIVATE: ${{ secrets.MAILJET_APIKEY_PRIVATE }}
4747
MJ_SENDER: ${{ secrets.MAILJET_SENDER }}
4848
MAILGUN_APIKEY: ${{ secrets.MAILGUN_APIKEY }}
49-
WEB3MAIL_WHITELISTED_APPS: ${{ secrets.WEB3MAIL_WHITELISTED_APPS }}
49+
WEB3MAIL_WHITELISTED_APPS: ${{ vars.WEB3MAIL_WHITELISTED_APPS }}
5050
steps:
5151
- uses: actions/checkout@v4
5252

.github/workflows/reusable-dapp-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
MJ_APIKEY_PRIVATE: ${{ secrets.mailjet-apikey-private }}
137137
MJ_SENDER: ${{ secrets.mailjet-sender }}
138138
MAILGUN_APIKEY: ${{ secrets.mailgun-apikey }}
139-
WEB3MAIL_WHITELISTED_APPS: ${{ secrets.WEB3MAIL_WHITELISTED_APPS }}
139+
WEB3MAIL_WHITELISTED_APPS: ${{ vars.WEB3MAIL_WHITELISTED_APPS }}
140140
run: |
141141
cd deployment-dapp
142142
npm run push-dapp-secret

deployment-dapp/src/pushSecretScript.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const main = async () => {
1818
if (!MJ_APIKEY_PRIVATE) throw Error('Missing env MJ_APIKEY_PRIVATE');
1919
if (!MJ_SENDER) throw Error('Missing env MJ_SENDER');
2020
if (!MAILGUN_APIKEY) throw Error('Missing env MAILGUN_APIKEY');
21-
if (!WEB3MAIL_WHITELISTED_APPS)
21+
if (WEB3MAIL_WHITELISTED_APPS === undefined)
2222
throw Error('Missing env WEB3MAIL_WHITELISTED_APPS');
2323

2424
if (!WALLET_PRIVATE_KEY)
@@ -29,8 +29,9 @@ const main = async () => {
2929
const appAddress = await loadAppAddress();
3030

3131
if (!appAddress) throw Error('Failed to get app address'); // If the app was not deployed, do not continue
32+
3233
const fullWhitelistedApps = [
33-
...new Set([...WEB3MAIL_WHITELISTED_APPS.split(','), appAddress]),
34+
...new Set([...JSON.parse(WEB3MAIL_WHITELISTED_APPS), appAddress]),
3435
];
3536

3637
const jsonSecret = JSON.stringify({

0 commit comments

Comments
 (0)