Update getBalances to use getTrustlines

This commit is contained in:
Chris Clark
2015-06-24 12:18:56 -07:00
parent d2df75dc25
commit 47a87f3a92
4 changed files with 171 additions and 285 deletions

View File

@@ -31,9 +31,20 @@ function wrapCatch(asyncFunction: () => void): () => void {
};
}
function composeAsync(wrapper, callback) {
return function(error, data) {
if (error) {
callback(error);
return;
}
callback(null, wrapper(data));
};
}
module.exports = {
dropsToXrp,
xrpToDrops,
toRippledAmount,
wrapCatch
wrapCatch,
composeAsync
};