[stellar][cli]can't send payment to a federation recipient who includes memo
- Dominant language
- Go
- Stars
- 9.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
## Description
When sending a payment to a federation recipient that includes a memo, I got the error: `federation recipient included its own memo, but send called with a memo`, even if I didn't specify a memo.
```
$ http get 'https://api.yushi.moe/stellar/federation?type=name&q=binance_deposit*yushi.moe'
{
"account_id": "GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A",
"memo": "1008446094",
"memo_type": "text",
"stellar_address": "binance_deposit*yushi.moe"
}
$ keybase wallet send binance_deposit*yushi.moe 0.001
Send 0.001 XLM to binance_deposit*yushi.moe? (type 'YES' to confirm): YES
▶ ERROR federation recipient included its own memo, but send called with a memo
```
## Suggested fix
If no memo is specified, [`NewMemoFromStrings`](https://github.com/keybase/stellarnet/blob/aea14c9e62f0cd365672eaee9b142b102479c5b8/memo.go#L63-L70) returns a `NewMemoNone`, rather than nil.
https://github.com/keybase/client/blob/ba8a26e4f9d290f14d50644f4c7e5f7d6f2c0749/go/stellar/stellar.go#L664-L666
https://github.com/keybase/client/blob/ba8a26e4f9d290f14d50644f4c7e5f7d6f2c0749/go/stellar/stellar.go#L800-L802
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with NewMemoFromStrings in memo.go and the referenced memo checks in go/stellar/stellar.go around lines 664-666 and 800-802. Trace the no-memo send path and verify that a federation recipient's memo can be used when the sender did not provide one, while an explicitly supplied memo still behaves correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, payments
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100