Bytom Wallet for Chrome
Revision | d92afb467c3f5f659e0098d739d9ef1c782ffb0f (tree) |
---|---|
Time | 2019-05-23 15:45:44 |
Author | Zhiting Lin <zlin035@uott...> |
Commiter | Zhiting Lin |
update the advancetransfer for with or without arguments types.
@@ -83,7 +83,9 @@ transaction.advancedTransfer = function(guid, transaction, password, arrayData) | ||
83 | 83 | .signTransaction(guid, JSON.stringify(transaction), password) |
84 | 84 | .then(ret => { |
85 | 85 | let signatures = ret.signatures |
86 | - signatures[0] = arrayData | |
86 | + if(arrayData){ | |
87 | + signatures[0] = arrayData | |
88 | + } | |
87 | 89 | bytom.transaction |
88 | 90 | .submitPayment(guid, ret.raw_transaction, signatures) |
89 | 91 | .then(res3 => { |
@@ -171,9 +171,15 @@ export default { | ||
171 | 171 | onCancel: this.onCancel |
172 | 172 | }); |
173 | 173 | |
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) =>{ | |
177 | 183 | return transaction.advancedTransfer(this.account.guid, ret.result.data, this.password, arrayData) |
178 | 184 | .then((resp) => { |
179 | 185 | loader.hide(); |
@@ -187,10 +193,10 @@ export default { | ||
187 | 193 | .catch(error => { |
188 | 194 | throw error |
189 | 195 | }); |
190 | - }) | |
191 | - .catch(error => { | |
192 | - throw error | |
193 | - }); | |
196 | + // }) | |
197 | + // .catch(error => { | |
198 | + // throw error | |
199 | + // }); | |
194 | 200 | }).catch(error => { |
195 | 201 | loader.hide(); |
196 | 202 |