diff --git a/.gitignore b/.gitignore
index cb7bb513..182f2925 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,6 +27,8 @@ coverage
# nyc test coverage
.nyc_output
+*.env
+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
diff --git a/prod.env.txt b/prod.env.txt
deleted file mode 100755
index 7d3b9276..00000000
--- a/prod.env.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-NODE_ENV=production
-VUE_APP_AUTH0_CLIENT_ID=Mo98qDLrZuOOa2TATig5qNzngwRpJCJk
-VUE_APP_AUTH0_DOMAIN=hyperfyre-dev.us.auth0.com
-VUE_APP_MOBILEWALLET_URL=hypersign
-VUE_APP_RECAPTCHA_SITE_KEY=6LeKIM4ZAAAAAC23tPRa8Ut0MFF2FFN61wl0ihVZ
-VUE_APP_SERVER_WEBSOCKET_URL=wss://api.fyre.hypersign.id/ws/
-VUE_APP_STUDIO_SERVER_BASE_URL=https://api.fyre.hypersign.id/
-VUE_APP_TELEGRAM_BOT_ID=2136538813
-VUE_APP_TELEGRAM_VERIFIER_BOT=hyperfyre_bot
-VUE_APP_TITLE=Hyperfyre
-VUE_APP_VERSION=v5.3.0
-VUE_APP_WEBWALLET_URL=https://wallet.hypersign.id
-VUE_APP_GA_CODE=GTM-5XV9VBF
-VUE_APP_KOMMINICATE_APP_ID=482503809608fa05d3bcfc384edba263
-VUE_APP_WEBPUSH_VAPID_PUBLIC_KEY=BAJF9hFTnNOu7Mc_jYvEFsk5d24UlwW8AwfgR5lFQFxttsgIQXP9PR97-QWP015Gc9AWR8fVFKyMDePR8rQEoEo
-
-
-
diff --git a/src/components/participant/ActionInputs/ReefErc20.vue b/src/components/participant/ActionInputs/ReefErc20.vue
index 6389fb32..21b38740 100644
--- a/src/components/participant/ActionInputs/ReefErc20.vue
+++ b/src/components/participant/ActionInputs/ReefErc20.vue
@@ -40,26 +40,34 @@
v-model="value.userWalletAddress"
:disabled="done"
:required="data.isManadatory"
+ v-if="!done"
>
+
-
+ v-else>
-
-
+
+
+
@@ -111,7 +119,7 @@ export default {
signature: "",
message_sign: "You are Signing this Message to confirm your Paricipation",
- options:[{value: '', text: 'Please select your reef wallet'}],
+ options:[{value: '', text: 'Please select your Reef wallet'}],
value: {
contractAddress: "",
userWalletAddress: '',
@@ -132,11 +140,7 @@ export default {
Object.assign(this.value, { ...(this.data.value) });
}
eventBus.$on(`disableInput${this.data._id}`, this.disableInput);
-
- // TODO: need to check if this works
await this.checkWeb3Injection();
- await this.invokeReef()
- await this.fetchAccounts()
},
methods: {
async checkWeb3Injection() {
@@ -157,32 +161,27 @@ export default {
},
async fetchAccounts() {
+ this.options = [{value: '', text: 'Please select your Reef 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})
}
+
+ this.value.userWalletAddress = this.options[1]? this.options[1].value : this.options[0].value
},
async invokeReef() {
try {
- if (this.web3 && this.web3.reef) {
+ if (this.web3 && this.web3.reef) {
let sign;
await window.injectedWeb3.reef.enable()
.then(async walletObj=>{
this.wallet = await walletObj.accounts.get();
this.walletSignObj=walletObj
+ await this.fetchAccounts();
})
-
-
-
-
-
- // const walletAddr= await wallet.get
-
-
-
}
} catch (error) {
return this.notifyErr(error.message)
@@ -225,7 +224,16 @@ export default {
return true;
},
async fetchBalance() {
-
+
+ if(!this.value.contractAddress){
+ throw new Error("Missing contract address")
+ }
+
+ if(!this.value.userWalletAddress.address){
+ throw new Error("Missing userWallet address")
+ }
+
+
this.signature=await this.walletSignObj.signer.signRaw(this.value.userWalletAddress)
const body = {
actionType: this.data.type,
diff --git a/src/components/participant/ActionInputs/ReefErc721.vue b/src/components/participant/ActionInputs/ReefErc721.vue
index 0e73f64a..1e457591 100644
--- a/src/components/participant/ActionInputs/ReefErc721.vue
+++ b/src/components/participant/ActionInputs/ReefErc721.vue
@@ -40,26 +40,34 @@
v-model="value.userWalletAddress"
:disabled="done"
:required="data.isManadatory"
+ v-if="!done"
>
+
-
+ v-else>
-
-
+
+
+
@@ -111,7 +119,7 @@ export default {
signature: "",
message_sign: "You are Signing this Message to confirm your Paricipation",
- options:[{value: '', text: 'Please select your reef wallet'}],
+ options:[{value: '', text: 'Please select your Reef wallet'}],
value: {
contractAddress: "",
userWalletAddress: '',
@@ -133,9 +141,7 @@ export default {
Object.assign(this.value, { ...(this.data.value) });
}
eventBus.$on(`disableInput${this.data._id}`, this.disableInput);
- this.checkWeb3Injection();
- await this.invokeReef()
- await this.fetchAccounts()
+ await this.checkWeb3Injection();
},
methods: {
async checkWeb3Injection() {
@@ -156,10 +162,13 @@ export default {
},
async fetchAccounts() {
+ this.options = [{value: '', text: 'Please select your reef 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})
}
+
+ this.value.userWalletAddress = this.options[1]? this.options[1].value : this.options[0].value
},
async invokeReef() {
try {
@@ -171,6 +180,7 @@ export default {
.then(async walletObj=>{
this.wallet = await walletObj.accounts.get();
this.walletSignObj=walletObj
+ await this.fetchAccounts();
})
@@ -224,6 +234,16 @@ export default {
return true;
},
async fetchBalance() {
+
+ if(!this.value.contractAddress){
+ throw new Error("Missing contract address")
+ }
+
+ if(!this.value.userWalletAddress.address){
+ throw new Error("Missing userWallet address")
+ }
+
+
this.signature=await this.walletSignObj.signer.signRaw(this.value.userWalletAddress)
const body = {
diff --git a/src/views/admin/Events.vue b/src/views/admin/Events.vue
index 48c49cb9..f227ed32 100644
--- a/src/views/admin/Events.vue
+++ b/src/views/admin/Events.vue
@@ -1137,14 +1137,17 @@ export default {
);
localStorage.removeItem("userProjects");
- tempProject.projects.splice(index, 1);
- localStorage.setItem(
- "userProjects",
- JSON.stringify({
- projects: tempProject.projects,
- count: tempProject.projects.length,
- })
- );
+ if(tempProject){
+ tempProject.projects.splice(index, 1);
+ localStorage.setItem(
+ "userProjects",
+ JSON.stringify({
+ projects: tempProject.projects,
+ count: tempProject.projects.length,
+ })
+ );
+ }
+
if (json) {
if (!resp.ok) {
return this.notifyErr(json);