Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Additional changes per @joncinque request
Browse files Browse the repository at this point in the history
  • Loading branch information
aschonfeld committed Aug 16, 2022
1 parent 4d7caa2 commit e150e76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web3.js/src/programs/vote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export class VoteProgram {
currentVoteAccountBalance: number,
rentExemptMinimum: number,
): Transaction {
if (params.lamports >= currentVoteAccountBalance - rentExemptMinimum) {
if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {
throw new Error(
'Withdraw will leave vote account with insuffcient funds.',
);
Expand Down
2 changes: 1 addition & 1 deletion web3.js/test/program-tests/vote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ describe('VoteProgram', () => {
{
votePubkey: newVoteAccount.publicKey,
authorizedWithdrawerPubkey: authorized.publicKey,
lamports: voteBalance,
lamports: voteBalance - minimumAmount + 1,
toPubkey: recipient.publicKey,
},
voteBalance,
Expand Down

0 comments on commit e150e76

Please sign in to comment.