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

DidOwner undefined in AgreementData #287

Open
H34D opened this issue Jun 21, 2022 · 0 comments
Open

DidOwner undefined in AgreementData #287

H34D opened this issue Jun 21, 2022 · 0 comments

Comments

@H34D
Copy link
Contributor

H34D commented Jun 21, 2022

Describe the bug

        const { _did, _didOwner, _conditionIds, _conditionIdSeeds } = values[0]
        return {
            did: _did,
            agreementId,
            didOwner: _didOwner,
            templateId,
            conditionIdSeeds: _conditionIdSeeds,
            conditionIds: _conditionIds
        } as AgreementData

based on that code and AgreementData being:

export interface AgreementData {
    did: string
    agreementId: string
    didOwner: string
    templateId: string
    conditionIds: string[]
    conditionIdSeeds: string[]
}

i would expect didOwner to be returned
but its always undefined

{
  did: '0x7efe2a5b3b8e367821edbf4108743ca913dc56f243b57eb42873cc5dae95e04d',
  agreementId: '0x705dbb9829410f9c921c98e831660bf95d9e0287814fa54ca4fc43b5143d3029',
  didOwner: undefined,
  templateId: '0x4E6FADed067d131DA93f4C5a541A5444Bff8DD92',
  conditionIdSeeds: [
    '0xcad2f6ba57770f4cd58c10ad978f14573347f16d1efdf9dff117b476a5edb68f',
    '0x56f085f670b54a764c60bedd56d963ecc69fa29204d344026661bc8d6d653b0a',
    '0xcbe731cd78faa1df6db2c5b58636506411d1f945d2be79805b8c77871ea9d262'
  ],
  conditionIds: [
    '0x1c5c6a4a76ca0a426c00e0ea68e99b2d49ae3aab056ba8494a1ac3fd7a2b3117',
    '0x81a2fa4c9e1390477c8b69a773ee0ffc23eba32d64471056550dd30692fa4b83',
    '0xa480c6eb65cde458c4e85c5f2cf2ca615631f93c6611965beb902f7451a74755'
  ]
}

its not being queried from the graph:

            result: {
                _agreementId: true,
                _did: true,
                _accessConsumer: true,
                _accessProvider: true,
                _conditionIds: true,
                _conditionIdSeeds: true,
                _timeLocks: true,
                _timeOuts: true
            }

because it does not exist on the event anymore
i can get this value from some other source but it would make sense to change the interface of AgreementData

To Reproduce

Steps to reproduce the behavior:

  1. call getAgreementData
  2. find didOwner being undefined

Expected behavior

Since didOwner is not an optional field it would make sense to adapt the interface

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

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

1 participant