Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gasless-v2-trading-bot/src/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Trade from './models/model.trade';
* @throws Will terminate the process if the database URI is not defined or if the connection attempt fails.
*/

const connect = (): void => {
const connect = async (): Promise<void> => {
const dbUri = url;

if (!dbUri) {
Expand All @@ -29,7 +29,7 @@ const connect = (): void => {

try {
mongoose.set('strictQuery', false);
mongoose.connect(dbUri, {
await mongoose.connect(dbUri, {
retryWrites: true,
w: 'majority',
});
Expand Down