Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release everything to prod #122

Merged
merged 4 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ THREE_ROUTE_API_AUTH_TOKEN=
REDIS_URL=
ADD_NOTIFICATION_USERNAME=
ADD_NOTIFICATION_PASSWORD=
TZPRO_API_KEY=
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Express backend which helps Temple Wallet to decrease amount of requests to
| Path | Description |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /api/dapps | Provides a list of dApps with their TVL, summary TVL and amount of TEZ locked in them. |
| /api/exchange-rates/tez | Returns a single number, which is TEZ to USD exchange rate according to markets tickers from tzstats.com |
| /api/exchange-rates/tez | Returns a single number, which is TEZ to USD exchange rate according to markets tickers from TzPro API.com |
| /api/exchange-rates | Returns the exchange rates of tokens to USD based on Quipuswap and Dexter pools (for most of them), stats from TZero (only for Aspencoin) and exchange rates from Coingecko (for WRAP tokens which are still not in pools). |
| /api/moonpay-sign | Returns signed MoonPay url |
| /api/mobile-check | Returns the minimum allowed versions of Android and IOS applications. Verifies App Check token. |
Expand Down
3 changes: 2 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const EnvVars = {
THREE_ROUTE_API_AUTH_TOKEN: getEnv('THREE_ROUTE_API_AUTH_TOKEN'),
REDIS_URL: getEnv('REDIS_URL'),
ADD_NOTIFICATION_USERNAME: getEnv('ADD_NOTIFICATION_USERNAME'),
ADD_NOTIFICATION_PASSWORD: getEnv('ADD_NOTIFICATION_PASSWORD')
ADD_NOTIFICATION_PASSWORD: getEnv('ADD_NOTIFICATION_PASSWORD'),
TZPRO_API_KEY: getEnv('TZPRO_API_KEY')
};

for (const name in EnvVars) {
Expand Down
8 changes: 8 additions & 0 deletions src/utils/dapp-list-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,13 @@ export const dappList: DappList[] = [
logo: 'https://pbs.twimg.com/profile_images/1538616711536156672/eRwz1uNE_400x400.jpg',
slug: 'kordfi',
categories: [DappType.DeFi]
},
{
name: 'Lyzi',
dappUrl: 'https://dapp.lyzi.fr/',
type: DappType.DeFi,
logo: 'https://assets-global.website-files.com/6475ceee719579d9e88c6c2f/6475d6f27dd17b6b206bf848_Design%20sans%20titre%20(20).png',
slug: 'lyzi',
categories: [DappType.DeFi]
}
];
5 changes: 4 additions & 1 deletion src/utils/tezos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { tzip12 } from '@taquito/tzip12';
import { tzip16 } from '@taquito/tzip16';
import memoizee from 'memoizee';

import { EnvVars } from '../config';
import { ITicker } from '../interfaces/ticker.interface';
import fetch from './fetch';
import SingleQueryDataProvider from './SingleQueryDataProvider';
Expand Down Expand Up @@ -53,7 +54,9 @@ export const getStorage = memoizee(
);

const getTezExchangeRate = async () => {
const marketTickers = await fetch<Array<ITicker>>('https://api.tzstats.com/markets/tickers');
const marketTickers = await fetch<Array<ITicker>>(
`https://api.tzpro.io/markets/tickers?api_key=${EnvVars.TZPRO_API_KEY}`
);
const usdTickers = marketTickers.filter(e => e.quote === 'USD' && e.base === 'XTZ');
// price index: use all USD ticker last prices with equal weight
const vol = usdTickers.reduce((s, t) => s + t.volume_base, 0) || null;
Expand Down
Loading