Skip to content

Issue when using Tendermint* properties for url or body parameters in a webhook #5

@lietho

Description

@lietho

baseledger_api_proposal_v0.5.md mentions that is possible to use TendermintBlockId, TendermintTransactionId and TendermintTransactionTimestamp in the url or body params of a SOR webhook. Unfortunately this doesn't work because of several reasons:

  • TendermintTransactionTimestamp is of type sql.NullTime. The way the URL or the body of the request are created (buildWebhookRequestBody and buildWebhookRequestUrl in system_of_record_hook.go) results in a string similar to "{2022-05-28T05:41:13Z true}". It would be better to just have the time in the string.
  • At the time the webhook request URL and body are build, the mentioned properties are not yet set on the trustmesh entry. The trustmesh entry gets created without these properties set. In ExecuteBusinessLogic the webhook will be triggered first and at the end setTxStatus is called to update these properties.

I have created an ugly workaround for myself to overcome this issue, but I don't want to share it with the public :-) Maybe it is possible to update the properties already before triggering the webhook?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions