Skip to content

Commit

Permalink
Merge pull request #3 from interledgerjs/dj-messaging
Browse files Browse the repository at this point in the history
feat: [BREAKING] send routes via /messages
  • Loading branch information
sentientwaffle committed Oct 20, 2016
2 parents 8b21530 + 82a39af commit 6996f26
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/service-manager.js
Expand Up @@ -285,10 +285,19 @@ class ServiceManager {
return result
}

* sendRoutes (connectorHost, routes) {
* sendRoutes (routes, params) {
const ledger = params.ledger
yield request
.post(connectorHost + '/routes')
.send(routes)
.post(this.ledgers[ledger] + '/messages')
.auth(params.username, params.password)
.send({
ledger: this.ledgers[ledger],
account: this.ledgers[ledger] + '/accounts/' + encodeURIComponent(params.connectorName),
data: {
method: 'broadcast_routes',
data: routes
}
})
}

* assertBalance (ledger, name, expectedBalance) {
Expand Down

0 comments on commit 6996f26

Please sign in to comment.