Skip to content

Commit

Permalink
fix(core-transaction-pool): copy vote target into temp wallet manager
Browse files Browse the repository at this point in the history
  • Loading branch information
spkjp committed Jun 7, 2019
1 parent f9414f0 commit 1209a36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core-transaction-pool/src/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,14 @@ export class Connection implements TransactionPool.IConnection {
localWalletManager.reindex(sender);
}

// HACK: need tx agonistic way for wallets which are modified by transaction
if (transaction.type === Enums.TransactionTypes.Vote) {
const vote = transaction.data.asset.votes[0].slice(1);
if (!localWalletManager.hasByPublicKey(vote)) {
localWalletManager.reindex(clonedeep(databaseWalletManager.findByPublicKey(vote)));
}
}

if (recipientId) {
if (localWalletManager.hasByAddress(recipientId)) {
recipient = localWalletManager.findByAddress(recipientId);
Expand Down

0 comments on commit 1209a36

Please sign in to comment.