BREAKING CHANGE: getFee returns promise, express fee in XRP in instructions response, use rawRequest to start decoupling Remote from API

This commit is contained in:
Chris Clark
2015-10-21 16:04:35 -07:00
parent 5aa212471c
commit cd17d6940f
52 changed files with 277 additions and 184 deletions

View File

@@ -22,10 +22,6 @@ function parseTimestamp(tx: {date: string}): string | void {
return tx.date ? (new Date(toTimestamp(tx.date))).toISOString() : undefined;
}
function removeUndefined(obj: Object): Object {
return _.omit(obj, _.isUndefined);
}
function removeEmptyCounterparty(amount) {
if (amount.counterparty === '') {
delete amount.counterparty;
@@ -76,7 +72,7 @@ function parseMemos(tx: Object): ?Array<Object> {
return undefined;
}
return tx.Memos.map((m) => {
return removeUndefined({
return utils.common.removeUndefined({
type: m.Memo.parsed_memo_type || hexToString(m.Memo.MemoType),
format: m.Memo.parsed_memo_format || hexToString(m.Memo.MemoFormat),
data: m.Memo.parsed_memo_data || hexToString(m.Memo.MemoData)
@@ -87,10 +83,10 @@ function parseMemos(tx: Object): ?Array<Object> {
module.exports = {
parseOutcome,
parseMemos,
removeUndefined,
adjustQualityForXRP,
dropsToXrp: utils.common.dropsToXrp,
constants: utils.common.constants,
txFlags: utils.common.txFlags,
core: utils.common.core
core: utils.common.core,
removeUndefined: utils.common.removeUndefined
};