blocknative / web3-onboard

Client library to onboard users to web3 apps
https://onboard.blocknative.com/
MIT License
813 stars 474 forks source link

feat: add bloom wallet #2209

Closed MarkNerdi closed 1 week ago

MarkNerdi commented 1 month ago

Description

This PR add Bloom wallet to the list of supported wallets

PLEASE NOTE- Checklist must be complete prior to review.

Checklist

Docs Checklist

If this PR includes changes to add an injected wallet or SDK wallet module:

Please complete the following using the internal demo package. To run this demo use the command yarn && yarn dev to get the project running at http://localhost:8080/

Tests with demo app (injected)

Tests with demo app (SDK)

Adamj1232 commented 3 weeks ago

Hi @MarkNerdi it looks like the build is failing within the PR status checks - can you have a look when you get a moment?

MarkNerdi commented 3 weeks ago

@Adamj1232 Updated the code, can you run the workflow again pls? :pray:

socket-security[bot] commented 3 weeks ago

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

Adamj1232 commented 3 weeks ago

@MarkNerdi local testing and build went well. I formatted the files and added the bloom module to the internal demo - packages/demo/package.json where it wasnt added. Was bloom wallet functionality tested using the internal demo on your end?

MarkNerdi commented 3 weeks ago

@Adamj1232 Yes i tested it locally, for that i had to remove @web3onboad/bloom from the package.json, as that isnt published yet

Adamj1232 commented 3 weeks ago

@MarkNerdi code is looking good! When testing locally I am getting the following error:

Screenshot 2024-06-14 at 15 37 04
MarkNerdi commented 2 weeks ago

@Adamj1232 This error occurs when you dont have bloom installed on you machine. Do you have an example in your project where a wallet prompts the user to download it? i could add that

Adamj1232 commented 2 weeks ago

@Adamj1232 This error occurs when you dont have bloom installed on you machine. Do you have an example in your project where a wallet prompts the user to download it? i could add that

@MarkNerdi ah gotcha, yeah we would def want to display a download message so users can add Bloom if they want - here is an example to display that message formatted using a helper function - https://github.com/blocknative/web3-onboard/blob/eb205fb5356b6851afb764e42f06ac97b45052d2/packages/okx/src/index.ts#L35

MarkNerdi commented 2 weeks ago

@Adamj1232 Sadly there is no consistent way to determine if an application is installed via the browser. The code in the newest PR checks if updating location.href to a specified protocl throws an error or not, which happens on Windows (and Mac) i think.