diff --git a/packages/database/src/captchaDatabase/captchaDatabse.ts b/packages/database/src/captchaDatabase/captchaDatabse.ts index 91d95fa452..68b34299d4 100644 --- a/packages/database/src/captchaDatabase/captchaDatabse.ts +++ b/packages/database/src/captchaDatabase/captchaDatabse.ts @@ -21,10 +21,8 @@ const StoredCaptcha = mongoose.model('StoredCaptcha', UserCommitmentRecordSchema export const saveCaptchas = async (events: UserCommitmentRecord[], atlasUri: string) => { const connection = mongoose.createConnection(atlasUri, { authSource: 'admin', - useNewUrlParser: true, - useUnifiedTopology: true, }) - await new Promise((resolve) => { + await new Promise((resolve, reject) => { connection .once('open', () => { logger.info('Connected to MongoDB Atlas') diff --git a/packages/provider/src/api/captchaScheduler.ts b/packages/provider/src/api/captchaScheduler.ts index 7ca4aa8ffb..31ee4b29b8 100644 --- a/packages/provider/src/api/captchaScheduler.ts +++ b/packages/provider/src/api/captchaScheduler.ts @@ -12,9 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. import { CronJob } from 'cron' -import { KeyringPair } from '@polkadot/keyring/types' -import { ProsopoConfigOutput } from '@prosopo/types' -import { ProsopoEnvError } from '@prosopo/common' +import type { KeyringPair } from '@polkadot/keyring/types' +import type { ProsopoConfigOutput } from '@prosopo/types' import { ProviderEnvironment } from '@prosopo/env' import { Tasks } from '../tasks/tasks.js'