Skip to content

Commit

Permalink
Merge pull request #103 from OriginTrail/fix/linter-errors
Browse files Browse the repository at this point in the history
Resolved linter errors
  • Loading branch information
u-hubar authored Sep 7, 2023
2 parents 0632717 + 68ed407 commit 1707c92
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ module.exports = {
},
},
],
ignorePatterns: ['/dist/*'],
ignorePatterns: ['/dist/*', '/examples/*'],
};
5 changes: 2 additions & 3 deletions managers/asset-operations-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const {
DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY,
PRIVATE_ASSERTION_PREDICATE,
QUERY_TYPES,
DEFAULT_PARAMETERS,
OT_NODE_TRIPLE_STORE_REPOSITORIES,
} = require('../constants.js');
const emptyHooks = require('../util/empty-hooks');
Expand Down Expand Up @@ -363,8 +362,8 @@ class AssetOperationsManager {

const { tokenId } = resolveUAL(UAL);

let publicAssertionId,
stateFinalized = false;
let publicAssertionId;
let stateFinalized = false;
if (state === ASSET_STATES.LATEST) {
const unfinalizedState = await this.blockchainService.getUnfinalizedState(
tokenId,
Expand Down
5 changes: 2 additions & 3 deletions services/blockchain-service/blockchain-service-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ class BlockchainServiceBase {
return {};
}

async decodeEventLogs(receipt, eventName, blockchain) {
async decodeEventLogs() {
// overridden by subclasses
return;
}

async getPublicKey() {
// overridden by subclasses
return;
}

async getNetworkGasPrice(blockchain) {
Expand All @@ -55,6 +53,7 @@ class BlockchainServiceBase {
try {
return await web3Instance.eth.getGasPrice();
} catch (error) {
// eslint-disable-next-line no-console
console.warn(`Failed to fetch the gas price from the network: ${error}. Using default value: 100 Gwei.`);
return Web3.utils.toWei('100', 'Gwei');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ class BrowserBlockchainService extends BlockchainServiceBase {
this.config = config;
}

async initializeWeb3(blockchainName, blockchainRpc, blockchainOptions) {
async initializeWeb3(blockchainName, blockchainRpc) {
if (typeof window.web3 === 'undefined' || !window.web3) {
// eslint-disable-next-line no-console
console.error(
'No web3 implementation injected, please inject your own Web3 implementation.',
);
Expand All @@ -21,6 +22,7 @@ class BrowserBlockchainService extends BlockchainServiceBase {
// Request account access if needed
await window.ethereum.enable();
} catch (error) {
// eslint-disable-next-line no-console
console.error(error);
}
} else if (blockchainRpc.startsWith('ws')) {
Expand Down Expand Up @@ -69,6 +71,7 @@ class BrowserBlockchainService extends BlockchainServiceBase {
.request({
method: 'eth_requestAccounts',
})
// eslint-disable-next-line no-console
.catch(() => console.error('There was an error fetching your accounts'));

[this.account] = accounts;
Expand Down

0 comments on commit 1707c92

Please sign in to comment.