Skip to content

Commit

Permalink
chore: update normalize to use ox/Ens
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Nov 7, 2024
1 parent af1fe2d commit dce1a72
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-berries-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Updated \`normalize\` to use \`ox/Ens\`.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
{
"name": "import * from 'viem/ens'",
"path": "./src/_esm/ens/index.js",
"limit": "47.5 kB",
"limit": "48.5 kB",
"import": "*"
},
{
Expand Down
77 changes: 69 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@
}
},
"dependencies": {
"@adraffy/ens-normalize": "1.11.0",
"@noble/curves": "1.6.0",
"@noble/hashes": "1.5.0",
"@scure/bip32": "1.5.0",
"@scure/bip39": "1.4.0",
"abitype": "1.0.6",
"isows": "1.0.6",
"ox": "0.1.0",
"webauthn-p256": "0.0.10",
"ws": "8.18.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/utils/ens/normalize.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ens_normalize } from '@adraffy/ens-normalize'
import * as Ens from 'ox/Ens'
import type { ErrorType } from '../../errors/utils.js'

export type NormalizeErrorType = ErrorType
Expand All @@ -14,5 +14,5 @@ export type NormalizeErrorType = ErrorType
* @see https://github.com/ensdomains/docs/blob/9edf9443de4333a0ea7ec658a870672d5d180d53/ens-improvement-proposals/ensip-15-normalization-standard.md
*/
export function normalize(name: string) {
return ens_normalize(name)
return Ens.normalize(name)
}

0 comments on commit dce1a72

Please sign in to comment.