Skip to content

Commit

Permalink
fix: hard code logo url for scr (#12084)
Browse files Browse the repository at this point in the history
  • Loading branch information
swkatmask authored Jan 31, 2025
1 parent f684b2a commit cbd6351
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
6 changes: 6 additions & 0 deletions packages/web3-providers/src/Cloudflare/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import type { TokenIconAPI } from '../entry-types.js'

class CloudflareAPI implements TokenIconAPI.Provider<ChainId> {
async getFungibleTokenIconURLs(chainId: ChainId, address: string): Promise<string[]> {
// TODO hardcoded for SCR on Scroll chain
if (address.toLowerCase() === '0xd29687c813d741e2f938f4ac377128810e217b1b') {
return [
'https://www.okx.com/cdn/web3/currency/token/small/534352-0xd29687c813d741e2f938f4ac377128810e217b1b-97?v=1738011884368',
]
}
const { NATIVE_TOKEN_ASSET_BASE_URI = EMPTY_LIST, ERC20_TOKEN_ASSET_BASE_URI = EMPTY_LIST } =
getTokenAssetBaseURLConstants(chainId)
const formattedAddress = formatEthereumAddress(address)
Expand Down
31 changes: 17 additions & 14 deletions packages/web3-providers/src/types/Firefly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,20 +396,23 @@ export namespace FireflyRedPacketAPI {
[RedPacketNftMetaKey]?: object
[SolanaRedPacketMetaKey]?: object
}
redpacket: {
/** the same as meta */
payload: object
canClaim: boolean
canRefund: boolean
canSend: boolean
isPasswordValid: boolean
isClaimed: boolean
isEmpty: boolean
isExpired: boolean
isRefunded: boolean
claimedNumber: number
claimedAmount: string
} | null
redpacket:
| {
/** the same as meta */
payload: object
canClaim: boolean
canRefund: boolean
canSend: boolean
isPasswordValid: boolean
isClaimed: boolean
isEmpty: boolean
isExpired: boolean
isRefunded: boolean
claimedNumber: number
claimedAmount: string
}
// In the backend service, it would be null during fetching the redpacket info.
| null
}
export type ParseResponse = FireflyResponse<ParseResult>

Expand Down

0 comments on commit cbd6351

Please sign in to comment.