Error
Anyone know why this is happening? im a bit lost here.
"System.NullReferenceException: 'The object reference is not set to an instance of an object.'"
https://gyazo.com/53783b0f627a112e1ab2e852926826af
Gyazo
Gyazo
28 Replies
addressInfo
or ChainStats
is null
So it appears that there's something wrong with the JSON deserialization
Can you show the structure of AddressInfo
?
And what does the JSON string look like?wdym json string look like?
You are deserializing a string. It's value is in the format of json . Copy the value of the string you are deserializing
And paste it here
the json should look like that in json variable
The value of the
json
variable at line 87 to be specificuhm
weird shit
i didnt touch anything in the code, but it works now
how
tf
why it just work out of thin air
Connection issue?
all i added since then was a "with balance capture" put into my if(balance > 0)
withBal++.ToString();
don't do a ++ and another operation ( ToString) at same time
it's a really make it super harder to read
Could be that, since you're calling an external API, that the API just happened to return null or unauthorized or something at that point
thats always how i capture int values, how would you be doing it?
so an error from the API and not my code
perhaps
you want to have the string before or after adding +1 to your variable ?
You should probably do a null check after the
AddressInfo addressInfo = ...
line.I just say do that instead of one line it
it's much easier to read
Less lines != Good code
btw
you could use directly this method to deserialize instead of
getting string, then read it, then deserialize it
https://learn.microsoft.com/en-us/dotnet/api/system.net.http.json.httpclientjsonextensions.getfromjsonasync?view=net-7.0
well, shits fixed now. Now i just have to add proxy support so i wont get timeout
What are you making?
tbh project is useless, but a good practise thing
its just gens a mnemonic and checks for the balance through an API
eh, ok lol
but the chance of actually finding a lost crypto wallet with it is 0.00000000000000000000000000000000000000684%
So what does it actually achieve?
My practise skills with web requests only tbh
nothing else
practise using loops
!ban @Degenerate developing hacking tools