Skip to content

Should display reason for Transfer Error if not enough funds #41

@codec64

Description

@codec64

Describe the bug
Response to API Transfer would give generic reply if sender has not enough funds
"error": "Error: There was an error trying to make the transfer"

To Reproduce

curl -X POST \
  http://localhost:8080/api/transaction/transfer \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: bdf207bd-6567-42de-a6b6-9121a6c6456d' \
  -H 'cache-control: no-cache' \
  -d '{
  "from": [{
    "accountAddress": "0xb29136aec640ed3804d54c8446f5dc3f1082e373",
    "amount": "2"
  }],
  "to": [{
    "accountAddress": "0xb29136aec640ed3804d54c8446f5dc3f1082e373",
    "amount": "2"
  }],
  "currencyAddress": "0x41c9d91e96b933b74ae21bcbb617369cbe022530"
}'

Expected behavior
Should display reason, ie "Not enough funds"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions