GET /payment/:token/:sender the python client returns:[
{
"event": "EventPaymentReceivedSuccess",
"amount": "5",
"initiator": "0x82641569b2062B545431cF6D7F0A418582865ba7",
"identifier": "1",
"log_time": "2018-10-30T07:03:52.193",
"token_address" : "0x5a2d2b9b015b46b8eaff7bffdc5db0051db7439b"
}
]
The CLI rutrns atm:
[
{
"amount": "1",
"identifier": 0,
"initiator_address": "0x00D384EF74575E97884215e9f39142228c7ACfa8",
"secret": "",
"secret_hash": "0x52d05daa7f7ffa5e6283ae523b54fb4de879b6904c9a000217700befc21f5c7f",
"target_address": "0x00673b5556Db5Fe0DdDB0875bF565a3a4AE51Dcb",
"token_address": "0x59105441977ecD9d805A4f5b060E34676F50F806"
}
]
Thanks for reporting. Sorry that I missed that.
This should be an easy fix since the SDK has a property on its transfer/payment objects that is called direction. It allows us to derive this event as the Python client has it.
@eorituz as you may have read in the linked PR, this issue is part of a bigger problem. Therefore we need to communicate with the TransCore-Team. To still provide you with a solution that enables you to continue working on the demo, I would like to ask you if you could list which properties of a payment object you explicitly need for your implementation. I would then quickly add them and we can merge this PR very soon. Thanks!
The current API does allow me to continue with the demo train. I just need to rewrite some small parts of my code.
So I don't need a hot fix for this. Take your time and align with the TransCore-Team on the API response.
What I need is:
identifier, event & sender/receiver(right now that's called initiator)
All other information are not needed for the train. However, things as e-g- time are nice to have
@eorituz you should have everything you need. This is the format you get now:
export enum ApiPaymentEvents {
sent = 'EventPaymentSentSuccess',
received = 'EventPaymentReceivedSuccess',
}
export interface ApiPayment {
event: ApiPaymentEvents;
initiator_address: string;
target_address: string;
token_address: string;
amount: string;
identifier: string;
secret: string;
secret_hash: string;
log_time: string;
}