LerianStudio / midaz

Midaz, an open-source, cloud-native, immutable, multi-currency, multi-asset, Core Ledger Application for storing and tracking transactions.
Apache License 2.0
83 stars 4 forks source link

Failed to display metadata in the transaction response by account ID. #273

Open gitfelipegomes opened 4 days ago

gitfelipegomes commented 4 days ago

When listing all operations of an account, the metadata is being returned as null. We need to adjust it to return the data correctly.

Example:

{
    "items": [
        {
            "id": "0193405f-c9f2-7e67-958f-4e8322599114",
            "transactionId": "0193405f-c9e8-7078-a9e2-704891b28ee7",
            "description": "Transaction test",
            "type": "CREDIT",
            "assetCode": "BRL",
            "chartOfAccounts": "",
            "amount": {
                "amount": 100,
                "scale": 1
            },
            "balance": {
                "available": 0,
                "onHold": 0,
                "scale": 0
            },
            "balanceAfter": {
                "available": 100,
                "onHold": 0,
                "scale": 1
            },
            "status": {
                "code": "",
                "description": null
            },
            "accountId": "0193405f-4994-7653-ad9c-6bb5521cc5eb",
            "accountAlias": "@conta1",
            "portfolioId": null,
            "organizationId": "0193405f-1637-7622-a9d3-dcd5cb6799d2",
            "ledgerId": "0193405f-2075-782e-8b9f-572800fcc7d5",
            "createdAt": "2024-11-18T17:43:59.730939Z",
            "updatedAt": "2024-11-18T17:43:59.730939Z",
            "deletedAt": null,
            "metadata": null
        }
    ],
    "page": 1,
    "limit": 10
}