Skip to content

Commit

Permalink
Merge branch 'develop' into feature/#22
Browse files Browse the repository at this point in the history
  • Loading branch information
orweinberger committed Mar 13, 2015
2 parents f864d90 + e175ab7 commit d44aaf4
Show file tree
Hide file tree
Showing 13 changed files with 1,385 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Pockets [![Build Status](https://travis-ci.org/joola/pockets.svg)](https://travis-ci.org/joola/pockets) [![Coverage Status](https://coveralls.io/repos/joola/pockets/badge.svg)](https://coveralls.io/r/joola/pockets)
# Pockets [![Build Status](https://travis-ci.org/joola/pockets.svg)](https://travis-ci.org/joola/pockets) [![Coverage Status](https://coveralls.io/repos/joola/pockets/badge.svg)](https://coveralls.io/r/joola/pockets) [![Inline docs](http://inch-ci.org/github/joola/pockets.svg?branch=develop)](http://inch-ci.org/github/joola/pockets)
7 changes: 7 additions & 0 deletions inch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files": {
"included": [
"www/lib/pockets/**/*.js"
]
}
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@
"build": "gulp build"
},
"dependencies": {
"async": "^0.9.0",
"bigi": "^1.4.0",
"bitcoinjs-lib": "^1.5.1",
"bluebird": "^2.9.14",
"browser-request": "^0.3.3",
"bs58": "^2.0.1",
"buffer": "^3.1.1",
"ecurve": "^1.0.1",
"eventemitter2": "^0.4.14",
"node-localstorage": "^0.5.0",
"request": "^2.53.0",
"socket.io-client": "^1.3.5",
"thenify-all": "^1.6.0",
"traverse": "^0.6.6",
"underscore": "^1.8.2"
Expand Down
53 changes: 53 additions & 0 deletions test/unit/6-bitcoin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,57 @@ describe("bitcoin", function () {
return done(new Error('This should fail'));
});
});

xit("should send a bitcoin", function (done) {
engine.pockets.create({
parent: null,
name: 'root',
wallet: {
address: 'mqoVHUCZGneDUy7Z7mNCdqPmHSTUXicG8r',
key: 'cS15SvoeH6cwTL9mfZGK3dpEpCDprFq7K4b1zEeLV5CpxUf3wYFY'
},
pockets: {
test: {
parent: 'root',
name: 'test',
limit: 0.001,
wallet: {
address: 'n14gnULbKCPxJJmxbSiKT9nPxFRZMtutaq',
key: 'cVdx1w953mFriCNmyAmLxNE2S6CXWi9w7aCC2qH34Aw11BMWTR4J'
}
}
}
}, function (err) {
if (err)
return done(err);

engine.bitcoin.handleTransaction({
transactions: [
{
from: {
name: 'root',
wallet: {
address: 'mqoVHUCZGneDUy7Z7mNCdqPmHSTUXicG8r',
key: 'cS15SvoeH6cwTL9mfZGK3dpEpCDprFq7K4b1zEeLV5CpxUf3wYFY'
}
},
to: {
name: 'test',
wallet: {
address: 'n14gnULbKCPxJJmxbSiKT9nPxFRZMtutaq',
key: 'cVdx1w953mFriCNmyAmLxNE2S6CXWi9w7aCC2qH34Aw11BMWTR4J'
}
},
amount: 0.001
}
]
}, done)
});
});

xit("should listen for a wallet update", function (done) {
engine.listener.add('mpSKAvSLeZTHbstNEzYKs7fxw9fat6a1Y5');
engine.events.on('wallet-update',done);
//now send the money
});
});
Loading

0 comments on commit d44aaf4

Please sign in to comment.