Skip to content

Commit

Permalink
Fix a balance check for block
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Lemaire committed Apr 15, 2021
1 parent 1076564 commit 064e5bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fun getVerifiedBalanceForBlock(block: TrustChainBlock, database: TrustChainStore

fun getBalanceForBlock(block: TrustChainBlock, database: TrustChainStore): Long? {
if (TransactionRepository.EUROTOKEN_TYPES.contains(block.type)) {
if (block.isProposal)
if (block.isProposal && block.transaction[TransactionRepository.KEY_BALANCE] != null)
return (block.transaction[TransactionRepository.KEY_BALANCE] as Long)
if (block.isGenesis)
return getBalanceChangeForBlock(block)
Expand Down

0 comments on commit 064e5bb

Please sign in to comment.