fix: deeplink url format#111
Merged
quetool merged 3 commits intoWalletConnect:masterfrom Apr 19, 2024
Merged
Conversation
Contributor
|
Hello @MuckT! Thanks for bringing this to my attention and I apologize for any inconvenience this may have caused! Indeed I was making some changes on core_utils lately in regards of this. However the fix should be done on @override
String createSafeUrl(String url) {
if (url.isEmpty) return url;
String safeUrl = url;
if (!safeUrl.contains('://')) {
safeUrl = url.replaceAll('/', '').replaceAll(':', '');
safeUrl = '$safeUrl://';
} else {
final parts = safeUrl.split('://');
if (parts.last.isNotEmpty && parts.last != 'wc') {
if (!safeUrl.endsWith('/')) {
return '$safeUrl/';
}
return safeUrl;
} else {
safeUrl = url.replaceFirst('://wc', '://');
}
}
return safeUrl;
}If you are willing to change your code into this one I will totally merge it and deploy it in following version. |
Contributor
Author
|
quetool
approved these changes
Apr 19, 2024
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.




Description
We've received several reports of users unable to link to Valora using Web3ModalFlutter in our discord.
After investigation it appears the URL format is missing an
/character and parsing incorrectly. This should fix that integration and match the deeplinks created by other WalletConnect Web3Modal implementations.Before:
celo://walletwc?uri=wc...After:
celo://wallet/wc?uri=wc...