Skip to content

Commit 6d24652

Browse files
committed
Added more tests for the tokenbalance
1 parent 01efdeb commit 6d24652

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lib/init.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,10 @@ module.exports = function (apiKey, chain) {
492492
* @param {string} contractaddress - Contract address
493493
* @example
494494
* var supply = api.account.tokenbalance(
495-
* '0x0a869d79a7052c7f1b55a8ebabbea3420f0d1e13',
496-
* 'TheDAO');
495+
* '0x4366ddc115d8cf213c564da36e64c8ebaa30cdbd',
496+
* 'DGD',
497+
* ''
498+
* );
497499
* @returns {Promise.<object>}
498500
*/
499501
tokenbalance(address, tokenname, contractaddress){
@@ -517,7 +519,7 @@ module.exports = function (apiKey, chain) {
517519
if (address) {
518520
queryObject.address = address;
519521
}
520-
522+
521523
var query = querystring.stringify(queryObject);
522524
return getRequest(query);
523525
},

test/methods-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ describe('api', function() {
1717
var api = init();
1818

1919
var supply = api.account.tokenbalance(
20-
'0x0a869d79a7052c7f1b55a8ebabbea3420f0d1e13',
21-
'TheDAO');
20+
'0x4366ddc115d8cf213c564da36e64c8ebaa30cdbd',
21+
'DGD');
2222
supply.then(function(res){
23-
assert.ok(res);
23+
assert.ok(res.result);
2424
done();
2525
});
2626
});

0 commit comments

Comments
 (0)