Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ss58_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func SS58Decode(address string) (uint16, []byte, error) {
if data[0] <= 63 {
prefixLen = 1
ident = uint16(data[0])
} else if data[0] < 127 {
} else if data[0] <= 127 {
lower := (data[0] << 2) | (data[1] >> 6)
upper := data[1] & 0b00111111
prefixLen = 2
Expand Down
1 change: 1 addition & 0 deletions ss58_address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func TestAddressInfo(t *testing.T) {
}{
{"TestAddressInfo_Alice_Substrate", "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", 42, "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"},
{"TestAddressInfo_Alice_Heiko", "hJKzPoi3MQnSLvbShxeDmzbtHncrMXe5zwS3Wa36P6kXeNpcv", 110, "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"},
{"TestAddressInfo_Alice_Social", "xw8P6urbSAronL3zZFB7dg8p7LLSgKCUFDUgjohnf1iP434ic", 252, "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"},
{"TestAddressInfo_Alice_Contextfree", "a7SvTrjvshEMePMEZpEkYMekuZMPpDwMNqfUx8N8ScEEQYfM8", 11820, "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"},
}
for _, tt := range tests {
Expand Down