-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: addressOrName to address (#1203)
- Loading branch information
Showing
17 changed files
with
219 additions
and
225 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,22 @@ | ||
--- | ||
'@wagmi/core': minor | ||
--- | ||
|
||
**Breaking**: `addressOrName` renamed to `address` for `fetchBalance` and `fetchEnsAvatar`. | ||
|
||
```diff | ||
const result = await fetchBalance({ | ||
- addressOrName: '0x…', | ||
+ address: '0x…', | ||
}) | ||
``` | ||
|
||
If you were using an ENS name instead of an address, you can resolve the name to an address before passing it to the action. | ||
|
||
```diff | ||
+ const { data: address } = await fetchEnsAddress({ name: 'example.eth' }) | ||
const result = await fetchBalance({ | ||
- addressOrName: 'example.eth', | ||
+ address, | ||
}) | ||
``` |
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,22 @@ | ||
--- | ||
'wagmi': minor | ||
--- | ||
|
||
**Breaking**: `addressOrName` renamed to `address` for `useBalance` and `useEnsAvatar`. | ||
|
||
```diff | ||
const result = useBalance({ | ||
- addressOrName: '0x…', | ||
+ address: '0x…', | ||
}) | ||
``` | ||
|
||
If you were using an ENS name instead of an address, you can resolve the name to an address before passing it to the action. | ||
|
||
```diff | ||
+ const { data: address } = useEnsAddress({ name: 'example.eth' }) | ||
const result = useBalance({ | ||
- addressOrName: 'example.eth', | ||
+ address, | ||
}) | ||
``` |
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
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
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
Oops, something went wrong.