Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 3e61d3c

Browse files
committed
custom fix
1 parent e9878f9 commit 3e61d3c

File tree

5 files changed

+2
-12
lines changed

5 files changed

+2
-12
lines changed

packages/web3-utils/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
},
6565
"dependencies": {
6666
"ethereum-cryptography": "^2.0.0",
67-
"nopp": "^1.0.2",
6867
"web3-errors": "^1.1.4",
6968
"web3-types": "^1.4.0",
7069
"web3-validator": "^2.0.4"

packages/web3-utils/src/formatter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ export const convert = (
268268
dataPath.pop();
269269
}
270270

271-
return object;
271+
return object.freeze ? Object.freeze(object) : object;
272272
};
273273

274274
export const format = <

packages/web3-utils/src/index.ts

-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ GNU Lesser General Public License for more details.
1414
You should have received a copy of the GNU Lesser General Public License
1515
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
1616
*/
17-
1817
export * from './converters.js';
1918
export * from './event_emitter.js';
2019
export * from './validation.js';
@@ -34,6 +33,3 @@ export * from './socket_provider.js';
3433
export * from './uint8array.js';
3534
// for backwards compatibility with v1
3635
export { AbiItem } from 'web3-types';
37-
38-
// eslint-disable-next-line import/first
39-
import 'nopp';

packages/web3-utils/src/objects.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ export const mergeDeep = (
6060
}
6161
}
6262
}
63-
return result;
63+
return result.freeze ? Object.freeze(result) : result;
6464
};

yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -9351,11 +9351,6 @@ node-releases@^2.0.6:
93519351
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503"
93529352
integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==
93539353

9354-
nopp@^1.0.2:
9355-
version "1.0.2"
9356-
resolved "https://registry.yarnpkg.com/nopp/-/nopp-1.0.2.tgz#f6b9210cb3f65d3a3305010c426cd034f34cfc5c"
9357-
integrity sha512-TdRw4c1eGp7PZovnit8K63ZwoOT1SoN0fK5+f3FGzVRPERcENowf/K4Vktgd36/Y1Vqg8ATXFEDTRvOaeRB6FA==
9358-
93599354
nopt@^5.0.0:
93609355
version "5.0.0"
93619356
resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88"

0 commit comments

Comments
 (0)