Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction Notification 增加確認次數之區塊時間 #128

Open
hanky312 opened this issue Apr 17, 2017 · 1 comment
Open

Transaction Notification 增加確認次數之區塊時間 #128

hanky312 opened this issue Apr 17, 2017 · 1 comment

Comments

@hanky312
Copy link
Contributor

hanky312 commented Apr 17, 2017

目前的 Transaction Notification Sample Request
https://github.com/OpenNetworking/OSS/wiki/Notification-module#transaction-notification

{
    "notification_id": "299f4f3f-71a7-4cb5-bb21-564e4c0f81bf",
    "subscription_id": "bd84e443-daa9-4000-a0ea-f162d273937a",
    "tx_hash": "e6372839ab539785191f9fcdb19e015ad0e72143709f14e50dc5f6d069dd888f",
}

訂閱方指定區塊確認次數及交易識別碼時,回傳訊息時提供使定區塊確認數及其區塊時間
預期呈現方式如下

{
    "notification_id": "299f4f3f-71a7-4cb5-bb21-564e4c0f81bf",
    "subscription_id": "bd84e443-daa9-4000-a0ea-f162d273937a",
    "tx_hash": "e6372839ab539785191f9fcdb19e015ad0e72143709f14e50dc5f6d069dd888f",
    "confirmation": "2"
    "confirmation_time": "<unix timestamp>",
}

在應用場景中遇到callback_url固定是同一訊息接收端,同時接收區塊確認次數2及3的通知,原因是其將次數1判斷為"交易確認中",次數2判斷"交易已完成"

@BenjaminLu
Copy link

confirmation_time應該要給的是unix timestamp才不會有時區的問題

因為OSS不會曉得callback_url用戶的時區

收到unix timestamp的用戶server需要自己轉換到對應時區的時間

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants