Skip to content

Commit 04252cf

Browse files
febojoncinque
authored andcommitted
Use overflow error
1 parent 9e059bb commit 04252cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

p-token/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)