mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-04-11 21:53:48 +00:00
Merge 9b76da88ab28cd10759f49249c40dcf81b7ae4d7 into 7473c2f7a9ab8da65870442f0b90c96293982446
This commit is contained in:
commit
c7f0085726
@ -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 }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user