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

Extract WalletConnectorFrame, deprecate AeSdkAepp #1866

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

davidyuk
Copy link
Member

This PR is supported by the Æternity Crypto Foundation

closes #1838, based on #1865

Screenshot 2023-07-23 at 15 38 54

The idea is that different ways to connect aepp vs wallet can't have the same interface, so I think they should have their own interfaces with the ability to connect to an aepp-wide SDK instance. In the example, I'm connecting to a wallet using frame-based rpc, and a Ledger Wallet (doesn't need a connector class because it is quite simple) to the same SDK instance.

Using this approach, we can replace

if (isDev) {
  aeSdk = new AeSdk({ accounts: [<dev accounts>] })
} else {
  aeSdk = new AeSdkAepp(...)
}

with a single sdk instance and a separate logic that connects this instance to a specific wallet.

@codecov
Copy link

codecov bot commented Jul 23, 2023

Codecov Report

Attention: Patch coverage is 25.00000% with 45 lines in your changes missing coverage. Please review.

Project coverage is 90.17%. Comparing base (908930d) to head (33a081a).
Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
...p-wallet-communication/WalletConnectorFrameBase.ts 20.00% 28 Missing ⚠️
...llet-communication/WalletConnectorFrameWithNode.ts 30.76% 9 Missing ⚠️
.../aepp-wallet-communication/WalletConnectorFrame.ts 20.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1866      +/-   ##
===========================================
- Coverage    91.29%   90.17%   -1.12%     
===========================================
  Files          106      109       +3     
  Lines         3502     3562      +60     
  Branches       733      735       +2     
===========================================
+ Hits          3197     3212      +15     
- Misses         289      334      +45     
  Partials        16       16              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from feature/rpc-fixes to develop July 27, 2023 16:35
@thepiwo thepiwo removed their request for review February 22, 2024 07:21
@davidyuk davidyuk merged commit 113f28f into develop Sep 26, 2024
3 of 5 checks passed
@davidyuk davidyuk deleted the feature/refactor-rpc branch September 26, 2024 11:14
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.

Connect using AccountLedger in aepp example
2 participants