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

[BRO-39] Migrate away from injecting API (package) #476

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ivan-Mahda
Copy link
Contributor

Example of walletApi usage as a separate package

Changes in this example:

  • Removed inject.js as proof of no side effects

  • Added webpack.config for wallet-api package
    In general this is main part of example
    This creates a fairly large build.
    Because it depends on api-helpers and message-hub

  • Updated examples with usages
    With such an implementation, further migration to the new walletApi is quite simple
    Just by removing asynchronous call of detectConcordiumProvider()

Old:
detectConcordiumProvider().then((provider) => provider.connect())

New:
walletApi.connect()

  • Among the current identified shortcomings.
    concordiumWalletApi.min.js does not contain part of functions from @concordium/web-sdk which leads to errors, example in two-step-transfer

Example of walletApi usage as a separate package

- Removed inject.js as proof of no side effects
- Added webpack.config for package
- Updated examples with usages
@Ivan-Mahda Ivan-Mahda requested review from limemloh and DOBEN June 20, 2024 09:11
@DOBEN DOBEN removed their request for review December 7, 2024 14:28
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.

1 participant