testing - add memo field into payment transaction so parsePaymentMemos from parsePayment is tested

This commit is contained in:
Ivan Tivonenko
2015-07-17 05:58:28 +03:00
parent 8d5752883f
commit eb7bbe5715
3 changed files with 30 additions and 4 deletions

View File

@@ -17,7 +17,13 @@ function parsePaymentMemos(tx) {
if (!Array.isArray(tx.Memos) || tx.Memos.length === 0) {
return undefined;
}
return tx.Memos.map((m) => m.Memo);
return tx.Memos.map((m) => {
return utils.removeUndefined({
type: m.Memo.parsed_memo_type,
format: m.Memo.parsed_memo_format,
data: m.Memo.parsed_memo_data
});
});
}
function parsePayment(tx: Object): Object {