Skip to content

Commit

Permalink
chore: apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Michiel de Jong committed Oct 23, 2017
1 parent e22bc5a commit 4d06a8c
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 284 deletions.
2 changes: 1 addition & 1 deletion tool.js → client.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ plugin.connect().then(function () {
ilp: base64(IlpPacket.serializeIlpPayment(ilpPacketContents))
}).then(function () {
// console.log('transfer sent')
}, function (err) {
}).catch(function (err) {
console.error(err.message)
})
}, 500)
Expand Down
2 changes: 1 addition & 1 deletion tool2.js → client2.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ plugin.connect().then(function () {
ilp: base64(IlpPacket.serializeIlpPayment(ilpPacketContents))
}).then(function () {
// console.log('transfer sent')
}, function (err) {
}).catch(function (err) {
console.error(err.message)
})
}, 1)
Expand Down
2 changes: 1 addition & 1 deletion letter-shop.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ plugin.connect().then(function () {
expiresAt: new Date(new Date().getTime() + 1000000).toISOString()
}).then(function () {
console.log('transfer prepared, waiting for fulfillment...')
}, function (err) {
}).catch(function (err) {
console.error(err.message)
})
```
Expand Down
2 changes: 1 addition & 1 deletion pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ plugin.connect().then(function () {
expiresAt: new Date(new Date().getTime() + 1000000).toISOString()
}).then(function () {
console.log('transfer prepared, waiting for fulfillment...')
}, function (err) {
}).catch(function (err) {
console.error(err.message)
})
})
2 changes: 1 addition & 1 deletion proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ plugin.connect().then(function () {
}
}
plugin.addListener('outgoing_fulfill', listenerForThisTransfer)
}, function (err) {
}).catch(function (err) {
console.error(err.message)
})
} else {
Expand Down
2 changes: 1 addition & 1 deletion shop2.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plugin.connect().then(function () {
plugin.fulfillCondition(transfer.id, base64(fulfillment)).then(function () {
const letter = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ').split('')[(Math.floor(Math.random() * 26))]
res.write(letter)
}, function (err) {
}).catch(function (err) {
console.error(err.message)
})
} else {
Expand Down
8 changes: 4 additions & 4 deletions shop3.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ const plugin = new Plugin({
},
incomingSecret: '',
maxBalance: '1000000000',
prefix: 'g.letter-shop.mytrustline.',
prefix: 'example.letter-shop.mytrustline.',
info: {
currencyScale: 9,
currencyCode: 'XRP',
prefix: 'g.letter-shop.mytrustline.',
prefix: 'example.letter-shop.mytrustline.',
connectors: []
},
_store: {
_store: { // in-memory store for demo purposes
get: (k) => store[k],
put: (k, v) => { store[k] = v },
del: (k) => delete store[k]
Expand All @@ -43,7 +43,7 @@ plugin.connect().then(function () {
plugin.fulfillCondition(transfer.id, base64(fulfillment)).then(function () {
const letter = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ').split('')[(Math.floor(Math.random() * 26))]
res.write(letter)
}, function (err) {
}).catch(function (err) {
console.error(err.message)
})
} else {
Expand Down
Loading

0 comments on commit 4d06a8c

Please sign in to comment.