chunks: ['options']
}),
page({
- title: 'Byone notification',
+ title: 'Byone',
name: 'prompt',
chunks: ['prompt']
}),
{
"name": "Byone",
"description": "Bytom Chrome Extension Wallet",
- "version": "3.0.0",
+ "version": "3.0.1",
"author": "zhiting.fly@8btc.com",
"license": "MIT",
"private": true,
BTM0004:'请输入Keystore。',
BTM0005:'输入数量大于可用余额。',
BTM0006:'输入有效的地址格式。',
- BTM0007:'é\92±å\8c\85å\90\8d称é\94\99误ï¼\8c请è¾\93å\85¥æ£ç¡®é\92±å\8c\85å\90\8d称。',
+ BTM0007:'é\92±å\8c\85å¯\86ç \81é\94\99误ï¼\8c请è¾\93å\85¥æ£ç¡®é\92±å\8c\85å¯\86ç \81。',
BTM0008:'密码不能为空',
BTM0009:'目前钱包已为账户',
BTM0010:'Keystore导入不支持V2多账户导入,请拆分为单个Keystore',
BTM0004:'Please enter Keystore.',
BTM0005:'Insufficient balance.',
BTM0006:'Address format error',
- BTM0007:'Wallet name error',
+ BTM0007:'Wallet password is wrong, please enter the correct password.',
BTM0008:'Empty password',
BTM0009:'Current wallet is already an account',
BTM0010:'Keystore restore dose not support V2 multiple account. Please split into single keystore.',
z-index: 4;
margin: auto;
top: 0;
- height: 131px;
+ min-height: 131px;
+ height: fit-content;
border-radius: 8px;
}
<template>
<div>
<section v-show="show" class="mask"></section>
- <transition name="page-transfer" <!-- enter-active-class="animated slideInUp faster" leave-active-class="animated slideOutDown faster"> -->
+ <transition name="page-transfer" >
<div v-show="show" class="confirm form bg-white">
+ <div v-if="label" class="form-item">
+ <div class="form-item-content">
+ <span class="color-black font-bold">{{ label }}</span>
+ </div>
+ </div>
<div class="form-item">
<div class="form-item-content">
- <input v-if="text_placeholder" type="text" v-model="passwd" :placeholder="text_placeholder" autofocus>
- <input v-else type="password" v-model="passwd" :placeholder="$t('transfer.password')" autofocus>
+ <input type="password" v-model="passwd" :placeholder="$t('transfer.password')" autofocus>
</div>
</div>
<div class="btn-group btn-inline">
};
},
props: {
- text_placeholder:{
- type: String,
- },
- text_error_hint:{
+ label:{
type: String,
},
i18n: {
confirm() {
if (this.passwd == "") {
this.$toast.error(
- this.text_error_hint || this.$t("transfer.emptyPassword")
+ this.$t("transfer.emptyPassword")
);
return;
}
manifest_version: 2,
name: 'Byone',
description: 'Bytom Wallet Chrome extension.',
- version: '3.0.0',
+ version: '3.0.1',
author: 'Bytom frontend, zhitinglin',
web_accessible_resources: ['js/inject.js', 'wasm/main.wasm'],
browser_action: {
})
return retPromise
}
+
+account.isValidPassword = function(keystore, password){
+ return bytom.keys.verifyPassword(keystore, password)
+}
+
export default account
</div>
</section>
- <modal-passwd ref="confirmModal" @confirm="deleteW" :text_placeholder="$t('setting.deleteConfirmHint')" :text_error_hint="$t('setting.emptyWallet')"></modal-passwd>
+ <modal-passwd ref="confirmModal" @confirm="deleteW" :label="walletName" ></modal-passwd>
</div>
</template>
<script>
import { mapActions, mapGetters, mapState } from 'vuex'
import * as Actions from '@/store/constants';
+import account from "@/models/account";
export default {
name: "",
};
},
computed: {
+ walletName(){
+ if(this.currentAccount){
+ return this.currentAccount.alias
+ }
+ },
...mapState([
'bytom',
]),
])
},
methods: {
- deleteW(alias){
- if(this.currentAccount.alias === alias){
+ deleteW(password){
+ if(account.isValidPassword(this.currentAccount.keystore, password)){
const bytom = this.bytom.clone();
- bytom.keychain.removeByAlias(alias);
+ bytom.keychain.removeByAlias(this.currentAccount.alias);
const values = Object.values(bytom.keychain.pairs)
if(values.length === 0){
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='gnooapainaenaagmljnopepbheiaaaok'>
- <updatecheck codebase='http://localhost:8000/chrome-ext.crx' version='3.0.0' prodversionmin='64.0.3242' />
+ <updatecheck codebase='http://localhost:8000/chrome-ext.crx' version='3.0.1' prodversionmin='64.0.3242' />
</app>
</gupdate>
\ No newline at end of file