This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
token/program-2022/src/extension/confidential_mint_burn Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,11 @@ impl SupplyAccountInfo {
49
49
if self . supply_elgamal_pubkey . is_none ( ) {
50
50
return Err ( TokenError :: InvalidState ) ;
51
51
}
52
- // fresh mints are initialized with a zeroed decryptable_supply
53
- let current_decyptable_supply = if self . decryptable_supply != PodAeCiphertext :: default ( ) {
54
- // decrypt the current supply
55
- TryInto :: < AeCiphertext > :: try_into ( self . decryptable_supply )
56
- . map_err ( |_| TokenError :: MalformedCiphertext ) ?
57
- . decrypt ( aes_key)
58
- . ok_or ( TokenError :: MalformedCiphertext ) ?
59
- } else {
60
- 0
61
- } ;
52
+ // decrypt the decryptable supply
53
+ let current_decyptable_supply = TryInto :: < AeCiphertext > :: try_into ( self . decryptable_supply )
54
+ . map_err ( |_| TokenError :: MalformedCiphertext ) ?
55
+ . decrypt ( aes_key)
56
+ . ok_or ( TokenError :: MalformedCiphertext ) ?;
62
57
63
58
// get the difference between the supply ciphertext and the decryptable supply
64
59
// explanation see https://github.com/solana-labs/solana-program-library/pull/6881#issuecomment-2385579058
You can’t perform that action at this time.
0 commit comments