Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Address ToString function #2745

Closed
1 task done
sstepanchuk opened this issue Sep 19, 2024 · 10 comments
Closed
1 task done

Problem with Address ToString function #2745

sstepanchuk opened this issue Sep 19, 2024 · 10 comments

Comments

@sstepanchuk
Copy link

Check existing issues

Viem Version

2.21.10

Current Behavior

I got diffrent addresses in account Object and in Event log that i recive from request

Expected Behavior

I expect same addresses in account Object and in Event log that i recive

Steps To Reproduce

https://stackblitz.com/edit/stackblitz-starters-hsq1lz?file=test%2FTest.ts

it's second test

image

Link to Minimal Reproducible Example

https://stackblitz.com/edit/stackblitz-starters-hsq1lz?file=test%2FTest.ts

Anything else?

No response

@sstepanchuk
Copy link
Author

image

@sstepanchuk
Copy link
Author

address to string function not work same, take a look to 'f' and 'F'

or to 'b' and 'B'

@jxom
Copy link
Member

jxom commented Sep 20, 2024

The addresses are the same. One is checksummed, and the other is not.

@jxom jxom closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2024
@sstepanchuk
Copy link
Author

@jxom

why Address in account is checksummed and address that i recive is not checksummed?

how i can checksum this address in viem?

@sstepanchuk
Copy link
Author

sstepanchuk commented Sep 20, 2024

in two cases we have the same type of object (address) and it is logical that the information in them should be the same (in same format)

the question is, why are they different (in diffrent format)?

@sstepanchuk
Copy link
Author

@jxom

1 similar comment
@sstepanchuk
Copy link
Author

@jxom

@jxom
Copy link
Member

jxom commented Sep 24, 2024

The Account address is often used for display purposes, so it’s default to the checksummed version for safety. If you want alternative behavior, feel free to checksum it yourself or de-checksum.

@sstepanchuk
Copy link
Author

got it, thank you for the answer

Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants