question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

include parties' display names for signatories, observers when present

See original GitHub issue

Where parties occur in the domain model (that is, not in LF values such as contract payloads), we can supply their display names alongside, like

{identifier: string,
 displayName?: string}

One presumes that the observers and signatories of a contract ought to have access to the display names of the others.

Example event:

{
    "created": {
        "observers": [],
        "agreementText": "",
        "payload": {
            "observers": [],
            "issuer": "Alice",
            "amount": "999.99",
            "currency": "USD",
            "owner": "Alice"
        },
        "signatories": [
            {
                "identifier": "Alice",
                "displayName": "Alice Baker"
            }
        ],
        "contractId": "#1:0",
        "templateId": "b70bbfbc77a4790f66d4840cb19f657dd20848f5e2f64e39ad404a6cbd98cf75:Iou:Iou"
    }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
hurryabitcommented, Feb 24, 2020

Another way to reach consistency would be to leave the signatories and observers fields as is and add an additional field parties to the response. This field will contain a lookup table from party identifiers to display names. For the time being, we only fill this table with the display names of signatories and observers. For example,

    {
        "status": 200,
        "result": {
            "observers": [
                "Charlie"
            ],
            "payload": {
                "observers": ["Charlie"],
                "issuer": "Alice",
                "amount": "999.99",
                "currency": "USD",
                "owner": "Alice"
            },
            "signatories": [
                "Alice",
                "Bob" 
            ],
            "parties": {
                "Alice": "Alice from Wonderland",
                "Bob": "Bob the Builder",
                "Charlie": "Charlie Chaplin"
            }
            ...
        }
    }

I see multiple advantages with this approach:

  1. It’s backward compatible and doesn’t break any existing code.
  2. It avoids sending display names twice if a party is both a signatory and an observer. If we ever decide to deliver display names for all parties mentioned in the payload, this benefit would become even bigger.

What do you think?

0reactions
leo-dacommented, Feb 24, 2020

@leo-da Sounds good to me, though I emphasize this line from @hurryabit

we are not changing the active contract response. as agreed with @hurryabit we are extending /v1/parties endpoint to support lookup by by ID, the enrichment will be done on the client side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Policies for Election Observers
Partisan Poll Watchers or Challengers. In the U.S., voters representing political parties, candidates or groups favoring or opposing a ballot ...
Read more >
Reference: Templates — Daml SDK 2.4.2 documentation
For all parties involved in the contract (whether they're a signatory , observer , or controller ) you must pass them in as...
Read more >
Tips for Monitoring or Observing the Election at Polling Sites
Pass out campaign material and sample ballots. Speak to voters. Conduct polling. Monitor and report concerns and complaints. Prohibited. Enter the polling place ......
Read more >
Election Observers | Wisconsin Elections Commission
Observers may be present at a facility served by special voting deputies, a municipal clerk's office during in-person absentee voting, at a polling...
Read more >
Poll Watchers | U.S. Election Assistance Commission
Poll watchers may be members of organizations such as a political party or nonpartisan group, candidate representatives, international observers, exit polling ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found