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/iframe extension connect #86

Merged
merged 8 commits into from
Jul 1, 2024

Conversation

franfernandez20
Copy link
Contributor

@franfernandez20 franfernandez20 commented Mar 21, 2024

Description:
This commit introduces new messages that allow the web dApp to establish a session by sending messages to the parent extension.

  • New messages in extensionController
  • Functionality to auto connect if iframe extension detected
  • Documentation of use

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@AdrianKBL
Copy link

Good morning,

The comments from @teacoat and @zanctor have been included in the Pull Request. If there are no further remarks, we would appreciate your approval.

Thank you.

This commit introduces new messages that allow the web dApp to establish
a session by sending messages to the parent extension. In case an iframe
is detected but no connection is established, the dApp will send a
message to the parent extension to initiate a connection.

Signed-off-by: Fran Fernandez <fran@kabila.app>
Signed-off-by: Fran Fernandez <fran@kabila.app>
Signed-off-by: Fran Fernandez <fran@kabila.app>
@franfernandez20
Copy link
Contributor Author

I have added support for this feature in the demo. Attached is a video demonstrating its behaviour within an iframe inside the extension.

iframe-extension.mov

Copy link
Contributor

@justynspooner justynspooner left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Just some small tweaks to docs and parameter name consistency.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@@ -128,8 +130,9 @@ export class DAppConnector {
})
const existingSessions = this.walletConnectClient.session.getAll()

if (existingSessions)
if (existingSessions.length > 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Good spot 👍

src/lib/shared/extensionController.ts Outdated Show resolved Hide resolved
franfernandez20 and others added 4 commits June 26, 2024 11:44
Co-authored-by: Justyn Spooner <justynjj@gmail.com>
Signed-off-by: Fran Fernández <franfernandez20@gmail.com>
Co-authored-by: Justyn Spooner <justynjj@gmail.com>
Signed-off-by: Fran Fernández <franfernandez20@gmail.com>
Co-authored-by: Justyn Spooner <justynjj@gmail.com>
Signed-off-by: Fran Fernández <franfernandez20@gmail.com>
Co-authored-by: Justyn Spooner <justynjj@gmail.com>
Signed-off-by: Fran Fernández <franfernandez20@gmail.com>
@franfernandez20
Copy link
Contributor Author

LGTM 👍

Just some small tweaks to docs and parameter name consistency.

Thank you for the corrections 🙏 . All of them have been applied.

@psychoter
Copy link

Looking forward to this commit being approved!

Copy link
Contributor

@tmctl tmctl left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the contribution!

@tmctl tmctl merged commit ef5c047 into hashgraph:main Jul 1, 2024
7 checks passed
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.

7 participants