Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 97f3216

Browse files
committed
Use overflow error
1 parent 6dc7bc6 commit 97f3216

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

program/src/processor/shared/mint_to.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ pub fn process_mint_to(
5353
let destination_amount = destination_account
5454
.amount()
5555
.checked_add(amount)
56-
.ok_or(ProgramError::InvalidAccountData)?;
56+
.ok_or(TokenError::Overflow)?;
5757
destination_account.set_amount(destination_amount);
5858

5959
let mint_supply = mint
6060
.supply()
6161
.checked_add(amount)
62-
.ok_or(ProgramError::InvalidAccountData)?;
62+
.ok_or(TokenError::Overflow)?;
6363
mint.set_supply(mint_supply);
6464
}
6565

0 commit comments

Comments
 (0)