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/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}) 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/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; 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"); diff --git a/src/views/participant/Event.vue b/src/views/participant/Event.vue index 37a8c0c7..d5943205 100644 --- a/src/views/participant/Event.vue +++ b/src/views/participant/Event.vue @@ -252,35 +252,43 @@ 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() {