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 {
4949 if self . supply_elgamal_pubkey . is_none ( ) {
5050 return Err ( TokenError :: InvalidState ) ;
5151 }
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 ) ?;
6257
6358 // get the difference between the supply ciphertext and the decryptable supply
6459 // 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