|
|
@@ -9,8 +9,8 @@
|
|
|
</ElIcon>
|
|
|
zkSync Era
|
|
|
<ElInput class="ml-2 !w-20" v-model="depositAmount" />
|
|
|
- <ElButton type="primary" class="ml-2" @click="zkDeposit" :loading="depositing">官方</ElButton>
|
|
|
- <ElButton type="primary" class="ml-2" :loading="depositing">Orbiter</ElButton>
|
|
|
+ <ElButton type="primary" class="ml-2" @click="deposit(0)" :loading="depositing">官方</ElButton>
|
|
|
+ <ElButton type="primary" class="ml-2" @click="deposit(1)" :loading="depositing">Orbiter</ElButton>
|
|
|
</div>
|
|
|
|
|
|
<div class="flex items-center mt-4">
|
|
|
@@ -20,8 +20,10 @@
|
|
|
</ElIcon>
|
|
|
Mainnet
|
|
|
<ElInput class="ml-2 !w-20" v-model="widthdrawAmount" />
|
|
|
- <ElButton type="primary" class="ml-2" @click="zkWidthdraw" :loading="widthdrawing">官方</ElButton>
|
|
|
- <ElButton type="primary" class="ml-2" :loading="widthdrawing">Orbiter</ElButton>
|
|
|
+ <ElButton type="primary" class="ml-2" @click="widthdraw(0)" :loading="widthdrawing">官方</ElButton>
|
|
|
+ <ElButton type="primary" class="ml-2" @click="widthdraw(1)" :loading="widthdrawing">
|
|
|
+ Orbiter
|
|
|
+ </ElButton>
|
|
|
</div>
|
|
|
<div class="flex items-center mt-4">
|
|
|
ETH
|
|
|
@@ -228,7 +230,7 @@ const depositAmount = ref('')
|
|
|
const widthdrawAmount = ref('')
|
|
|
const depositing = ref(false)
|
|
|
const widthdrawing = ref(false)
|
|
|
-async function zkDeposit() {
|
|
|
+async function deposit(type) {
|
|
|
if (table.value.getSelectionRows().length === 0) {
|
|
|
ElMessage.error('请选择账号')
|
|
|
return
|
|
|
@@ -240,7 +242,7 @@ async function zkDeposit() {
|
|
|
depositing.value = true
|
|
|
try {
|
|
|
console.log(table.value.getSelectionRows())
|
|
|
- await http.post('/web3/zk-deposit', {
|
|
|
+ await http.post(type === 0 ? '/web3/zk-deposit' : '/web3/orbiter-deposit', {
|
|
|
amount: depositAmount.value,
|
|
|
accountId: table.value.getSelectionRows()[0].id,
|
|
|
network: network.value
|
|
|
@@ -252,7 +254,7 @@ async function zkDeposit() {
|
|
|
ElMessage.error(error.message)
|
|
|
}
|
|
|
}
|
|
|
-async function zkWidthdraw() {
|
|
|
+async function widthdraw(type) {
|
|
|
if (table.value.getSelectionRows().length === 0) {
|
|
|
ElMessage.error('请选择账号')
|
|
|
return
|
|
|
@@ -264,7 +266,7 @@ async function zkWidthdraw() {
|
|
|
widthdrawing.value = true
|
|
|
try {
|
|
|
console.log(table.value.getSelectionRows())
|
|
|
- await http.post('/web3/zk-withdraw', {
|
|
|
+ await http.post(type === 0 ? '/web3/zk-withdraw' : '/web3/orbiter-withdraw', {
|
|
|
amount: widthdrawAmount.value,
|
|
|
accountId: table.value.getSelectionRows()[0].id,
|
|
|
network: network.value
|