Skip to content

Commit

Permalink
Merge pull request #2043 from jyustecastell/adding-chains-to-Unizen-a…
Browse files Browse the repository at this point in the history
…dapter

Adding UTXO chains to Unizen adapter
  • Loading branch information
dtmkeng authored Oct 28, 2024
2 parents cf8cdc5 + 88b4a10 commit c27ee63
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion aggregators/unizen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ const CHAINS: TChain = {
[CHAIN.ARBITRUM]: 42161,
[CHAIN.OPTIMISM]: 10,
[CHAIN.BASE]: 8453,
[CHAIN.BITCOIN]: 0,
[CHAIN.BITCOIN_CASH]: 0,
[CHAIN.LITECOIN]: 0,
[CHAIN.DOGECHAIN]: 0,
[CHAIN.COSMOS]: 0,
};

interface VolumeReport {
Expand All @@ -34,8 +39,14 @@ function isVolumeReport(data: any): data is VolumeReport {

const fetch = (chain: string) =>
async (_: number): Promise<FetchResult> => {
const chainCode = CHAINS[chain];
const unixTimestamp = getUniqStartOfTodayTimestamp();
const chainCode = CHAINS[chain];
if (!chainCode) {
return {
dailyVolume: 0,
timestamp: unixTimestamp,
};
}
const url = `https://api.zcx.com/private/integrators/report/volumeAndCount/24h`;
const data = (await httpGet(url, { headers: {
'User-Agent': 'Mozilla/5.0+(compatible; unizen; exchange)',
Expand Down

0 comments on commit c27ee63

Please sign in to comment.