Updated on 2026-08-14
This commit is contained in:
parent
ae196a5666
commit
a4a9303aea
1 changed files with 8 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ internal class EthereumAddressTest {
|
|||
@Test
|
||||
fun makeAddressFromCorrectPublicKey() {
|
||||
val walletPublicKey = "04BAEC8CD3BA50FDFE1E8CF2B04B58E17041245341CD1F1C6B3A496B48956DB4C896A6848BCF8FCFC33B88341507DD25E5F4609386C68086C74CF472B86E5C3820".hexToBytes()
|
||||
val expected = "0xc63763572d45171e4c25ca0818b44e5dd7f5c15b"
|
||||
val expected = "0xc63763572D45171e4C25cA0818b44E5Dd7F5c15B"
|
||||
|
||||
Truth.assertThat(addressService.makeAddress(walletPublicKey))
|
||||
.isEqualTo(expected)
|
||||
|
|
@ -23,4 +23,11 @@ internal class EthereumAddressTest {
|
|||
Truth.assertThat(addressService.validate(address))
|
||||
.isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun validateCorrectAddressWithChecksum() {
|
||||
val address = "0xc63763572D45171e4C25cA0818b44E5Dd7F5c15B"
|
||||
Truth.assertThat(addressService.validate(address))
|
||||
.isTrue()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue