• R/O
  • HTTP
  • SSH
  • HTTPS

Byone: Commit

Bytom Wallet for Chrome


Commit MetaInfo

Revisiond92afb467c3f5f659e0098d739d9ef1c782ffb0f (tree)
Time2019-05-23 15:45:44
AuthorZhiting Lin <zlin035@uott...>
CommiterZhiting Lin

Log Message

update the advancetransfer for with or without arguments types.

Change Summary

Incremental Difference

--- a/src/models/transaction.js
+++ b/src/models/transaction.js
@@ -83,7 +83,9 @@ transaction.advancedTransfer = function(guid, transaction, password, arrayData)
8383 .signTransaction(guid, JSON.stringify(transaction), password)
8484 .then(ret => {
8585 let signatures = ret.signatures
86- signatures[0] = arrayData
86+ if(arrayData){
87+ signatures[0] = arrayData
88+ }
8789 bytom.transaction
8890 .submitPayment(guid, ret.raw_transaction, signatures)
8991 .then(res3 => {
--- a/src/views/sendTransaction/advancedTransfer.vue
+++ b/src/views/sendTransaction/advancedTransfer.vue
@@ -171,9 +171,15 @@ export default {
171171 onCancel: this.onCancel
172172 });
173173
174- transaction.buildTransaction(this.account.guid, this.transaction.input, this.transaction.output, this.transaction.fee * 100000000, this.transaction.confirmations).then(ret => {
175- return transaction.convertArgument(this.transaction.args)
176- .then((arrayData) =>{
174+ transaction.buildTransaction(this.account.guid, this.transaction.input, this.transaction.output, this.transaction.fee * 100000000, this.transaction.confirmations).then(async (ret) => {
175+
176+ let arrayData
177+ if(this.transaction.args){
178+ arrayData = await transaction.convertArgument(this.transaction.args)
179+ }
180+
181+ // return transaction.convertArgument(this.transaction.args)
182+ // .then((arrayData) =>{
177183 return transaction.advancedTransfer(this.account.guid, ret.result.data, this.password, arrayData)
178184 .then((resp) => {
179185 loader.hide();
@@ -187,10 +193,10 @@ export default {
187193 .catch(error => {
188194 throw error
189195 });
190- })
191- .catch(error => {
192- throw error
193- });
196+ // })
197+ // .catch(error => {
198+ // throw error
199+ // });
194200 }).catch(error => {
195201 loader.hide();
196202
Show on old repository browser