|
@@ -95,7 +95,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, onMounted, inject } from 'vue'
|
|
|
|
|
|
|
+import { ref, onMounted, inject, watch } from 'vue'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { http } from '@/plugins/http'
|
|
import { http } from '@/plugins/http'
|
|
|
import { ethers, Wallet } from 'ethers'
|
|
import { ethers, Wallet } from 'ethers'
|
|
@@ -103,6 +103,9 @@ import { Copy, ArrowNarrowRight, ArrowsRightLeft } from '@vicons/tabler'
|
|
|
import { useClipboard, useFileDialog } from '@vueuse/core'
|
|
import { useClipboard, useFileDialog } from '@vueuse/core'
|
|
|
|
|
|
|
|
const network = inject('network')
|
|
const network = inject('network')
|
|
|
|
|
+watch(network, () => {
|
|
|
|
|
+ getAccounts()
|
|
|
|
|
+})
|
|
|
const accounts = ref([])
|
|
const accounts = ref([])
|
|
|
const table = ref(null)
|
|
const table = ref(null)
|
|
|
const addForm = ref({})
|
|
const addForm = ref({})
|
|
@@ -193,7 +196,7 @@ async function saveAccount() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function getAccounts() {
|
|
async function getAccounts() {
|
|
|
- const res = await http.get('/accounts/my')
|
|
|
|
|
|
|
+ const res = await http.get('/accounts/my', { network: network.value })
|
|
|
accounts.value = res
|
|
accounts.value = res
|
|
|
}
|
|
}
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|