diff --git a/packages/core-blockchain/src/state-storage.ts b/packages/core-blockchain/src/state-storage.ts index 7a8d3a83f2..d218c511f4 100644 --- a/packages/core-blockchain/src/state-storage.ts +++ b/packages/core-blockchain/src/state-storage.ts @@ -20,7 +20,7 @@ let _cachedTransactionIds: immutable.OrderedSet = immutable.OrderedSet() // Map Block instances to block data. const _mapToBlockData = (blocks: immutable.Seq): immutable.Seq => - blocks.map(block => ({ ...block.data, transactions: block.transactions })); + blocks.map(block => ({ ...block.data, transactions: block.transactions.map(tx => tx.data) })); /** * Represents an in-memory storage for state machine data. diff --git a/packages/core-transaction-pool/__tests__/connection.test.ts b/packages/core-transaction-pool/__tests__/connection.test.ts index 91a73be038..80760e2f74 100644 --- a/packages/core-transaction-pool/__tests__/connection.test.ts +++ b/packages/core-transaction-pool/__tests__/connection.test.ts @@ -161,9 +161,10 @@ describe("Connection", () => { it("should not add not-appliable transactions", () => { // This should be skipped due to insufficient funds const highFeeTransaction = new Transaction(mockData.dummy3); - highFeeTransaction.fee = bignumify(1e9 * SATOSHI); + highFeeTransaction.data.fee = bignumify(1e9 * SATOSHI); // changing public key as fixture transactions have the same one - highFeeTransaction.senderPublicKey = "000000000000000000000000000000000000000420000000000000000000000000"; + highFeeTransaction.data.senderPublicKey = + "000000000000000000000000000000000000000420000000000000000000000000"; const transactions = [ mockData.dummy1, diff --git a/packages/core-transaction-pool/src/connection.ts b/packages/core-transaction-pool/src/connection.ts index 01766d8475..d1ea421a6b 100644 --- a/packages/core-transaction-pool/src/connection.ts +++ b/packages/core-transaction-pool/src/connection.ts @@ -181,7 +181,7 @@ export class TransactionPool implements transactionPool.ITransactionPool { const senderWallet = this.walletManager.findByPublicKey(transaction.senderPublicKey); const errors = []; - if (this.walletManager.canApply(transaction, errors)) { + if (this.walletManager.canApply(transaction.data, errors)) { senderWallet.applyTransactionToSender(transaction); } else { // Remove tx again from the pool