Skip to content

Commit

Permalink
Check for balance > 0 in NftKit.nftBalance() method
Browse files Browse the repository at this point in the history
  • Loading branch information
omurovch committed Sep 29, 2022
1 parent f42d6a0 commit 5e011db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface NftBalanceDao {
@Query("SELECT * FROM NftBalanceRecord WHERE synced = 0")
fun nonSyncedNftBalances(): List<NftBalance>

@Query("SELECT * FROM NftBalanceRecord WHERE contractAddress = :contractAddress AND tokenId = :tokenId")
@Query("SELECT * FROM NftBalanceRecord WHERE contractAddress = :contractAddress AND tokenId = :tokenId AND balance > 0")
fun existingNftBalance(contractAddress: Address, tokenId: BigInteger): NftBalance?

@Query("UPDATE NftBalanceRecord SET synced = 1, balance = :balance WHERE contractAddress = :contractAddress AND tokenId = :tokenId")
Expand Down

0 comments on commit 5e011db

Please sign in to comment.