-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from enkryptcom/devop/cleanup-ens-ud
Devop: tweak ENS and UD
- Loading branch information
Showing
3 changed files
with
47 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import NameResolver, { CoinType } from "@enkryptcom/name-resolution"; | ||
class GenericNameResolver { | ||
nameResolver: NameResolver; | ||
|
||
constructor() { | ||
this.nameResolver = new NameResolver({ | ||
ens: { node: "https://nodes.mewapi.io/rpc/eth" }, | ||
}); | ||
} | ||
|
||
async resolveName(name: string, coins: CoinType[]): Promise<string | null> { | ||
let response: string | null = null; | ||
for (const coin of coins) { | ||
response = await this.nameResolver | ||
.resolveAddress(name, coin) | ||
.catch(() => null); | ||
if (response) return response; | ||
} | ||
return response; | ||
} | ||
} | ||
|
||
export { CoinType, GenericNameResolver }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1669050
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Virus total analysis
chrome:
https://www.virustotal.com/gui/file/fcfb1b9eee63b6140b7fc7449c807ab506e0673b7169d322e084914b91192435
firefox:
https://www.virustotal.com/gui/file/77b4fc93d73085c0fd535f811a713691903733ddebd709409b62af8ca1d73ec6
1669050
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Virus total analysis
chrome:
https://www.virustotal.com/gui/file/a789680c8b50a0c8ea046821c6d33dbee1b3eca09044869921e497b0dade5b5b
firefox:
https://www.virustotal.com/gui/file/70962f323b09d06f4fe87f59042f4629a5710b099254b246567c8f0d1aa49761
1669050
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Virus total analysis
chrome:
https://www.virustotal.com/gui/file/9c9b178997cb0a7bf9c0e08bc7cdc91adbe3bc2f50227eb18bcf187b5f38a257
firefox:
https://www.virustotal.com/gui/file/0d451521b9be34cc49d6562ab9e37768706990a1e31c50cff21fba43ad898631