ripple / ripple-lib-extensions

[Deprecated] A collection of extensions to ripple-lib. Instead, see https://github.com/XRPLF/xrpl.js
https://github.com/XRPLF/xrpl.js
22 stars 31 forks source link

Add parseFinalBalances #22

Closed darkdarkdragon closed 8 years ago

darkdarkdragon commented 8 years ago

Just like parseBalanceChanges, except the values are the final balances rather than the balance changes.

darkdarkdragon commented 8 years ago

@clark800 done

clark800 commented 8 years ago

I think it might be worth reducing duplication further by making generic methods that take a function parameter, so parseBalanceChanges would be return parseAmountNodes(metadata, computeBalanceChange) etc. The computeBalanceChanges function could return null when there is no change as a signal to omit it from the result.

darkdarkdragon commented 8 years ago

@clark800 I'll squash it if it is ok

clark800 commented 8 years ago

LGTM