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

feat: Possibility to create invite with QR generation and clipboard support #56

Merged
merged 4 commits into from
Jan 6, 2023

Conversation

Tommylans
Copy link
Member

@Tommylans Tommylans commented Jan 4, 2023

Screenshots are not using the Animo colors yet so it will change a bit.

Screenshot from 2023-01-04 16-15-52
image

image

image

@Tommylans Tommylans marked this pull request as ready for review January 4, 2023 15:21
public static acceptStates: DidExchangeState[] = [DidExchangeState.InvitationReceived]
public static acceptStates: DidExchangeState[] = [
DidExchangeState.InvitationReceived,
DidExchangeState.RequestReceived,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this not cause any UI issues when autoAcceptConnections is on true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll test it out but I think it will just go directly to the done state

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will just swap to the Done state so the UI is responding correctly.

packages/toolbox-ui/src/modals/PresentInviteModal.tsx Outdated Show resolved Hide resolved
return
}

const url = (await invite).invitation.toUrl({ domain: 'https://example.com' })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TimoGlastra Is the domain not being set in the config of the agent? I assume if we do not that it has a reason, but it would be quite nice to do toUrl with an optional domain.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, but there's a few complications:

  • What is you don't have an endpoint, and use a mediator, should the default mediator be used? What if it's different from the mediator that is used for this invitation?
  • the invitation object doesn't have access to the config
  • You may use a different url for the invitation (one that shows a nice ui of the invitation), than the endpoint that is used for DIDComm

@@ -23,6 +26,33 @@ export const ConnectionsScreen = () => {
await agent?.connections.acceptRequest(connectionId)
}

const declineRequest = async (connectionId: string) => {
await agent?.connections.deleteById(connectionId)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really fix the agent being optionally undefined in the react hooks package 😞

@TimoGlastra
Copy link
Member

Left some comments now that @blu3beri tagged me, 😄

@Tommylans Tommylans merged commit 8b998d0 into main Jan 6, 2023
@Tommylans Tommylans deleted the feature/TBX-50 branch January 6, 2023 11:44
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

Successfully merging this pull request may close these issues.

3 participants