Skip to content

Commit

Permalink
[DT-902] chore: Making sure to throw unsupported method for Ens multi…
Browse files Browse the repository at this point in the history
…ChainAddr()
  • Loading branch information
DChan0319 committed Sep 29, 2023
1 parent 1df7ff2 commit 994f5bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Resolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,11 @@ export default class Resolution {
const recordKey = `crypto.${ticker.toUpperCase()}.version.${chain.toUpperCase()}.address`;
return this.callServiceForDomain(domain, async (service) => {
if (service instanceof Ens) {
return await service.addr(domain, ticker);
throw new ResolutionError(ResolutionErrorCode.UnsupportedMethod, {
methodName: 'multiChainAddr',
domain,
method: service.name,
});
}

return await service.record(domain, recordKey);
Expand Down

0 comments on commit 994f5bb

Please sign in to comment.