Skip to content

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

@hanky312

Description

@hanky312

目前的 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判斷"交易已完成"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions