use of com.hedera.mirror.common.domain.token.TokenAccountKey in project hedera-mirror-node by hashgraph.
the class SqlEntityListener method onTokenAccount.
@Override
public void onTokenAccount(TokenAccount tokenAccount) throws ImporterException {
if (tokenAccounts.containsKey(tokenAccount.getId())) {
log.warn("Skipping duplicate token account association: {}", tokenAccount);
return;
}
var key = new TokenAccountKey(tokenAccount.getId().getTokenId(), tokenAccount.getId().getAccountId());
TokenAccount merged = tokenAccountState.merge(key, tokenAccount, this::mergeTokenAccount);
tokenAccounts.put(merged.getId(), merged);
}
Aggregations