Skip to content

Commit

Permalink
Merge branch '4.x' into junaid/4xsocketprovider6416fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevcs authored Oct 13, 2023
2 parents cde82b9 + e760667 commit 3eb9c99
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ await web3.eth.getFeeHistory('0x1', 'latest', []);

#### sending

- In 1.x, the event listener would receive a `payload` object as an argument. In 4.x, just the sent transaction object is recieved
- In 1.x, the event listener would receive a `payload` object as an argument. In 4.x, just the sent transaction object is received

```typescript
// in 1.x
Expand Down Expand Up @@ -211,7 +211,7 @@ web3.eth.sendTransaction({ ... }).on('sending', (sendTransactionObject) => { ...

#### sent

- In 1.x, the event listener would receive a `payload` object as an argument. In 4.x just the sent transaction object is recieved
- In 1.x, the event listener would receive a `payload` object as an argument. In 4.x just the sent transaction object is received

```typescript
// in 1.x
Expand Down
2 changes: 1 addition & 1 deletion docs/src/theme/SearchBar/algolia.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.algolia-docsearch-suggestion--highlight {
color: #3a33d1;
}
/* Highligted search terms in the main category headers */
/* Highlighted search terms in the main category headers */
.algolia-docsearch-suggestion--category-header
.algolia-docsearch-suggestion--highlight {
background-color: #4d47d5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ along with web3.js. If not, see <http://www.gnu.org/licenses/>.
import Web3 from 'web3';
// eslint-disable-next-line import/no-extraneous-dependencies
import { Web3Account } from 'web3-eth-accounts';
import { EventLog } from 'web3-types';
import { Contract } from '../../../src';
import { ERC721TokenAbi, ERC721TokenBytecode } from '../../shared_fixtures/build/ERC721Token';
import { getSystemTestProvider, createLocalAccount } from '../../fixtures/system_test_utils';
Expand Down Expand Up @@ -80,8 +79,7 @@ describe('contract', () => {
tempAccount.address.toLowerCase(),
);

const logs = await contractDeployed.getPastEvents('Transfer');
const tokenId = (logs[0] as EventLog)?.returnValues?.tokenId as string;
const tokenId = awardReceipt.events?.Transfer.returnValues?.tokenId as string;

expect(
toUpperCaseHex(
Expand Down Expand Up @@ -113,8 +111,7 @@ describe('contract', () => {
tempAccount.address.toLowerCase(),
);

const logs = await contractDeployed.getPastEvents('Transfer');
const tokenId = (logs[0] as EventLog)?.returnValues?.tokenId as string;
const tokenId = awardReceipt.events?.Transfer.returnValues?.tokenId as string;
const transferFromReceipt = await contractDeployed.methods
.transferFrom(tempAccount.address, toAccount.address, tokenId)
.send({
Expand Down Expand Up @@ -186,8 +183,7 @@ describe('contract', () => {
tempAccount.address.toLowerCase(),
);

const logs = await contractDeployed.getPastEvents('Transfer');
const tokenId = (logs[0] as EventLog)?.returnValues?.tokenId as string;
const tokenId = awardReceipt.events?.Transfer.returnValues?.tokenId as string;

const approveReceipt = await contractDeployed.methods
.approve(toAccount.address, tokenId)
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth/test/e2e/e2e_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { getSystemTestBackend } from '../fixtures/system_test_utils';
import secrets from '../../../../.secrets.json';

export const getSystemE2ETestProvider = (): string => {
if (process.env.WEB3_SYTEM_TEST_MODE === 'http') {
if (process.env.WEB3_SYSTEM_TEST_MODE === 'http') {
return getSystemTestBackend() === 'sepolia'
? process.env.INFURA_SEPOLIA_HTTP ?? secrets.SEPOLIA.HTTP
: process.env.INFURA_MAINNET_HTTP ?? secrets.MAINNET.HTTP;
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/test/e2e/e2e_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { getSystemTestBackend } from '../shared_fixtures/system_tests_utils';
import secrets from '../../../../.secrets.json';

export const getSystemE2ETestProvider = (): string => {
if (process.env.WEB3_SYTEM_TEST_MODE === 'http') {
if (process.env.WEB3_SYSTEM_TEST_MODE === 'http') {
return getSystemTestBackend() === 'sepolia'
? process.env.INFURA_SEPOLIA_HTTP ?? secrets.SEPOLIA.HTTP
: process.env.INFURA_MAINNET_HTTP ?? secrets.MAINNET.HTTP;
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fi
echo "Node software used for tests: " $BACKEND
echo "Node running on: " "$MODE://127.0.0.1:$WEB3_SYSTEM_TEST_PORT"

export WEB3_SYTEM_TEST_MODE=$MODE
export WEB3_SYSTEM_TEST_MODE=$MODE
export WEB3_SYSTEM_TEST_PROVIDER="$MODE://127.0.0.1:$WEB3_SYSTEM_TEST_PORT"
export WEB3_SYSTEM_TEST_BACKEND=$BACKEND
export WEB3_SYSTEM_TEST_ENGINE=$ENGINE
Expand Down

0 comments on commit 3eb9c99

Please sign in to comment.