Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
vitvakatu committed Nov 2, 2023
1 parent 77f0d72 commit e93e847
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions app/gui2/shared/languageServer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Client } from '@open-rpc/client-js'
import { sha3_224 } from '@noble/hashes/sha3'
import { sha3_224 as SHA3 } from '@noble/hashes/sha3'
import { bytesToHex } from '@noble/hashes/utils'
import { Client } from '@open-rpc/client-js'
import { ObservableV2 } from 'lib0/observable'
import { uuidv4 } from 'lib0/random'
import { z } from 'zod'
Expand Down Expand Up @@ -384,5 +384,5 @@ export class LanguageServer extends ObservableV2<Notifications> {
}

export function computeTextChecksum(text: string): Checksum {
return bytesToHex(sha3_224.create().update(text).digest()) as Checksum
return bytesToHex(SHA3.create().update(text).digest()) as Checksum
}
8 changes: 3 additions & 5 deletions app/gui2/src/components/GraphEditor/upload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sha3_224, Keccak } from '@noble/hashes/sha3'
import { Keccak, sha3_224 as SHA3 } from '@noble/hashes/sha3'
import type { Hash } from '@noble/hashes/utils'
import { bytesToHex } from '@noble/hashes/utils'
import type { DataServer } from 'shared/dataServer'
Expand All @@ -22,7 +22,7 @@ export class Uploader {
this.binary = binary
this.file = file
this.projectRootId = projectRootId
this.checksum = sha3_224.create()
this.checksum = SHA3.create()
this.uploadedBytes = BigInt(0)
}

Expand Down Expand Up @@ -69,9 +69,7 @@ export class Uploader {
const hexChecksum = bytesToHex(this.checksum.digest())
if (hexChecksum != engineChecksum.checksum) {
throw new Error(
`Uploading file failed, checksum does not match. ${hexChecksum} != ${
engineChecksum.checksum
}`,
`Uploading file failed, checksum does not match. ${hexChecksum} != ${engineChecksum.checksum}`,
)
}
}
Expand Down

0 comments on commit e93e847

Please sign in to comment.