|
@@ -34,7 +34,7 @@
|
|
<svg-icon style="width: 24px; height: 24px;" name="left-arrow" />
|
|
<svg-icon style="width: 24px; height: 24px;" name="left-arrow" />
|
|
<div class="title">查看私钥</div>
|
|
<div class="title">查看私钥</div>
|
|
</div>
|
|
</div>
|
|
- <div class="pop-text">0x4d8d38c6433c9552a11181b64a234814cd83f5b0d2c7306545ee097da9c0e4b2</div>
|
|
|
|
|
|
+ <div class="pop-text">{{walletStore.privateKey}}</div>
|
|
<div class="qrcode">
|
|
<div class="qrcode">
|
|
<qrcode-vue :value="qrtext" :size="156" :margin="1" background="transparent"/>
|
|
<qrcode-vue :value="qrtext" :size="156" :margin="1" background="transparent"/>
|
|
</div>
|
|
</div>
|
|
@@ -49,13 +49,14 @@
|
|
<script setup>
|
|
<script setup>
|
|
import QrcodeVue from 'qrcode.vue'
|
|
import QrcodeVue from 'qrcode.vue'
|
|
import { useWalletStore } from "@/stores/modules/walletStore";
|
|
import { useWalletStore } from "@/stores/modules/walletStore";
|
|
|
|
+import { showNotify } from 'vant';
|
|
const walletStore = useWalletStore();
|
|
const walletStore = useWalletStore();
|
|
|
|
|
|
const show = ref(false);
|
|
const show = ref(false);
|
|
const showkey = ref(false);
|
|
const showkey = ref(false);
|
|
const text = ref('');
|
|
const text = ref('');
|
|
const type = ref('');
|
|
const type = ref('');
|
|
-const qrtext = ref('123');
|
|
|
|
|
|
+const qrtext = walletStore.privateKey;
|
|
const changePop = (v) => {
|
|
const changePop = (v) => {
|
|
show.value = true;
|
|
show.value = true;
|
|
type.value = v;
|
|
type.value = v;
|
|
@@ -65,12 +66,22 @@ const cancel = () => {
|
|
show.value = false;
|
|
show.value = false;
|
|
}
|
|
}
|
|
const confirm = () => {
|
|
const confirm = () => {
|
|
- if(type.value == '1'){
|
|
|
|
- walletStore. updateWalletName(walletStore.id,text.value)
|
|
|
|
|
|
+ if(type.value == 1){
|
|
|
|
+ // 修改钱包名称
|
|
|
|
+ walletStore.updateWalletName(walletStore.id,text.value)
|
|
|
|
+ }else if(type.value == 3){
|
|
|
|
+ // 删除钱包
|
|
|
|
+ walletStore.deleteWallet(walletStore.id,text.value)
|
|
|
|
+ }else if(type.value == 2){
|
|
|
|
+ // 查看私钥
|
|
|
|
+ if(text.value != walletStore.accountPassword){
|
|
|
|
+ showNotify({ type: 'warning', message: '请输入正确的密码' });
|
|
|
|
+ }else{
|
|
|
|
+ showkey.value = true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
text.value = ''
|
|
text.value = ''
|
|
show.value = false;
|
|
show.value = false;
|
|
- if(type.value == 2) showkey.value = true;
|
|
|
|
}
|
|
}
|
|
const formatAddress = (address) => {
|
|
const formatAddress = (address) => {
|
|
if (!address) return '';
|
|
if (!address) return '';
|