Discussions

Ask a Question
Back to All

Currency bug in wallet responses

Hi

It looks like there is a bug in the responses from the wallet endpoint, when the transaction uses multiple currencies (In my case DKK and EUR).

As you can see below the fromCurrency in the first one is eur and does correctly reflect the amount of eur in the transaction, however the toCurrency is dkk, but the toAmount still reflects the eur value.

Same with the second transaction, but the other way around.

I am unsure if the ids can be misused, so I have removed those.

    {
      "id": ,
      "state": "complete",
      "note": "Deposited 128.00 EUR dkk to wallet to cover charge #",
      "summary": "Deposited to cover for charge #",
      "fromAmount": 17.1903,
      "fromCurrency": {
        "identifier": "eur",
        "name": "Euros",
        "decimals": 2
      },
      "toAmount": 17.1903,
      "toCurrency": {
        "identifier": "dkk",
        "name": "Danish kroner",
        "decimals": 2
      },
      "exchangeRate": 7.446,
      "createdAt": "2023-03-23T12:29:20Z",
      "updatedAt": "2023-03-23T12:29:20Z",
      "completedAt": "2023-03-23T12:29:20Z"
    },
    {
      "id": ,
      "state": "complete",
      "note": "Charge for 17.19 EUR",
      "summary": "Charge # for 23.5000 kWh",
      "fromAmount": 127.999,
      "fromCurrency": {
        "identifier": "dkk",
        "name": "Danish kroner",
        "decimals": 2
      },
      "toAmount": 127.999,
      "toCurrency": {
        "identifier": "eur",
        "name": "Euros",
        "decimals": 2
      },
      "exchangeRate": 0.1343,
      "createdAt": "2023-03-23T12:29:15Z",
      "updatedAt": "2023-03-23T12:29:16Z",
      "completedAt": "2023-03-23T12:29:15Z"
    },