Skip to content

Commit

Permalink
feat: default timeout const
Browse files Browse the repository at this point in the history
  • Loading branch information
gasspper committed Jul 9, 2024
1 parent 8075708 commit 68da302
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/transbank/common/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ class Options {
* @param timeout Timeout for requests in milliseconds
*/
constructor(commerceCode: string, apiKey: string, environment: string, timeout?: number) {
const defaultTimeout = 1000 * 60 * 10;
this.commerceCode = commerceCode;
this.apiKey = apiKey;
this.environment = environment;
this.timeout = timeout ?? 60000;
this.timeout = timeout ?? defaultTimeout;
}
}

Expand Down

0 comments on commit 68da302

Please sign in to comment.