Transfer to self
It seems like calling token::transfer with parameters such that source is equal the destination would cause an attempt to increase the balance of destination by the amount being transferred because of the instruction ordering at https://github.com/anoma/namada/blob/5cc23b4f43b12ecfc70eeca8d04cbe15f4b11a3a/crates/trans_token/src/storage.rs#L247 We should clarify whether the source and destination of a valid transfer call can be the same. If it is valid, I would expect the balance of destination (or equivalently, the source) to be left unchanged. If it is not valid, then returning an error might be better.
In this case, at the moment, the transaction would fail, right?
In this case, at the moment, the transaction would fail, right?
Yes, I think the token VPs would reject this transaction. But I'll test this later...
We should reject self-to-self transfers, regardless of anything else.
Is this completely fixed by #3675?
Closed by https://github.com/anoma/namada/pull/3675