Compare commits
No commits in common. "bcfec85b6c1cd88b4ef507f7ed582b1e7308fd03" and "3fb36378d4ab88593d7750cf82d94d654351809a" have entirely different histories.
bcfec85b6c
...
3fb36378d4
@ -1623,8 +1623,7 @@ func (h *MenuHandlers) ValidateRecipient(ctx context.Context, sym string, input
|
||||
flag_invalid_recipient_with_invite, _ := h.flagManager.GetFlag("flag_invalid_recipient_with_invite")
|
||||
flag_api_error, _ := h.flagManager.GetFlag("flag_api_call_error")
|
||||
|
||||
// remove white spaces
|
||||
recipient := strings.ReplaceAll(string(input), " ", "")
|
||||
recipient := string(input)
|
||||
|
||||
if recipient != "0" {
|
||||
recipientType, err := identity.CheckRecipient(recipient)
|
||||
|
@ -1761,6 +1761,7 @@ func TestValidateRecipient(t *testing.T) {
|
||||
expectedRecipient: []byte("0xd4c288865Ce0985a481Eef3be02443dF5E2e4Ea9"),
|
||||
expectedResult: resource.Result{},
|
||||
},
|
||||
|
||||
{
|
||||
name: "Test for checksummed address",
|
||||
input: []byte("0x5523058cdffe5f3c1eadadd5015e55c6e00fb439"),
|
||||
@ -1768,13 +1769,6 @@ func TestValidateRecipient(t *testing.T) {
|
||||
expectedRecipient: []byte("0x5523058cdFfe5F3c1EaDADD5015E55C6E00fb439"),
|
||||
expectedResult: resource.Result{},
|
||||
},
|
||||
{
|
||||
name: "Test with valid registered recepient that has white spaces",
|
||||
input: []byte("0711 22 33 44"),
|
||||
expectError: false,
|
||||
expectedRecipient: []byte(publicKey),
|
||||
expectedResult: resource.Result{},
|
||||
},
|
||||
}
|
||||
|
||||
// store a public key for the valid recipient
|
||||
|
Loading…
Reference in New Issue
Block a user