Skip to content

Commit

Permalink
fix how tests builds string for W3_NFTSTORAGE_PRINCIPAL
Browse files Browse the repository at this point in the history
  • Loading branch information
gobengo committed Mar 21, 2024
1 parent f1ff837 commit bcfbed7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/api/src/utils/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ export async function getContext(event, params) {

let w3up
if (config.W3UP_URL) {
console.warn('in getContext', {
W3UP_URL: config.W3UP_URL,
W3_NFTSTORAGE_PRINCIPAL: config.W3_NFTSTORAGE_PRINCIPAL,
W3_NFTSTORAGE_PROOF: config.W3_NFTSTORAGE_PROOF,
})
w3up = await createW3upClientFromConfig({
url: config.W3UP_URL,
principal: config.W3_NFTSTORAGE_PRINCIPAL ?? '',
Expand Down
2 changes: 1 addition & 1 deletion packages/api/test/nfts-upload.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test.before(async (t) => {
LINKDEX_URL: linkdexUrl,
W3UP_URL: (await mockW3up).url.toString(),
W3_NFTSTORAGE_SPACE: (await nftStorageSpace).did(),
W3_NFTSTORAGE_PRINCIPAL: (await nftStorageApiPrincipal).did(),
W3_NFTSTORAGE_PRINCIPAL: ed25519.format(await nftStorageApiPrincipal),
W3_NFTSTORAGE_PROOF: (
await encodeDelegationAsCid(
await delegate({
Expand Down

0 comments on commit bcfbed7

Please sign in to comment.