mirror of
https://github.com/oceanprotocol/ens-proxy.git
synced 2024-12-02 05:57:34 +01:00
Fixing avatar request
This commit is contained in:
parent
10d3f263d7
commit
927f84e679
@ -18,7 +18,7 @@ interface Profile {
|
|||||||
function getEnsAvatar(ensName: string): string {
|
function getEnsAvatar(ensName: string): string {
|
||||||
return ensName
|
return ensName
|
||||||
? `https://metadata.ens.domains/mainnet/avatar/${ensName}`
|
? `https://metadata.ens.domains/mainnet/avatar/${ensName}`
|
||||||
: null
|
: 'null'
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getEnsProfile(accountId: string): Promise<Profile> {
|
export async function getEnsProfile(accountId: string): Promise<Profile> {
|
||||||
@ -46,6 +46,7 @@ export async function getEnsProfile(accountId: string): Promise<Profile> {
|
|||||||
const links: ProfileLink[] = records.filter((record) =>
|
const links: ProfileLink[] = records.filter((record) =>
|
||||||
linkKeys.includes(record.key)
|
linkKeys.includes(record.key)
|
||||||
)
|
)
|
||||||
|
console.log('getEnsAvatar(name)', getEnsAvatar(name))
|
||||||
|
|
||||||
const profile: Profile = {
|
const profile: Profile = {
|
||||||
name,
|
name,
|
||||||
|
@ -6,6 +6,7 @@ export async function getEnsTextRecords(
|
|||||||
): Promise<{ key: string; value: string }[]> {
|
): Promise<{ key: string; value: string }[]> {
|
||||||
const texts = [
|
const texts = [
|
||||||
'url',
|
'url',
|
||||||
|
'avatar',
|
||||||
'com.twitter',
|
'com.twitter',
|
||||||
'com.github',
|
'com.github',
|
||||||
'org.telegram',
|
'org.telegram',
|
||||||
|
@ -9,9 +9,7 @@
|
|||||||
"clean": "rm -rf ./dist",
|
"clean": "rm -rf ./dist",
|
||||||
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write",
|
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write",
|
||||||
"test:format": "npm run format && npm run lint",
|
"test:format": "npm run format && npm run lint",
|
||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit"
|
||||||
"test:integration": "mocha --config=test/.mocharc.json --node-env=test --exit 'test/**/*.test.ts'",
|
|
||||||
"test": "npm run test:format && npm run test:integration"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ethers": "^5.7.0"
|
"ethers": "^5.7.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user