Skip to content

Instantly share code, notes, and snippets.

@vahidvdn
Created December 21, 2021 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vahidvdn/55e2a35591f8f847687da67116bedfd9 to your computer and use it in GitHub Desktop.
Save vahidvdn/55e2a35591f8f847687da67116bedfd9 to your computer and use it in GitHub Desktop.
import { CashifyOptionsFactory } from 'nestjs-cashify';
@Injectable()
export class CashifyConfigService implements CashifyOptionsFactory {
constructor(private configService: ConfigService) {}
createCashifyOptions() {
const rates = {
GBP: 0.92,
EUR: 1.00,
USD: 1.12
};
return {
base: this.configService.get<string>('BASE'),
rates
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment