Skip to content

Commit 3741ad7

Browse files
authored
fix: update example to deal with export changes (#518)
1 parent 81f8aa4 commit 3741ad7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

utils/example-storage-e2e.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020

2121
import { ethers } from 'ethers'
2222
import fsPromises from 'fs/promises'
23+
import { SIZE_CONSTANTS, Synapse, TIME_CONSTANTS } from '../packages/synapse-sdk/src/index.ts'
2324
import {
2425
ADD_PIECES_TYPEHASH,
2526
CREATE_DATA_SET_TYPEHASH,
2627
PDP_PERMISSION_NAMES,
27-
SIZE_CONSTANTS,
28-
Synapse,
29-
TIME_CONSTANTS,
30-
} from '../packages/synapse-sdk/src/index.ts'
28+
} from '../packages/synapse-sdk/src/session/index.ts'
3129

3230
// Configuration from environment
3331
const PRIVATE_KEY = process.env.PRIVATE_KEY
@@ -82,10 +80,10 @@ async function main() {
8280
if (!stat.isFile()) {
8381
throw new Error(`Path is not a file: ${filePath}`)
8482
}
85-
if (stat.size > SIZE_CONSTANTS.MAX_FILE_SIZE_BYTES) {
83+
if (stat.size > SIZE_CONSTANTS.MAX_UPLOAD_SIZE) {
8684
throw new Error(
8785
`File exceeds maximum size of ${formatBytes(
88-
SIZE_CONSTANTS.MAX_FILE_SIZE_BYTES
86+
SIZE_CONSTANTS.MAX_UPLOAD_SIZE
8987
)}: ${filePath} (${formatBytes(stat.size)})`
9088
)
9189
}

0 commit comments

Comments
 (0)