Commit ed16136 1 parent f20bb11 commit ed16136 Copy full SHA for ed16136
File tree 1 file changed +3
-3
lines changed
programs/scope/src/oracles
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
use anchor_lang:: prelude:: * ;
2
- use anchor_spl:: token :: spl_token :: state:: Mint ;
2
+ use anchor_spl:: token_2022 :: spl_token_2022 :: state:: Mint ;
3
3
use solana_program:: program_pack:: Pack ;
4
4
use whirlpool:: state:: Whirlpool ;
5
5
@@ -45,12 +45,12 @@ where
45
45
// Load extra accounts
46
46
let mint_a_decimals = {
47
47
let mint_borrow = mint_token_a_account_info. data . borrow ( ) ;
48
- Mint :: unpack ( & mint_borrow) ?. decimals
48
+ Mint :: unpack_from_slice ( & mint_borrow[ .. Mint :: LEN ] ) ?. decimals
49
49
} ;
50
50
51
51
let mint_b_decimals = {
52
52
let mint_borrow = mint_token_b_account_info. data . borrow ( ) ;
53
- Mint :: unpack ( & mint_borrow) ?. decimals
53
+ Mint :: unpack_from_slice ( & mint_borrow[ .. Mint :: LEN ] ) ?. decimals
54
54
} ;
55
55
56
56
// Compute price
You can’t perform that action at this time.
0 commit comments