Skip to content

Commit

Permalink
chore: update getLegacyOwner
Browse files Browse the repository at this point in the history
  • Loading branch information
pikonha committed Oct 2, 2024
1 parent d85ade1 commit d79d18e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/gateway/src/services/ethereumClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export class EthereumClient<chain extends Chain> {
return owner
}

async getNFTOwner(node: Hex): Promise<Hex> {
// this is useful when fetching names registered before introduction of the NameWrapper
async getLegacyOwner(node: Hex): Promise<Hex> {
try {
return await this.client.readContract({
address: this.registrarAddress,
Expand All @@ -70,7 +71,7 @@ export class EthereumClient<chain extends Chain> {
async verifyOwnership(node: Hex, address: Hex): Promise<boolean> {
return (
(await this.getOwner(node)) === address ||
(await this.getNFTOwner(node)) === address
(await this.getLegacyOwner(node)) === address
)
}

Expand Down

0 comments on commit d79d18e

Please sign in to comment.