Skip to content

Commit

Permalink
Check null values in asset array
Browse files Browse the repository at this point in the history
  • Loading branch information
simoarpe committed Dec 19, 2024
1 parent 130d286 commit 9496599
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ public static void fetchPrices(
new ArrayList<AsyncUtils.GetPriceResponseContext>();

for (BlockchainToken asset : assets) {
String assetSymbolLower = asset.symbol.toLowerCase(Locale.getDefault());
if (asset == null || asset.symbol == null) {
continue;
}
String assetSymbolLower = asset.symbol.toLowerCase(Locale.ENGLISH);
String[] fromAssets = new String[] {assetSymbolLower};
String[] toAssets = new String[] {"usd"};

Expand Down

0 comments on commit 9496599

Please sign in to comment.