Merge 9b76da88ab28cd10759f49249c40dcf81b7ae4d7 into 7473c2f7a9ab8da65870442f0b90c96293982446

This commit is contained in:
buray 2026-04-08 14:43:33 +00:00 committed by GitHub
commit c7f0085726
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,6 +169,13 @@ impl WalletSubcommand for AuthTransferSubcommand {
let (from, from_privacy) = parse_addr_with_privacy_prefix(&from)?;
let (to, to_privacy) = parse_addr_with_privacy_prefix(&to)?;
if from == to {
anyhow::bail!(
"Invalid transfer: --from and --to cannot be the same account ({})",
from
);
}
match (from_privacy, to_privacy) {
(AccountPrivacyKind::Public, AccountPrivacyKind::Public) => {
NativeTokenTransferProgramSubcommand::Public { from, to, amount }