Make insufficient tokens message more helpful
This commit is contained in:
parent
83c0711760
commit
8fb5d72b13
|
@ -60,7 +60,10 @@ pub fn process_instruction(
|
|||
Err(Error::InvalidArgument)?;
|
||||
}
|
||||
if tokens > accounts[0].tokens {
|
||||
info!("Insufficient tokens in account[0]");
|
||||
info!(
|
||||
"Insufficient tokens in account[0] ({} > {})",
|
||||
tokens, accounts[0].tokens
|
||||
);
|
||||
Err(Error::ResultWithNegativeTokens)?;
|
||||
}
|
||||
accounts[0].tokens -= tokens;
|
||||
|
|
Loading…
Reference in New Issue