Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage #1504

Merged
merged 11 commits into from
Jul 26, 2022
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export default {
this.web3 = new Web3(window.window.ethereum);
}
} catch (error) {
console.log(error);
this.showerror = true;
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ export default {
}

} catch (error) {
console.log(error);
this.showerror = true;
console.log(this.showerror);
}
},
async signMessage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export default {
this.web3 = new Web3(window.window.ethereum);
}
} catch (error) {
console.log(error);
this.showerror = true;
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/participant/ActionInputs/ReefErc20.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down Expand Up @@ -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})
Expand Down
4 changes: 2 additions & 2 deletions src/components/participant/ActionInputs/ReefErc721.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down Expand Up @@ -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})
Expand Down
6 changes: 5 additions & 1 deletion src/utils/messages/admin/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -135,5 +138,6 @@ module.exports = {
PARTICIPANTS,
SUBSCRIPTIONS,
EVENT,
APP
APP,
ORGDATA
}
1 change: 0 additions & 1 deletion src/views/admin/AdminLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/views/admin/setting/OrgSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</label>
</div>
<div class="col-lg-4 col-md-4 px-0">
<input type="text" placehoolder="https://app.fyre.hypersign.id/img/Fyre_Small.e094f135.png" id="name" v-model="orgSetting.logoPath" class="form-control w-100" />
<input type="text" placeholder="https://app.fyre.hypersign.id/img/Fyre_Small.e094f135.png" id="name" v-model="orgSetting.logoPath" class="form-control w-100" />
</div>
</div>
<div class="row g-3 align-items-center w-100 mt-4" style="float:right; padding-right: 1.5%">
Expand Down Expand Up @@ -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");
Expand Down
58 changes: 33 additions & 25 deletions src/views/participant/Event.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down