File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
Runtime/CareBoo.AlgoSdk.WalletConnect
Tests/Runtime/CareBoo.AlgoSdk.WalletConnect.Tests Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11using System ;
22using UnityEngine ;
3+ using UnityEngine . Networking ;
34
45namespace AlgoSdk . WalletConnect
56{
@@ -91,6 +92,7 @@ public string FormatUrlForDeepLink(string url)
9192
9293 public string FormatUrlForDeepLinkIos ( string url )
9394 {
95+ url = UnityWebRequest . EscapeURL ( url ) ;
9496 if ( ! string . IsNullOrEmpty ( Mobile . Universal ) )
9597 {
9698 return $ "{ Mobile . Universal } /wc?uri={ url } ";
Original file line number Diff line number Diff line change @@ -24,11 +24,8 @@ public HandshakeUrl(
2424 Hex key
2525 )
2626 {
27- var escapedBridgeUrl = UnityWebRequest . EscapeURL ( bridgeUrl )
28- . Replace ( "%2f" , "%2F" )
29- . Replace ( "%3a" , "%3A" )
30- ;
31- url = $ "wc:{ topic } @{ version } ?bridge={ escapedBridgeUrl } &key={ key . ToString ( ) . ToLower ( ) } &algorand=true";
27+ var escapedBridgeUrl = UnityWebRequest . EscapeURL ( bridgeUrl ) ;
28+ url = $ "wc:{ topic } @{ version } ?bridge={ escapedBridgeUrl } &key={ key } &algorand=true";
3229 }
3330
3431 public Texture2D ToQrCodeTexture ( )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public class AppEntryTest
99 [ Test ]
1010 public void PeraWalletAppUrlShouldBeCorrect ( )
1111 {
12- var expected = "algorand-wc://wc?uri=wc:4015f93f -b88d-48fc-8bfe-8b063cc325b6@1?bridge=https%3A%2F%2F9 .bridge.walletconnect.org&key=b0576e0880e17f8400bfff92d4caaf2158cccc0f493dcf455ba76d448c9b5655&algorand=true " ;
12+ var expected = "algorand-wc://wc?uri=wc%3A4015f93f -b88d-48fc-8bfe-8b063cc325b6%401%3Fbridge%3Dhttps%253A%252F%252F9 .bridge.walletconnect.org%26key%3Db0576e0880e17f8400bfff92d4caaf2158cccc0f493dcf455ba76d448c9b5655%26algorand%3Dtrue " ;
1313 var handshake = new HandshakeUrl (
1414 "4015f93f-b88d-48fc-8bfe-8b063cc325b6" ,
1515 "1" ,
@@ -18,6 +18,6 @@ public void PeraWalletAppUrlShouldBeCorrect()
1818 ) ;
1919 var app = WalletRegistry . PeraWallet ;
2020 var actual = app . FormatUrlForDeepLinkIos ( handshake . Url ) ;
21- Assert . AreEqual ( expected , actual ) ;
21+ StringAssert . AreEqualIgnoringCase ( expected , actual ) ;
2222 }
2323}
You can’t perform that action at this time.
0 commit comments