Skip to content

Commit

Permalink
Changed sha256 library from @ethersproject/sha2 to js-sha256 for …
Browse files Browse the repository at this point in the history
…web workers
  • Loading branch information
marcvelmer committed Dec 11, 2023
1 parent 50fb8a4 commit 1a21487
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Changed sha256 library from `@ethersproject/sha2` to `js-sha256` for web workers.

## [0.6.1] - 2023-11-29

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/keccak256": "^5.7.0",
"@ethersproject/providers": "^5.7.1",
"@ethersproject/sha2": "^5.7.0",
"@ethersproject/signing-key": "^5.7.0",
"@ethersproject/strings": "^5.7.0",
"@ethersproject/units": "^5.7.0",
Expand All @@ -135,6 +134,7 @@
"axios": "0.27.2",
"blake2b": "^2.1.4",
"iso-language-codes": "^1.1.0",
"js-sha256": "^0.10.1",
"readable-stream": "^4.4.2",
"tiny-invariant": "^1.3.1",
"tweetnacl": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/services/anonymous.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Service, ServiceProperties } from './service';
import { ChainAPI } from '../api';
import invariant from 'tiny-invariant';
import { ensure0x, strip0x } from '../util/common';
import { sha256 } from '@ethersproject/sha2';
import { sha256 } from 'js-sha256';
import { groth16 } from 'snarkjs';
import { hexlify } from '@ethersproject/bytes';
import { toUtf8Bytes } from '@ethersproject/strings';
Expand Down
2 changes: 1 addition & 1 deletion test/services/anonymous.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AnonymousService, ChainCircuits } from '../../src';
// @ts-ignore
import { URL } from './util/client.params';
import { sha256 } from '@ethersproject/sha2';
import { sha256 } from 'js-sha256';

describe('Anonymous Service tests', () => {
it('should have the correct type and properties', () => {
Expand Down

0 comments on commit 1a21487

Please sign in to comment.