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: implement the adena wallet provider #3

Merged
merged 9 commits into from
Sep 4, 2024

Conversation

jinoosss
Copy link
Member

What type of PR is this?

  • feature

What this PR does:

  • Define the wallet provider that will be managed in your SDK instance, and implement the adena wallet provider.

  • Change the adena methods to provider.

@jinoosss jinoosss force-pushed the ADN-604-implement-the-adena-wallet-provider branch from b6456dd to cd792ad Compare September 2, 2024 06:03
@jinoosss jinoosss marked this pull request as ready for review September 2, 2024 08:31
@dongwon8247
Copy link
Member

@RezaRahemtola Can you give it a review?

Copy link
Collaborator

@RezaRahemtola RezaRahemtola left a comment

Choose a reason for hiding this comment

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

Code looks good to me otherwise, it's going in the right direction!
I'll test this new SDK architecture locally tomorrow with one of my Gno projects to give more feedbacks regarding usage

packages/sdk/package-lock.json Outdated Show resolved Hide resolved
Comment on lines +25 to +41
export enum WalletResponseFailedType {
NOT_CONNECTED = 'NOT_CONNECTED',
UNRESOLVED_TRANSACTION_EXISTS = 'UNRESOLVED_TRANSACTION_EXISTS',
INVALID_FORMAT = 'INVALID_FORMAT',
WALLET_LOCKED = 'WALLET_LOCKED',
ACCOUNT_MISMATCH = 'ACCOUNT_MISMATCH',
NO_ACCOUNT = 'NO_ACCOUNT',
TRANSACTION_FAILED = 'TRANSACTION_FAILED',
SIGN_FAILED = 'SIGN_FAILED',
ALREADY_CONNECTED = 'ALREADY_CONNECTED',
NETWORK_TIMEOUT = 'NETWORK_TIMEOUT',
REDUNDANT_CHANGE_REQUEST = 'REDUNDANT_CHANGE_REQUEST',
NETWORK_ALREADY_EXISTS = 'NETWORK_ALREADY_EXISTS',
UNADDED_NETWORK = 'UNADDED_NETWORK',
UNSUPPORTED_TYPE = 'UNSUPPORTED_TYPE',
UNEXPECTED_ERROR = 'UNEXPECTED_ERROR',
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we unify those types in the future in a common package used by the main Adena repo and this SDK ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I would like to unify the types and responses.
If the SDK and wallet responses were separate, it wouldn't be a problem if the provider did the mapping for me, but I'd have to manage them separately and always consider what I'm missing.

@jinoosss
Copy link
Member Author

jinoosss commented Sep 4, 2024

@RezaRahemtola
Thanks for the review !

We have a PR that implements the features of the SDK.
We would be grateful if you could review it in the environment of this PR(#5).

@jinoosss jinoosss merged commit 6cd46bf into main Sep 4, 2024
3 checks passed
@jinoosss jinoosss deleted the ADN-604-implement-the-adena-wallet-provider branch September 4, 2024 02:42
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