test(wallet-sdk): init sdk unit tests#2015
Open
mateuszpiatkowski-da wants to merge 17 commits into
Open
Conversation
Signed-off-by: Mateusz Piątkowski <mateusz.piatkowski@digitalasset.com>
Signed-off-by: Marc Juchli <marc.juchli@digitalasset.com>
Signed-off-by: Fayi Femi-Balogun <fayimora.femibalogun@digitalasset.com>
* keys namespace tst Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * fix test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * fix Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> --------- Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com>
Signed-off-by: Fayi Femi-Balogun <fayimora.femibalogun@digitalasset.com>
* feat: display list of suggested wallet extensions Signed-off-by: Alex Matson <alex.matson@digitalasset.com> * address pr comments Signed-off-by: Alex Matson <alex.matson@digitalasset.com> --------- Signed-off-by: Alex Matson <alex.matson@digitalasset.com>
* asset namespace test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> --------- Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com>
Signed-off-by: Alex Matson <alex.matson@digitalasset.com>
* test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * logging unit tests Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * url test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * ping test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * utils test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> * test Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com> --------- Signed-off-by: rukmini-basu-da <rukmini.basu@digitalasset.com>
CIP-103 requires wallets to deliver txChanged / accountsChanged / statusChanged / connected through provider.on(event, listener). On the sync (postMessage) path no wire shape a wallet posts results in delivery: WindowTransport only installs per-request response listeners, so wallet-pushed events are silently dropped (#1815). dApps on the extension flow sign transactions that land on the ledger but never see the lifecycle events. The event envelope is the JSON-RPC 2.0 notification (spec section 4.1): the existing SPLICE_WALLET_REQUEST frame with no id, method = event name. Reusing the existing wire vocabulary means no new message type and no SpliceMessage union change. - core/rpc-transport: WindowTransport.onNotification installs a single always-on window listener that demuxes id-less SPLICE_WALLET_REQUEST frames. Requests submitted by the transport always carry a uuid id, so the dApp's own outbound frames stay out of the event path. Delivery honors the transport's target routing key (the announced provider's key from requestAnnouncedProviders), so multi-wallet pages do not cross-deliver events. The DOM listener is dropped with the last unsubscribe. - core/provider-dapp: DappSyncProvider bridges transport notifications to AbstractProvider.emit in its constructor. - Tests: envelope semantics (canonical notification delivered, non-canonical frames ignored) and announced-provider demux (targeted delivery, cross-wallet isolation, no echo of id-carrying requests). Signed-off-by: Allen <allen@send.it>
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.27.3 to 0.28.1. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](evanw/esbuild@v0.27.3...v0.28.1) Signed-off-by: Mateusz Piątkowski <mateusz.piatkowski@digitalasset.com> --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.28.1 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: 燕资伟 <> Signed-off-by: Mateusz Piątkowski <mateusz.piatkowski@digitalasset.com>
Signed-off-by: Mateusz Piątkowski <mateusz.piatkowski@digitalasset.com>
Signed-off-by: Mateusz Piątkowski <mateusz.piatkowski@digitalasset.com>
Signed-off-by: Mateusz Piątkowski <mateusz.piatkowski@digitalasset.com>
Signed-off-by: Mateusz Piątkowski <mateusz.piatkowski@digitalasset.com>
Contributor
Author
|
Can be ready for review once #1994 is merged |
Signed-off-by: Mateusz Piątkowski <mateusz.piatkowski@digitalasset.com>
| const registeredPlugin = SDKWithPlugin[pluginName] | ||
|
|
||
| expect(registeredPlugin).toBeDefined() | ||
| expect(registeredPlugin.testMethod()).toBe(true) |
Contributor
There was a problem hiding this comment.
is it possible to do sdk[pluginName].testMethod() (on the original sdk object) directly? would be nice to test that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1981