OSDN Git Service
(root)
/
bytom
/
bytom-electron.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
update the api return format and addup the error handle.
[bytom/bytom-electron.git]
/
src
/
sdk
/
api
/
transactions.js
diff --git
a/src/sdk/api/transactions.js
b/src/sdk/api/transactions.js
index
2a351fb
..
3106e61
100644
(file)
--- a/
src/sdk/api/transactions.js
+++ b/
src/sdk/api/transactions.js
@@
-127,6
+127,11
@@
const transactionsAPI = (client) => {
.then(resp => new shared.BatchResponse(resp)),
cb
),
+
+ estimateGas: (template, cb) => shared.tryCallback(
+ client.request('/estimate-transaction-gas', {'transactionTemplate': template}).then(resp => checkForError(resp)),
+ cb
+ )
}
}