Skip to content

Commit

Permalink
bug fixed andf added watcher in customApi component in userside to wa…
Browse files Browse the repository at this point in the history
…tch prop changes
  • Loading branch information
Raj6939 committed Nov 16, 2022
1 parent 3bcc41b commit 4d22ea5
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
9 changes: 8 additions & 1 deletion src/components/participant/ActionInputs/CustomApi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,15 @@ computed:{
}
}
},
watch: {
data:{
deep:true,
handler: function(newValue,oldValue) {
this.values = newValue.value
}
}
},
mounted() {
console.log(this.data);
if(this.data.value){
this.values = this.data.value
if(!this.done){
Expand Down
33 changes: 29 additions & 4 deletions src/views/participant/Event.vue
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,35 @@ export default {
ea.value = parsedVal;
}
return ea
})
} else {
this.eventActionsToShow = eventActions;
})
} else {
const temp = eventActions.map((x)=>{
if((x.type === "ETHEREUM_NETWORK") ||
(x.type === "BINANCE_NETWORK") ||
(x.type === "MATIC_NETWORK") ||
(x.type === "ETHEREUM_ERC20") ||
(x.type === "ETHEREUM_ERC721") ||
(x.type === "MATIC_ERC20") ||
(x.type === "MATIC_ERC721") ||
(x.type === "BINANCE_ERC20") ||
(x.type === "BINANCE_ERC721") ||
(x.type === "REEF_ERC20") ||
(x.type === "REEF_ERC721") ||
(x.type === "MOONBEAM_ERC20") ||
(x.type === "MOONBEAM_ERC721") ||
(x.type === "MOONRIVER_ERC20") ||
(x.type === "MOONRIVER_ERC721") ||
(x.type === "MOON_ERC20") ||
(x.type === "MOON_ERC721") ||
(x.type === "CUSTOM_API_GET") ||
(x.type === "CUSTOM_API_POST")
){
const parsedVal = JSON.parse(x.value)
x.value = parsedVal;
}
return x
})
this.eventActionsToShow = temp;
}
} else {
this.eventActionsToShow = this.eventData.actions;
Expand Down

0 comments on commit 4d22ea5

Please sign in to comment.