This commit is contained in:
Michael Vines
2020-12-13 17:26:34 -08:00
parent 0d139d7ef3
commit 7143aaa89b
102 changed files with 543 additions and 499 deletions

View File

@ -265,7 +265,7 @@ fn build_messages(
return Err(Error::ExitSignal);
}
let new_stake_account_keypair = Keypair::new();
let lockup_date = if allocation.lockup_date == "" {
let lockup_date = if allocation.lockup_date.is_empty() {
None
} else {
Some(allocation.lockup_date.parse::<DateTime<Utc>>().unwrap())
@ -336,7 +336,7 @@ fn send_messages(
signers.push(&*stake_args.stake_authority);
signers.push(&*stake_args.withdraw_authority);
signers.push(&new_stake_account_keypair);
if allocation.lockup_date != "" {
if !allocation.lockup_date.is_empty() {
if let Some(lockup_authority) = &stake_args.lockup_authority {
signers.push(&**lockup_authority);
} else {