From 19e9805f699edbb5254188b2b8fe08c9076bd3fb Mon Sep 17 00:00:00 2001 From: Vishwas Date: Fri, 22 Jul 2022 15:10:12 +0530 Subject: [PATCH 1/6] bumped the version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 99d0528c..61c426b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hyperfye-frontend", - "version": "v5.6.0", + "version": "v5.7.0", "private": true, "scripts": { "serve": "vue-cli-service serve --mode production", From e7ca1860c598b9b3136cc13426f5769df090b532 Mon Sep 17 00:00:00 2001 From: varsha Date: Fri, 22 Jul 2022 18:13:29 +0530 Subject: [PATCH 2/6] small fix in reef --- src/components/participant/ActionInputs/ReefErc20.vue | 4 ++-- src/components/participant/ActionInputs/ReefErc721.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/participant/ActionInputs/ReefErc20.vue b/src/components/participant/ActionInputs/ReefErc20.vue index 5dcd3ca5..2ebbdaf4 100644 --- a/src/components/participant/ActionInputs/ReefErc20.vue +++ b/src/components/participant/ActionInputs/ReefErc20.vue @@ -130,7 +130,7 @@ computed:{ signature: "", message_sign: "You are Signing this Message to confirm your Paricipation", - options:[{value: '', text: 'Please select your Reef wallet'}], + options:[{value: '', text: 'Click on Connect Reef wallet button and select your wallet'}], value: { contractAddress: "", userWalletAddress: '', @@ -172,7 +172,7 @@ computed:{ }, async fetchAccounts() { - this.options = [{value: '', text: 'Please select your Reef wallet.'}]; + this.options = [{value: '', text: 'Click on Connect Reef wallet button and select your wallet.'}]; for (let i in this.wallet) { this.options.push({value:this.wallet[i],text: 'Address: '+ this.wallet[i].address.slice(0,12)+'...'+this.wallet[i].address.slice(38,48)+' Name: '+this.wallet[i].name}) diff --git a/src/components/participant/ActionInputs/ReefErc721.vue b/src/components/participant/ActionInputs/ReefErc721.vue index c9ac1eb6..86e48af0 100644 --- a/src/components/participant/ActionInputs/ReefErc721.vue +++ b/src/components/participant/ActionInputs/ReefErc721.vue @@ -130,7 +130,7 @@ computed:{ signature: "", message_sign: "You are Signing this Message to confirm your Paricipation", - options:[{value: '', text: 'Please select your Reef wallet'}], + options:[{value: '', text: 'Click on Connect Reef wallet button and select your wallet'}], value: { contractAddress: "", userWalletAddress: '', @@ -173,7 +173,7 @@ computed:{ }, async fetchAccounts() { - this.options = [{value: '', text: 'Please select your reef wallet'}]; + this.options = [{value: '', text: 'Click on Connect Reef wallet button and select your wallet'}]; for (let i in this.wallet) { this.options.push({value:this.wallet[i],text: 'Address: '+ this.wallet[i].address.slice(0,12)+'...'+this.wallet[i].address.slice(38,48)+' Name: '+this.wallet[i].name}) From 76ed61baec543d16bcc77df97205aa594decc50d Mon Sep 17 00:00:00 2001 From: varsha Date: Mon, 25 Jul 2022 10:45:37 +0530 Subject: [PATCH 3/6] removed console.log --- .../createProjectSlider/components/ActionInputs/MoonErc20.vue | 1 - .../components/ActionInputs/MoonbeamErc721.vue | 2 -- .../components/ActionInputs/MoonriverErc721.vue | 1 - src/views/admin/AdminLogin.vue | 1 - 4 files changed, 5 deletions(-) diff --git a/src/components/admin/createProjectSlider/components/ActionInputs/MoonErc20.vue b/src/components/admin/createProjectSlider/components/ActionInputs/MoonErc20.vue index c1cd4765..6c017357 100644 --- a/src/components/admin/createProjectSlider/components/ActionInputs/MoonErc20.vue +++ b/src/components/admin/createProjectSlider/components/ActionInputs/MoonErc20.vue @@ -124,7 +124,6 @@ export default { this.web3 = new Web3(window.window.ethereum); } } catch (error) { - console.log(error); this.showerror = true; } }, diff --git a/src/components/admin/createProjectSlider/components/ActionInputs/MoonbeamErc721.vue b/src/components/admin/createProjectSlider/components/ActionInputs/MoonbeamErc721.vue index 7491b819..eb66ae83 100644 --- a/src/components/admin/createProjectSlider/components/ActionInputs/MoonbeamErc721.vue +++ b/src/components/admin/createProjectSlider/components/ActionInputs/MoonbeamErc721.vue @@ -125,9 +125,7 @@ export default { } } catch (error) { - console.log(error); this.showerror = true; - console.log(this.showerror); } }, async signMessage() { diff --git a/src/components/admin/createProjectSlider/components/ActionInputs/MoonriverErc721.vue b/src/components/admin/createProjectSlider/components/ActionInputs/MoonriverErc721.vue index be7cfe42..6a4ce106 100644 --- a/src/components/admin/createProjectSlider/components/ActionInputs/MoonriverErc721.vue +++ b/src/components/admin/createProjectSlider/components/ActionInputs/MoonriverErc721.vue @@ -124,7 +124,6 @@ export default { this.web3 = new Web3(window.window.ethereum); } } catch (error) { - console.log(error); this.showerror = true; } }, diff --git a/src/views/admin/AdminLogin.vue b/src/views/admin/AdminLogin.vue index 77b04bc0..ed0e0eaa 100644 --- a/src/views/admin/AdminLogin.vue +++ b/src/views/admin/AdminLogin.vue @@ -256,7 +256,6 @@ export default { messageData.data['provider'] = 'google'; _this.value = JSON.stringify(messageData.data); _this.qr_data=`${_this.$config.webWalletAddress}/deeplink?url=${_this.value}` - console.log(_this.qr_data); } else if (messageData.op == "end") { _this.connection.close(); const authorizationToken = messageData.data.token; From 7bdbd8e84961b5fc9c404c08afb82282d8e8e271 Mon Sep 17 00:00:00 2001 From: varsha Date: Tue, 26 Jul 2022 12:20:02 +0530 Subject: [PATCH 4/6] changed validation message --- src/utils/messages/admin/en.js | 6 +++++- src/views/admin/setting/OrgSetting.vue | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/utils/messages/admin/en.js b/src/utils/messages/admin/en.js index 1022411a..7757c7b3 100644 --- a/src/utils/messages/admin/en.js +++ b/src/utils/messages/admin/en.js @@ -112,6 +112,9 @@ const APP = { APP_UPDATED_SUCCESSFULLY: "App details updated Successfully" } +const ORGDATA= { + ORG_UPDATED_SUCCESSFULLY:"Org details updated Successfully" +} const PARTICIPANTS = { EXPORT_ALL: { @@ -135,5 +138,6 @@ module.exports = { PARTICIPANTS, SUBSCRIPTIONS, EVENT, - APP + APP, + ORGDATA } \ No newline at end of file diff --git a/src/views/admin/setting/OrgSetting.vue b/src/views/admin/setting/OrgSetting.vue index 8e830c59..3b92fe6c 100644 --- a/src/views/admin/setting/OrgSetting.vue +++ b/src/views/admin/setting/OrgSetting.vue @@ -51,7 +51,7 @@
- +
@@ -284,7 +284,7 @@ export default { if (!resp.ok) { return this.notifyErr(json); } else { - this.notifySuccess(Messages.APP.APP_UPDATED_SUCCESSFULLY); + this.notifySuccess(Messages.ORGDATA.ORG_UPDATED_SUCCESSFULLY); } } else { throw new Error("Error while updating your setting"); From 684b0e8a30dde0609600db478b5e00b386cfac3b Mon Sep 17 00:00:00 2001 From: Vishwas Date: Tue, 26 Jul 2022 13:08:35 +0530 Subject: [PATCH 5/6] fixed user redirection issue --- src/views/participant/Event.vue | 58 +++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/src/views/participant/Event.vue b/src/views/participant/Event.vue index 37a8c0c7..405f1df3 100644 --- a/src/views/participant/Event.vue +++ b/src/views/participant/Event.vue @@ -252,35 +252,45 @@ export default { } this.isLoading=false; }, - async verifyAppAuth(){ - try{ - this.isLoading=true - if(this.userRedirectionToken && this.userRedirectionToken!=""){ + async verifyAppAuth() { + try { + this.isLoading = true + if (this.userRedirectionToken && this.userRedirectionToken != "") { let url = `${this.$config.studioServer.BASE_URL}api/v1/app/grants`; - let headers = { - "Content-Type": "application/json", - "externaluseraccesstoken":`Bearer ${this.userRedirectionToken}` - }; - const resp = await apiClient.makeCall({ method: "POST", url: url, body:{},dxQheader: headers }) - this.externalUserId= resp.data.data.externalUserMappingId - this.authToken=resp.data.data.authToken - localStorage.setItem("externalUserMappingId", JSON.stringify(this.externalUserId)); - if(this.authToken!==undefined){ - localStorage.setItem('authToken',this.authToken) - this.fetchUserDetails() + let headers = { + "Content-Type": "application/json", + "externaluseraccesstoken": `Bearer ${this.userRedirectionToken}` + }; + + const resp = await apiClient.makeCall({ method: "POST", url: url, body: {}, header: headers }) + + if (resp && resp.err) { + throw new Error(resp.err.message) + } + + this.externalUserId = resp.data.data.externalUserMappingId + this.authToken = resp.data.data.authToken + localStorage.setItem("externalUserMappingId", JSON.stringify(this.externalUserId)); + if (this.authToken !== undefined) { + localStorage.setItem('authToken', this.authToken) + this.fetchUserDetails() + } } + } } - } - catch(e){ - if(e.status===403){ + } + catch (e) { + if (e.status === 403) { localStorage.clear(); - this.notifyErr(e.error) - this.authToken="" - this.$router.push(`/form/${this.eventSlug}`) - } + this.notifyErr("Unauthorized. Please go back to your app and try to re-participate from") + this.authToken = "" + this.$router.push(`/form/${this.eventSlug}?userRedirectionToken=${this.userRedirectionToken}`) + } else { + this.notifyErr(e.message) + } } - finally{ - this.isLoading=false + finally { + this.isLoading = false } }, async fetchUserInfoOnLogin() { From 9f9789617bbb961052b8d20c5ce383d61179ed0e Mon Sep 17 00:00:00 2001 From: Vishwas Date: Tue, 26 Jul 2022 13:09:27 +0530 Subject: [PATCH 6/6] fixed user redirection issue --- src/views/participant/Event.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/views/participant/Event.vue b/src/views/participant/Event.vue index 405f1df3..d5943205 100644 --- a/src/views/participant/Event.vue +++ b/src/views/participant/Event.vue @@ -275,8 +275,6 @@ export default { localStorage.setItem('authToken', this.authToken) this.fetchUserDetails() } - } - } } } catch (e) {