Skip to content

Commit

Permalink
refactor: use a functional arweave dev gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
fedellen committed Nov 21, 2024
1 parent 7bcc7fe commit 4ab10fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function createArweaveUploader(

const gateway =
context.rpc.getCluster() === 'devnet'
? 'https://arweave.dev'
? 'https://turbo.ardrive.dev/raw'
: 'https://arweave.net';

return `${gateway}/${dataItemId}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test('can upload one file', async (t) => {

// Then the URI should be a valid arweave dev gateway URI.
t.truthy(uri);
t.true(uri.startsWith('https://arweave.dev/'));
t.true(uri.startsWith('https://turbo.ardrive.dev/'));

// and it should point to the uploaded asset.
const [asset] = await context.downloader.download([uri]);
Expand All @@ -78,7 +78,7 @@ test.skip('can upload a file above 105 KiB in size', async (t) => {
]);

t.truthy(uri);
t.true(uri.startsWith('https://arweave.dev/'));
t.true(uri.startsWith('https://turbo.ardrive.dev/'));

const [asset] = await context.downloader.download([uri]);
t.deepEqual(asset.buffer, buffer);
Expand Down

0 comments on commit 4ab10fc

Please sign in to comment.