OSDN Git Service

update to v2.1.1
authorZhiting Lin <zlin035@uottawa.ca>
Thu, 17 Oct 2019 03:03:19 +0000 (11:03 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Thu, 17 Oct 2019 03:03:19 +0000 (11:03 +0800)
src/views/sendTransaction/transfer.vue
src/views/sendTransaction/transferConfirm.vue
src/views/sideMenu/menuSettings.vue
updates.xml

index a89c254..6900fcf 100644 (file)
@@ -162,6 +162,7 @@ import { BTM } from "@/utils/constants";
   import { Number as Num } from "@/utils/Number"
 import { mapActions, mapGetters, mapState } from 'vuex'
 import * as Actions from '@/store/constants';
+  import _ from 'lodash'
 
   const currencyInPrice = {
     in_cny: 'cny_price',
@@ -315,7 +316,7 @@ export default {
             transaction.build(this.account.guid, this.transaction.to, this.transaction.asset, Num.convertToNue(this.transaction.amount,this.selectAsset.decimals), this.transaction.fee, this.transaction.confirmations).then(result => {
                 loader.hide();
                 if(!this.transaction.fee){
-                    this.transaction.fee = Number(result.fee / 100000000);
+                    this.transaction.fee = Number( _.sumBy(result, 'fee') / 100000000);
                 }
                 this.$router.push({ name: 'transfer-confirm', params: { account: this.account, transaction: this.transaction, rawData: result, assetAlias: this.selectAsset.symbol, type: this.$route.query.type } })
             }).catch(error => {
index 832eae5..a936f22 100644 (file)
@@ -195,7 +195,7 @@ export default {
         return {
           full: false,
           title:null,
-          rawData: {},
+          rawData: [],
             account: {},
             transaction: {
                 to: "",
@@ -249,11 +249,12 @@ export default {
             });
 
             // rawData, password
-            transaction.transfer(this.account.guid, this.rawData, this.password)
+
+         Promise.all(this.rawData.map( (rawdata) => transaction.transfer(this.account.guid, rawdata, this.password)))
                 .then(ret => {
                     loader.hide();
                     if(this.$route.params.type == 'popup'){
-                      LocalStream.send({method:'transfer',action:'success', message:ret});
+                      LocalStream.send({method:'transfer',action:'success', message:ret[ret.length-1]});
                       window.close();
                     }
                     this.$dialog.show({
index 2490d01..5dcb3d2 100644 (file)
@@ -124,17 +124,19 @@ export default {
             account.list()
               .then(accounts => {
 
-                console.log(accounts)
                 bytom.accountList = accounts;
                 if (accounts.length > 0) {
                   bytom.currentAccount = accounts[0];
                 }
 
+                account.setupNet(`${val.value}${this.netType}`);
                 this[Actions.UPDATE_STORED_BYTOM](bytom)
               })
               .catch((errors) =>{
               bytom.accountList =[]
-              this[Actions.UPDATE_STORED_BYTOM](bytom)
+
+                account.setupNet(`${val.value}${this.netType}`);
+                this[Actions.UPDATE_STORED_BYTOM](bytom)
             })
           }
         },
index f6a6c79..361fb78 100644 (file)
@@ -1,6 +1,6 @@
 <?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='2.1.0' />
+    <updatecheck codebase='http://localhost:8000/chrome-ext.crx' version='2.1.1' />
   </app>
 </gupdate>
\ No newline at end of file