This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
wallet-connectors: WalletConnect: Use "lower" camelCase format for transaction type #42
Merged
Conversation
This file contains 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
…ansaction type This apparently is the standard style used for these strings. We have to bypass TypeScript type checking in order to convert the `AccountTransactionType` enum to `TransactionKindString` (which is assumed to use the canonical naming) as it cannot infer that the two enums use the same keys (I suppose we should add a test in @concordium/common-sdk to ensure that it stays that way). This doesn't change anything in the Android wallet as it doesn't read the field but just assumes that it's an `update` transaction. The iOS implementation reads the field and will support both formats for backwards compatibility with projects using old versions of @concordium/wallet-connectors. The Android implementation must do the same when it starts supporting other transaction types.
SDK fix: Concordium/concordium-node-sdk-js#220. Will use this instead once released. |
This required setting a resolution for overruling the SDK version dependended on by the BW API.
bisgardo
commented
Aug 1, 2023
Done. |
Ping @shjortConcordium @orhoj. |
shjortConcordium
approved these changes
Aug 7, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This apparently is the standard style used for these strings. This is achieved by using the new function
getTransactionKindString
in@concordium/common-sdk@9.0.0
. We use a yarn resolution to override the version specified by@concordium/browser-wallet-api-helpers
(Concordium/concordium-browser-wallet#324 suggests reducing this dependency to a "peer dependency").This doesn't change anything in the Android wallet as it doesn't read the field but just assumes that it's an
update
transaction. The iOS implementation reads the field and supports both formats for backwards compatibility with projects using old versions of@concordium/wallet-connectors
. The Android implementation must do the same when it starts supporting other transaction types.Resolves CBW-1145.