Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const fromTransferAggregate = (t) => {
const cleanProperties = Util.omitNil({
transferId: t.transferId,
amount: formatAmount(t.amount),
// transferState: Util.omitNil(t.transferState),
transferState: t.transferState,
completedTimestamp: t.completedTimestamp,
ilpPacket: t.ilpPacket,
condition: t.condition,
fulfilment: t.fulfilment,
expiration: t.expirationDate,
extensionList: formatExtensionList(t.extensionList)
})
return Util.mergeAndOmitNil(Util.pick(t, transferProperties), cleanProperties)
}
const formatAmount = (asset) => Util.mergeAndOmitNil(asset, {
amount: Util.formatAmount(asset.amount),
currency: asset.currency
})