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

chore: upgrade chrome extension v2 manifest to v3 #51

Merged
merged 15 commits into from
May 20, 2022

Conversation

wentokay
Copy link
Collaborator

@wentokay wentokay commented May 17, 2022

replaces #36

TODO:

  • ensure table plugins load on balances page
  • reinstate iframe code from SolanaLedgerKeyring so that ledger still works
  • rebase main into this branch and ensure everything works ok. Haven't done this yet as I want to double check other tabs are working as expected before they get disabled

@wentokay wentokay mentioned this pull request May 17, 2022
2 tasks
@wentokay
Copy link
Collaborator Author

adding a ledger account demo

add_ledger.mov

@wentokay
Copy link
Collaborator Author

6325bda updated the e2e test to include testing connect and disconnect functionality of the client app.

I'll organize the test suite better in future PRs

e2e.mov

@wentokay wentokay force-pushed the wen/manfest-v2-to-v3 branch from 6325bda to 24460f0 Compare May 20, 2022 00:35
@wentokay wentokay changed the title [WIP] chore: upgrade chrome extension v2 manifest to v3 chore: upgrade chrome extension v2 manifest to v3 May 20, 2022
@wentokay
Copy link
Collaborator Author

wentokay commented May 20, 2022

Comment on lines +341 to +354
const postMessageToIframe = (message: any) => {
(self as any).clients
.matchAll({
frameType: "top-level",
includeUncontrolled: true,
type: "window",
visibilityState: "visible",
})
.then((clients: any) => {
clients.forEach((client: any) => {
client.postMessage(message);
});
});
}
}
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was having issues with chrome.runtime.sendMessage, I know there's an Io class too though. I just used this for now because (a) it worked, (b) it's very close to what would be used on mobile. Happy to use something different though

@wentokay
Copy link
Collaborator Author

ok I think this is finally ready to merge @armaniferrante

I noticed that sometimes I get a Blockhash issue but I think that might be unrelated to these code changes and I'll look to address it in a separate PR

Screenshot 2022-05-20 at 07 33 51

let handleMessage: (event: MessageEvent) => void;

navigator.serviceWorker.ready.then((_registration) => {
handleMessage = ({ data }) => {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we need to check the origin here.

Copy link
Member

Choose a reason for hiding this comment

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

Will do this later.

@armaniferrante armaniferrante merged commit cd8efe9 into master May 20, 2022
@armaniferrante armaniferrante deleted the wen/manfest-v2-to-v3 branch May 20, 2022 14:20
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.

2 participants