Skip to content

Commit 79f9047

Browse files
committed
Added wallet provider test.
1 parent f9f7469 commit 79f9047

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test-providers.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,22 @@ module.exports = function(test) {
7777
new Wallet.utils.BN('35588')
7878
);
7979

80+
var privateKey = new Buffer(32);
81+
privateKey.fill(0x42);
82+
83+
var wallet = new Wallet(privateKey, url);
84+
pending.push(new Promise(function(resolve, reject) {
85+
wallet.estimateGas({
86+
to: '0xdfaf84077cF4bCECA4F79d167F47041Ed3006D5b',
87+
data: '0x93a0935200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003666f6f0000000000000000000000000000000000000000000000000000000000'
88+
}).then(function(value) {
89+
test.equal(value.toString(10), '35588', 'Failed to call wallet.estimateGas');
90+
resolve();
91+
}, function(error) {
92+
reject(error);
93+
});
94+
}));
95+
8096
Promise.all(pending).then(function(results) {
8197
test.done();
8298
}, function(error) {

0 commit comments

Comments
 (0)