You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/TransferValidator.vue
+20-3
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
<template>
2
2
<divclass="container">
3
3
<h2>Transfer Validation</h2>
4
-
<pclass="intro">Approve the Giver contract: <ahref="https://etherscan.io/address/0xa0139F5Ab522c86D7F377336c50EEFCD6cAf696E"target="_blank"rel="noopener">0xa0139F5Ab522c86D7F377336c50EEFCD6cAf696E</a> for a token ID and input it bellow. The approved token <strong>WILL NOT</strong> get transfered during the test.</p>
4
+
<pclass="intro">Approve the Giver contract: <a:href="this.explorerLinks[this.chainId] + this.giverContracts[this.chainId]"target="_blank"rel="noopener">{{ this.giverContracts[this.chainId] }}</a> for a token ID and input it bellow. The approved token <strong>WILL NOT</strong> get transfered during the test.</p>
5
5
<pclass="smaller">There can be a business decision that transfers for a token are not enabled and by such all test will fail.</p>
6
6
<form@submit.prevent="sanityCheck"novalidate>
7
7
<divclass="input-group input-group-lg">
@@ -71,11 +71,27 @@ import Test from '~/components/Test'
71
71
importvueScrollfrom'vue-scrollto'
72
72
73
73
exportdefault {
74
+
props: {
75
+
chainId: {
76
+
type:Number,
77
+
default:1
78
+
}
79
+
},
74
80
data () {
75
81
return {
76
82
approval:'',
77
83
state:"inital",
78
84
status:"",
85
+
giverContracts: {
86
+
1:'0xa0139F5Ab522c86D7F377336c50EEFCD6cAf696E',
87
+
3:'0x0867cd9331287d18cb7cd40eb00628ea842d1bca',
88
+
4:'0x40Bf8f5F5Deb968744CA5fD29321Cb9D456C2877'
89
+
},
90
+
explorerLinks: {
91
+
1:'https://etherscan.io/address/',
92
+
3:'https://ropsten.etherscan.io/address/',
93
+
4:'https://rinkeby.etherscan.io/address/'
94
+
},
79
95
sanity: {
80
96
id:14,
81
97
name:"Transfer unsuccesfull",
@@ -197,7 +213,7 @@ import vueScroll from 'vue-scrollto'
197
213
try {
198
214
if (awaitthis.$validator.validate()) {
199
215
this.status="loading"
200
-
let isTransfer =awaitthis.$axios.get(`/transfer?test=14&contract=${this.$store.state.contract}&token=${this.approval}&giver=${this.$store.state.giver}`)
216
+
let isTransfer =awaitthis.$axios.get(`/transfer?test=14&contract=${this.$store.state.contract}&token=${this.approval}&giver=${this.giverContracts[this.chainId]}&chainId=${this.chainId}`)
0 commit comments