Skip to content

Commit f18134a

Browse files
committed
Fix getTransaction option bug and upgrade version to 3.0.6
1 parent 88998b2 commit f18134a

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chainsql",
3-
"version": "3.0.5",
3+
"version": "3.0.6",
44
"description": "A database driver for chainsql ",
55
"main": "dist/npm/",
66
"directories": {
@@ -14,17 +14,17 @@
1414
"dependencies": {
1515
"bignumber.js": "^2.4.0",
1616
"chainsql-keypairs": "^0.11.1",
17-
"chainsql-lib": "^1.0.3",
17+
"chainsql-lib": "^1.1.23",
1818
"elliptic": "^5.1.0",
1919
"hash.js": "^1.0.3",
2020
"lodash": "^4.17.21",
21-
"protobufjs": "^6.8.0",
21+
"protobufjs": "^6.11.3",
22+
"rfc1751.js": "^1.0.0",
23+
"rimraf": "^3.0.0",
2224
"sjcl": "~1.0.3",
2325
"web3-core-helpers": "1.0.0-beta.36",
2426
"web3-eth-abi": "1.0.0-beta.36",
25-
"web3-utils": "1.0.0-beta.36",
26-
"rimraf": "^3.0.0",
27-
"rfc1751.js": "^1.0.0"
27+
"web3-utils": "1.0.0-beta.36"
2828
},
2929
"devDependencies": {
3030
"assert-diff": "^1.0.1",

src/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,14 @@ ChainsqlAPI.prototype.getContractTransactions = function (address, opts, cb) {
620620
};
621621

622622
ChainsqlAPI.prototype.getTransaction = function (hash,meta,meta_chain,cb) {
623+
var option = {
624+
meta : meta,
625+
meta_chain: meta_chain
626+
}
623627
if ((typeof cb) != 'function') {
624-
return this.api.getTransaction(hash,meta,meta_chain);
628+
return this.api.getTransaction(hash,option);
625629
} else {
626-
this.api.getTransaction(hash,meta,meta_chain).then(function (data) {
630+
this.api.getTransaction(hash,option).then(function (data) {
627631
cb(null, data);
628632
}).catch(function (err) {
629633
cb(err);

0 commit comments

Comments
 (0)