WalletConnectKotlinV2 icon indicating copy to clipboard operation
WalletConnectKotlinV2 copied to clipboard

NPE when trying to validate WC URI

Open kamilReady opened this issue 3 years ago • 3 comments

Describe the bug A NPE occurs when trying to validate specific WC URI

SDK Version

  • Client: Android BOM
  • Version 1.3.0

To Reproduce Steps to reproduce the behavior:

  1. Try to validate wc:7f6e504bfad60b485450578e05678ed3e8e8c4751d3c6160be17160d63ec90f9 URI
  2. Await result

Expected behavior It's shown as invalid URI instead NPE happens

Additional context Uri#userInfo and Uri#query can be null but in the SDK are treated as non-null.

pairUri.userInfo must not be null
java.lang.NullPointerException: pairUri.userInfo must not be null
	at com.walletconnect.android.internal.Validator.validateWCUri$sdk_debug(Validator.kt:30)
	at com.walletconnect.android.internal.ValidatorTest.validate WC uri test optional data fields(ValidatorTest.kt:66)

kamilReady avatar Jan 06 '23 09:01 kamilReady

Hello, I am Morteza Mirsali, the godfather of BTC, we invest in crypto, gold stocks, new ideas and technology.

MORTEZAMIRsa avatar Jan 22 '25 12:01 MORTEZAMIRsa

Hello, I am Morteza Mirsali, the godfather of BTC, we invest in crypto, gold stocks, new ideas and technology.

MORTEZAMIRsa avatar Jan 22 '25 12:01 MORTEZAMIRsa

Hello, I am Morteza Mirsali, the godfather of BTC, we invest in crypto, gold stocks, new ideas and technology.

MORTEZAMIRsa avatar Jan 22 '25 12:01 MORTEZAMIRsa