Skip to content

Commit 9e7bc9e

Browse files
committed
fix tests
1 parent 74f1d49 commit 9e7bc9e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

sdk/e2e/page/msp.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ <h3>Errors</h3>
344344
await client.auth.getProfile();
345345
const owner = '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266';
346346
const bucketId = '0x34eb5f637e05fc18f857ccb013250076534192189894d174ee3aa6d3525f6970';
347-
const adolphusFingerprint = client.files.hexToBytes('0x34eb5f637e05fc18f857ccb013250076534192189894d174ee3aa6d3525f6970');
347+
const { hexToBytes } = await import('@storagehub-sdk/core');
348+
const adolphusFingerprint = hexToBytes('0x34eb5f637e05fc18f857ccb013250076534192189894d174ee3aa6d3525f6970');
348349
const location = 'files/e2e-bucket/adolphus.jpg';
349350
const blob = await loadAdolphusBlob();
350351
const metadata = await client.files.formFileMetadata(owner, bucketId, location, adolphusFingerprint, BigInt(blob.size));

test/suites/integration/solochain-evm/sdk-precompiles.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,12 @@ await describeMspNet(
306306
// Also verify through SDK / MSP backend endpoints
307307
const listedBuckets = await mspClient.buckets.listBuckets();
308308
assert(
309-
listedBuckets.some((b) => `0x${b.bucketId}` === bucketId),
309+
listedBuckets.some((b) => b.bucketId === bucketId),
310310
"MSP listBuckets should include the created bucket"
311311
);
312312
const sdkBucket = await mspClient.buckets.getBucket(bucketId);
313313
strictEqual(
314-
`0x${sdkBucket.bucketId}`,
314+
sdkBucket.bucketId,
315315
bucketId,
316316
"MSP getBucket should return the created bucket"
317317
);
@@ -453,8 +453,8 @@ await describeMspNet(
453453
"file tree should not be empty"
454454
);
455455
const fileInfo = await mspClient.files.getFileInfo(bucketId, fileKey.toHex());
456-
strictEqual(`0x${fileInfo.bucketId}`, bucketId, "BucketId should match");
457-
strictEqual(`0x${fileInfo.fileKey}`, fileKey.toHex(), "FileKey should match");
456+
strictEqual(fileInfo.bucketId, bucketId, "BucketId should match");
457+
strictEqual(fileInfo.fileKey, fileKey.toHex(), "FileKey should match");
458458
});
459459

460460
it("Should fetch payment streams using the SDK's MspClient", async () => {

0 commit comments

Comments
 (0)