Skip to content

Commit

Permalink
feat: Add upload strategy to identify arseeding uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanpaudel93 committed Jan 31, 2024
1 parent 98cf9ba commit ec168d5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/lib/warpHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,16 @@ async function newRepo(repoId: string, dataTxId: string) {

// const contract = getWarp().contract(contractTxId).connect(jwk);

const payload = { id: repoId, name: title, description, dataTxId };
const uploadStrategy =
process.env.STRATEGY === 'ARSEEDING' ? 'ARSEEDING' : 'DEFAULT';

const payload = {
id: repoId,
name: title,
description,
dataTxId,
uploadStrategy,
};

await waitFor(500);

Expand All @@ -122,7 +131,10 @@ async function updateRepo(id: string, dataTxId: string) {

// const contract = getWarp().contract(contractTxId).connect(jwk);

const payload = { id, name: title, description, dataTxId };
const uploadStrategy =
process.env.STRATEGY === 'ARSEEDING' ? 'ARSEEDING' : 'DEFAULT';

const payload = { id, name: title, description, dataTxId, uploadStrategy };

await waitFor(500);

Expand Down

0 comments on commit ec168d5

Please sign in to comment.