Skip to content

Commit

Permalink
fix: remove unused pinata import
Browse files Browse the repository at this point in the history
the code was removed but the import was not causing metrics and pin status to fail. This fixes that.

License: (Apache-2.0 AND MIT)
Signed-off-by: Oli Evans <oli@tableflip.io>
  • Loading branch information
olizilla committed Sep 1, 2021
1 parent 8187092 commit 8e4e2a1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/cron-pinata.yml

This file was deleted.

11 changes: 0 additions & 11 deletions packages/cron/src/lib/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Cluster } from '@nftstorage/ipfs-cluster'
import { DBClient } from '@web3-storage/db'
import { IPFS } from './ipfs.js'
import { Pinata } from './pinata.js'

/**
* Create a new IPFS Cluster instance from the passed environment variables.
Expand Down Expand Up @@ -49,13 +48,3 @@ export function getDBClient (env) {
}
return new DBClient({ token })
}

/**
* Create a new Piñata client instance from the passed environment variables.
* @param {Record<string, string|undefined>} env
*/
export function getPinata (env, { reqsPerSec = 2 }) {
const apiToken = env.PINATA_JWT
if (!apiToken) throw new Error('missing Pinata API token')
return new Pinata({ apiToken, reqsPerSec })
}

0 comments on commit 8e4e2a1

Please sign in to comment.