Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
mikozet committed Dec 13, 2024
1 parent f63eba6 commit 0a98ede
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 31 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
testPathIgnorePatterns: ['/node_modules/', '/config/'],

// Require .env file and additional setup
setupFiles: ['dotenv/config', '<rootDir>/jest.setup.js'],
setupFiles: ['dotenv/config'],

// Resolve modules same as Webpack
moduleNameMapper: {
Expand Down
23 changes: 0 additions & 23 deletions jest.setup.js

This file was deleted.

7 changes: 1 addition & 6 deletions src/services/core.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
require('dotenv').config();
import CirclesCore from '@circles/core';

import { getAccount } from '~/services/wallet';
import web3 from '~/services/web3';
import { PATHFINDER_HOPS_DEFAULT } from '~/utils/constants';

if (!process.env.HUB_ADDRESS || typeof process.env.HUB_ADDRESS !== 'string') {
throw new Error('HUB_ADDRESS is not set or not a string');
}

const core = new CirclesCore(web3, {
apiServiceEndpoint: process.env.API_SERVICE_EXTERNAL,
fallbackHandlerAddress: process.env.SAFE_DEFAULT_CALLBACK_HANDLER,
graphNodeEndpoint: process.env.GRAPH_NODE_EXTERNAL,
hubAddress: String(process.env.HUB_ADDRESS),
hubAddress: process.env.HUB_ADDRESS,
pathfinderServiceEndpoint: process.env.PATHFINDER_SERVICE_ENDPOINT,
pathfinderType: process.env.PATHFINDER_TYPE,
proxyFactoryAddress: process.env.PROXY_FACTORY_ADDRESS,
Expand Down
1 change: 0 additions & 1 deletion webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import HtmlWebpackPlugin from 'html-webpack-plugin';
import TerserPlugin from 'terser-webpack-plugin';
import webpack from 'webpack';

// Load environment variables
dotenv.config();

const PAGE_TITLE = 'Circles UBI | Wallet';
Expand Down

0 comments on commit 0a98ede

Please sign in to comment.