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: Web3Wallet SDK #1771

Merged
merged 17 commits into from
Dec 19, 2022
Merged

feat: Web3Wallet SDK #1771

merged 17 commits into from
Dec 19, 2022

Conversation

ganchoradkov
Copy link
Member

@ganchoradkov ganchoradkov commented Dec 15, 2022

Description

Web3Wallet SDK to simplify Sign & Auth usage.
Interfaces: https://gist.github.com/pedrouid/4067a262550ffb80ea93ab21cedba2fb

How Has This Been Tested?

integration tests for each method

Due Dilligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@ganchoradkov ganchoradkov changed the title feat: Web3Wallet SDK WIP: feat: Web3Wallet SDK Dec 15, 2022
@arein arein added the accepted label Dec 15, 2022
@ganchoradkov ganchoradkov marked this pull request as ready for review December 16, 2022 11:05
@ganchoradkov ganchoradkov changed the title WIP: feat: Web3Wallet SDK feat: Web3Wallet SDK Dec 16, 2022
Copy link
Contributor

@xzilja xzilja left a comment

Choose a reason for hiding this comment

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

This is shaping up really nicely 👍 Left few comments and one overall here: Do we need to manually re-declare some of the types inside new client and engine type files here? Or is it possible to re-assign these to already existing types from sign and auth sdks, thus keeping the in one place when we need to change them.

Similarly, some logic i.e catching errors and logging them is already done in those sdk's, so perhaps we don't need to repeat it here?

packages/web3wallet/src/client.ts Show resolved Hide resolved
packages/web3wallet/src/controllers/engine.ts Outdated Show resolved Hide resolved
@ganchoradkov ganchoradkov requested review from xzilja and bkrem December 16, 2022 13:01
};

public getPendingSessionRequests: IWeb3WalletEngine["getPendingSessionRequests"] = () => {
return this.client.pendingRequest.getAll();
Copy link
Member

Choose a reason for hiding this comment

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

Not an item for now, but I think it would be interesting to discuss if this (pendingRequest store) should be a proper part of SignClient, rather than layering it on top here, so we have first class support for pending session requests in the client itself.

cc @pedrouid @0xasimetriq

Copy link
Member

@bkrem bkrem left a comment

Choose a reason for hiding this comment

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

Great work on this Gancho 💯 🚀

My only real concern is how the treat pendingRequests in the mid-long term, since we seem to be layering sign-specific persistence/logic on top of the actual sign client here.

I think it's fine for now and we should be able to easily switch over to a signClient-level implementation if/when that ships, but definitely wondering if it makes more sense to make that a first-class citizen in SignClient itself.

@ganchoradkov ganchoradkov merged commit ed782ce into v2.0 Dec 19, 2022
@ganchoradkov ganchoradkov deleted the feat/web3wallet branch December 19, 2022 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants