Skip to content

Commit

Permalink
More test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dbcfd committed Apr 6, 2023
1 parent 2b12635 commit a25249b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/models/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export class Transaction {
this.chain = chain
this.txHash = txHash
this.blockNumber = blockNumber
this.blockDate = blockDate.toUTCString()
this.blockDate = blockDate.toISOString()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ exports[`ETH service with mock wallet single transaction attempt 1`] = `

exports[`ETH service with mock wallet single transaction attempt 2`] = `
Transaction {
"blockDate": "2000-02-01T00:00:00.000Z",
"blockNumber": 54321,
"chain": "eip155:1337",
"txHash": "0x12345abcde",
Expand Down Expand Up @@ -86,8 +87,8 @@ exports[`setGasPrice EIP1559 transaction 1`] = `
"data": "0x0f017112205d7fcd1a0999befdb062e6762c1f0f902f729b98304a2ef539412f53360d3d6a",
"from": "abcd1234",
"gasLimit": 10n,
"maxFeePerGas": 2000n,
"maxPriorityFeePerGas": 1000n,
"maxFeePerGas": 2310n,
"maxPriorityFeePerGas": 1100n,
"nonce": undefined,
"to": "abcd1234",
}
Expand All @@ -98,8 +99,8 @@ exports[`setGasPrice EIP1559 transaction 2`] = `
"data": "0x0f017112205d7fcd1a0999befdb062e6762c1f0f902f729b98304a2ef539412f53360d3d6a",
"from": "abcd1234",
"gasLimit": 10n,
"maxFeePerGas": 2100n,
"maxPriorityFeePerGas": 1100n,
"maxFeePerGas": 2431n,
"maxPriorityFeePerGas": 1210n,
"nonce": undefined,
"to": "abcd1234",
}
Expand All @@ -110,8 +111,8 @@ exports[`setGasPrice EIP1559 transaction 3`] = `
"data": "0x0f017112205d7fcd1a0999befdb062e6762c1f0f902f729b98304a2ef539412f53360d3d6a",
"from": "abcd1234",
"gasLimit": 10n,
"maxFeePerGas": 2210n,
"maxPriorityFeePerGas": 1210n,
"maxFeePerGas": 2564n,
"maxPriorityFeePerGas": 1331n,
"nonce": undefined,
"to": "abcd1234",
}
Expand Down
6 changes: 2 additions & 4 deletions src/services/blockchain/__tests__/eth-bc-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,14 @@ describe('ETH service with mock wallet', () => {
chainId: '1337',
}
const txReceipt = {
byzantium: true,
status: 1,
blockHash: '0x54321',
blockNumber: 54321,
transactionHash: txnResponse.hash,
hash: txnResponse.hash,
}
const block = {
timestamp: 54321000,
date: new Date(Date.UTC(2000, 1))
}

provider.getGasPrice.mockReturnValue(gasPrice)
provider.estimateGas.mockReturnValue(gasEstimate)
wallet.sendTransaction.mockReturnValue(txnResponse)
Expand Down

0 comments on commit a25249b

Please sign in to comment.