From 32422a8cc322bb5a1d134f726ef30df2f2cb029f Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 10 Nov 2022 22:51:10 +0100 Subject: [PATCH] feat: encrypt data and call hypha token sales url (#1789) * feat: encrypt data and call hypha token sales url with daoactivation query parameter * refactor: move const to enviroment * fix: add correct env variable and remove token from data that is sent to widget Co-authored-by: Arsenije Savic --- .github/workflows/deploy-dev.yml | 3 +++ .github/workflows/deploy-prod.yml | 2 ++ .github/workflows/deploy-staging.yml | 2 ++ package.json | 1 + quasar.conf.js | 4 +++- src/pages/dho/Plan.vue | 33 +++++++++++++++++++++------- yarn.lock | 12 ++++++++++ 7 files changed, 48 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index f10b2ec32..2c1dd3b8c 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -48,6 +48,9 @@ jobs: IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }} IPFS_GATEWAY: 'https://hypha.infura-ipfs.io/ipfs/' MULTISIG_CONTRACT: 'msig.hypha' + HYPHA_TOKEN_SALES_ENCODE_KEY: ${{ secrets.HYPHA_TOKEN_SALES_ENCODE_KEY }} + HYPHA_TOKEN_SALES_URL: 'https://tokensale.hypha.earth' + - name: S3 sync uses: jakejarvis/s3-sync-action@master with: diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 6e751ef04..79afa7661 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -48,6 +48,8 @@ jobs: IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }} IPFS_GATEWAY: 'https://hypha.infura-ipfs.io/ipfs/' MULTISIG_CONTRACT: 'msigdhohypha' + HYPHA_TOKEN_SALES_ENCODE_KEY: ${{ secrets.HYPHA_TOKEN_SALES_ENCODE_KEY }} + HYPHA_TOKEN_SALES_URL: 'https://tokensale.hypha.earth' - name: S3 sync uses: jakejarvis/s3-sync-action@master diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 9fb230438..6d684dfb4 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -48,6 +48,8 @@ jobs: IPFS_PROJECT_SECRET: ${{ secrets.IPFS_PROJECT_SECRET }} IPFS_GATEWAY: 'https://hypha.infura-ipfs.io/ipfs/' MULTISIG_CONTRACT: 'msigdhohypha' + HYPHA_TOKEN_SALES_ENCODE_KEY: ${{ secrets.HYPHA_TOKEN_SALES_ENCODE_KEY }} + HYPHA_TOKEN_SALES_URL: 'https://tokensale.hypha.earth' - name: S3 sync uses: jakejarvis/s3-sync-action@master diff --git a/package.json b/package.json index 8d8907f60..ec3f4278f 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "quasar": "1.15.10", "showdown": "^1.9.1", "subscriptions-transport-ws": "^0.11.0", + "simple-crypto-js": "^3.0.1", "turndown": "^7.0.0", "ual-anchor": "^1.0.5", "ual-seeds": "^1.1.2", diff --git a/quasar.conf.js b/quasar.conf.js index d4963ac80..eb6e45044 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -91,7 +91,9 @@ module.exports = function (ctx) { ELASTIC_SEARCH_URL: process.env.ELASTIC_SEARCH_URL, ELASTIC_SEARCH_API_KEY: process.env.ELASTIC_SEARCH_API_KEY, MULTISIG_CONTRACT: process.env.MULTISIG_CONTRACT, - HYPHA_CONTRACT: process.env.HYPHA_CONTRACT + HYPHA_CONTRACT: process.env.HYPHA_CONTRACT, + HYPHA_TOKEN_SALES_ENCODE_KEY: process.env.HYPHA_TOKEN_SALES_ENCODE_KEY, + HYPHA_TOKEN_SALES_URL: process.env.HYPHA_TOKEN_SALES_URL }, scopeHoisting: true, vueRouterMode: 'history', diff --git a/src/pages/dho/Plan.vue b/src/pages/dho/Plan.vue index f7b2e9a74..33f71144c 100644 --- a/src/pages/dho/Plan.vue +++ b/src/pages/dho/Plan.vue @@ -1,5 +1,6 @@