Skip to content

Commit

Permalink
refactor: revert whitespaces changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbrugneaux committed Sep 11, 2024
1 parent a9358c4 commit 90d9102
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
7 changes: 3 additions & 4 deletions packages/web3-core/src/web3_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,10 @@ export abstract class Web3Config
for (const key of keys) {
this._triggerConfigChange(key, options[key]);

if (
!isNullish(options[key]) &&
if(!isNullish(options[key]) &&
typeof options[key] === 'number' &&
key === 'maxListenersWarningThreshold'
) {
key === 'maxListenersWarningThreshold' )
{
// additionally set in event emitter
this.setMaxListenerWarningThreshold(Number(options[key]));
}
Expand Down
6 changes: 3 additions & 3 deletions packages/web3-core/src/web3_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class Web3Context<
registeredSubscriptions,
accountProvider,
wallet,
requestManagerMiddleware,
requestManagerMiddleware
} = providerOrContext as Web3ContextInitOptions<API, RegisteredSubs>;

this.setConfig(config ?? {});
Expand Down Expand Up @@ -372,10 +372,10 @@ export class Web3Context<
return true;
}

public setRequestManagerMiddleware(requestManagerMiddleware: RequestManagerMiddleware<API>) {
public setRequestManagerMiddleware(requestManagerMiddleware: RequestManagerMiddleware<API>){
this.requestManager.setMiddleware(requestManagerMiddleware);
}

/**
* Will return the {@link Web3BatchRequest} constructor.
*/
Expand Down
16 changes: 6 additions & 10 deletions packages/web3-eth/src/rpc_method_wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export async function getBlock<ReturnFormat extends DataFormat>(
}
return result;
}

return res;
}

Expand Down Expand Up @@ -511,22 +511,18 @@ export async function getTransactionReceipt<ReturnFormat extends DataFormat>(
);
let response;
try {
response = await ethRpcMethods.getTransactionReceipt(
response = await ethRpcMethods.getTransactionReceipt(
web3Context.requestManager,
transactionHashFormatted,
);
} catch (error) {
// geth indexing error, we poll until transactions stopped indexing
if (
typeof error === 'object' &&
!isNullish(error) &&
'message' in error &&
(error as { message: string }).message === 'transaction indexing is in progress'
) {
console.warn('Transaction indexing is in progress.');
if (typeof error === 'object' && !isNullish(error) && 'message' in error && (error as { message: string }).message === 'transaction indexing is in progress') {
console.warn('Transaction indexing is in progress.')
} else {
throw error;
}

}
return isNullish(response)
? response
Expand Down Expand Up @@ -593,7 +589,7 @@ export function sendTransaction<
});

let transaction = {...transactionObj};

if(!isNullish(transactionMiddleware)){
transaction = await transactionMiddleware.processTransaction(transaction);
}
Expand Down

0 comments on commit 90d9102

Please sign in to comment.