Skip to content

Commit f75b2b5

Browse files
authored
Merge pull request #67 from DimensionDev/chore/related-twitters
chore: add related twitters
2 parents 313ffee + 84d4d89 commit f75b2b5

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Generate and Deploy
22

33
on:
4+
push:
5+
branches: [master]
46
schedule:
57
- cron: '0 0 * * *'
68
workflow_dispatch:

src/providers/coingecko.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export type CoinDetail = {
7272
}
7373
}
7474

75+
const tokenRelatedTwitters: Record<string, string[]> = {
76+
'binancecoin': ['binance', 'bnbchain']
77+
}
78+
7579
export class CoinGecko implements FungibleTokenProvider {
7680
private getSocialLinks(coin: CoinDetail) {
7781
// CoinGecko provided more info.
@@ -139,6 +143,7 @@ export class CoinGecko implements FungibleTokenProvider {
139143
logoURL: x.image,
140144
rank: x.market_cap_rank,
141145
socialLinks: links[x.id],
146+
relatedTwitters: tokenRelatedTwitters[x.id],
142147
} satisfies FungibleToken)),
143148
)
144149
console.timeEnd(`CoinGecko: get top tokens of page ${page}`)

src/type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export interface FungibleToken extends SocialTagMeta {
128128
type: SearchResultType
129129
rank: number
130130
socialLinks: SocialLinks
131+
relatedTwitters?: string[]
131132
}
132133

133134
export interface NonFungibleToken {

0 commit comments

Comments
 (0)