manifest_version: 2,
name: 'Byone',
description: 'Bytom Wallet Chrome extension, Bystore officially changed to Byone.',
- version: '2.0.1',
+ version: '2.1.0',
author: 'Bytom frontend, zhitinglin',
web_accessible_resources: ['js/inject.js', 'wasm/main.wasm'],
browser_action: {
var networks = {
testnetvapor: 'http://52.82.55.145:3000/api/v1/vapor/',
- testnetbytom: 'http://52.82.55.145:3000/api/v1/btm/',
- solonetbytom: 'http://app.bycoin.io:3060/api/v1/btm/',
- mainnetbytom: 'https://api.bycoin.im:8000/api/v1/btm/',
+ testnet: 'http://52.82.55.145:3000/api/v1/btm/',
+ solonet: 'http://app.bycoin.io:3060/api/v1/btm/',
+ mainnet: 'https://api.bycoin.im:8000/api/v1/btm/',
mainnetvapor: 'https://api.bycoin.im:8000/api/v1/vapor/'
}
return new Promise(async (resolve, reject) => {
const bytom = Bytom.fromJson(state.bytom);
bytom.settings.network = 'mainnet';
- account.setupNet('mainnetbytom')
+ account.setupNet('mainnet')
account.list().then(accounts => {
bytom.accountList = accounts;
if (accounts.length > 0) {
}
bytom.settings.login = true
- bytom.settings.netType = 'bytom'
- dispatch(Actions.UPDATE_STORED_BYTOM, bytom).then(_bytom => {
+ bytom.settings.currency = "in_cny"
+ bytom.settings.netType = ''
+ dispatch(Actions.UPDATE_STORED_BYTOM, bytom).then(_bytom => {
dispatch(Actions.SET_BYTOM, Bytom.fromJson(_bytom));
resolve();
})
return new Promise(async (resolve, reject) => {
const bytom = Bytom.fromJson(state.bytom);
bytom.settings.network = network;
- account.setupNet(`${network}bytom`)
+ account.setupNet(`${network}`)
account.list().then(accounts => {
bytom.accountList = accounts;
if (accounts.length > 0) {
}
bytom.settings.login = true
- bytom.settings.netType = 'bytom'
+ bytom.settings.currency = "in_cny"
+ bytom.settings.netType = ''
dispatch(Actions.UPDATE_STORED_BYTOM, bytom).then(_bytom => {
dispatch(Actions.SET_BYTOM, Bytom.fromJson(_bytom));
resolve();
transaction.type = 'vote'
}else if(_.find(transaction.outputs, function(o) { return o.type =='crosschain_output'; })){
transaction.type = 'crossChain'
+ }else if(_.find(transaction.inputs, function(o) { return o.type =='crosschain_input'; })){
+ transaction.type = 'crossChain'
}
if(balanceObject.length ===1 ){
</a>
</div>
<div class="topbar-middle bg-secondary">
- <select class="network-select" :value="netType" @change="netTypeToggle">
+ <select class="network-select" :value="netType||'bytom'" @change="netTypeToggle">
<option value="bytom">{{ $t('main.bytom') }} {{net}}</option>
<option value="vapor">{{ $t('main.vapor') }} {{net}}</option>
</select>
</ul>
</div>
<div v-else>
- <div class="bg-emptytx"></div>
- <div>
- <span class="color-lightgrey center-text no-record">{{$t('main.noAssetRecord')}}</span>
- </div>
+ <ul class="list">
+ <li class="list-item" v-for="(asset, index) in defaultBalances" :key="index" @click="assetOpen(asset)">
+ <div class="float-right text-align-right">
+ <div class="value">{{ itemBalance(asset) }}</div>
+ <div class="addr color-grey">{{ formatCurrency(asset[ currency ]) }}</div>
+ </div>
+ <div v-if="asset.symbol">
+ <div class="uppercase">
+ {{asset.symbol}}
+ </div>
+
+ <div class="addr color-grey">{{asset.name}}</div>
+ </div>
+ <div v-else>
+ <div>
+ Asset
+ </div>
+
+ <div class="addr color-grey uppercase">{{shortAddress(asset.asset)}}</div>
+ </div>
+
+ </li>
+ </ul>
</div>
</div>
<div v-else>
limit: 10,
enterActive: EnterActive,
leaveActive: LeaveActive,
+ defaultBalances: [
+ {
+ alias: "btm",
+ asset: BTM,
+ name: "Bytom",
+ symbol: "BTM",
+ balance: 0,
+ decimals: 8,
+ in_btc: "0",
+ in_cny: "0",
+ in_usd: "0"
+ }
+ ],
};
},
watch: {
account.setupNet(`${this.net}${this.netType}`);
},
netTypeToggle: function (event) {
- const newNetType = event.target.value
+ const newNetType = event.target.value ==='bytom'? '' :event.target.value;
if( newNetType !== this.netType){
const bytom = this.bytom.clone();
if(this.transaction.type === 'toVapor'){
transaction.chainStatus().then((resp)=>{
const address = resp.federation_address
- account.setupNet(`${this.net}bytom`)
+ account.setupNet(`${this.net}`)
this.transaction.to = address
transaction.build(this.account.guid, address, this.transaction.asset, Num.convertToNue(this.transaction.amount,this.selectAsset.decimals), this.transaction.confirmations).then(result => {
loader.hide();
onCancel: this.onCancel
});
- if(this.netType === 'bytom'){
- account.create(this.formItem.accAlias, null, this.formItem.passwd1).then(account => {
- this[Actions.CREATE_NEW_BYTOM_ACCOUNT](account).then(()=>{
- loader.hide();
- this.$router.push('/');
- })
-
- }).catch(err => {
- console.log(err);
- loader.hide();
- this.$dialog.show({
- body: err.message
- });
- });
- }else if(this.netType === 'vapor'){
- account.setupNet(`${this.net}bytom`);
+ if(this.netType === 'vapor'){
+ account.setupNet(`${this.net}`);
account.create(this.formItem.accAlias, null, this.formItem.passwd1).then((resp) => {
account.setupNet(`${this.net}vapor`);
return account.copy(resp.guid).then((currentRespAccount)=>{
body: err.message
});
});
+ }else{
+ account.create(this.formItem.accAlias, null, this.formItem.passwd1).then(account => {
+ this[Actions.CREATE_NEW_BYTOM_ACCOUNT](account).then(()=>{
+ loader.hide();
+ this.$router.push('/');
+ })
+
+ }).catch(err => {
+ console.log(err);
+ loader.hide();
+ this.$dialog.show({
+ body: err.message
+ });
+ });
}
},
...mapActions([
if (bytom.settings.network != val.value) {
bytom.settings.network = val.value;
this.network = val;
- account.setupNet(`${val.value}bytom`);
+ account.setupNet(`${val.value}`);
bytom.currentAccount = {}
account.list()
},
watch: {
selected: function (value) {
- account.setupNet(`${value.value}bytom`);
+ account.setupNet(`${value.value}`);
}
},
mounted() {
} else {
this.selected = mainNet;
}
- account.setupNet(`${this.selected}bytom`);
+ account.setupNet(`${this.selected}`);
this.i18n = getLanguage(this.language);
}
};