Skip to content

Commit

Permalink
Merge pull request #122 from madfish-solutions/development
Browse files Browse the repository at this point in the history
Release everything to prod
  • Loading branch information
lourenc authored Oct 31, 2023
2 parents ae4dda9 + 8313bdc commit db0f5e0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
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

0 comments on commit db0f5e0

Please sign in to comment.