* Bump spl-token to clean up magic number (#11726)
(cherry picked from commit 2fd2aceeb2)
# Conflicts:
#	account-decoder/Cargo.toml
#	core/Cargo.toml
* Fix conflicts and toml order
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
			
			
This commit is contained in:
		
							
								
								
									
										6
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							@@ -4629,12 +4629,12 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "spl-token"
 | 
			
		||||
version = "1.0.6"
 | 
			
		||||
version = "1.0.8"
 | 
			
		||||
source = "registry+https://github.com/rust-lang/crates.io-index"
 | 
			
		||||
checksum = "07c8482ae4aac6bb7d73aef79df5fb403a16a0cfbe200442532cff6b98613383"
 | 
			
		||||
checksum = "7e8bee8b59279b46d0627490b544c3bc38e440ff4da9851a34a26ab0a24bfe7d"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "cbindgen",
 | 
			
		||||
 "num-derive 0.2.5",
 | 
			
		||||
 "num-derive 0.3.0",
 | 
			
		||||
 "num-traits",
 | 
			
		||||
 "remove_dir_all",
 | 
			
		||||
 "solana-sdk 1.2.17",
 | 
			
		||||
 
 | 
			
		||||
@@ -15,14 +15,14 @@ bs58 = "0.3.1"
 | 
			
		||||
bv = "0.11.1"
 | 
			
		||||
Inflector = "0.11.4"
 | 
			
		||||
lazy_static = "1.4.0"
 | 
			
		||||
serde = "1.0.112"
 | 
			
		||||
serde_derive = "1.0.103"
 | 
			
		||||
serde_json = "1.0.56"
 | 
			
		||||
solana-config-program = { path = "../programs/config", version = "1.3.5" }
 | 
			
		||||
solana-sdk = { path = "../sdk", version = "1.3.5" }
 | 
			
		||||
solana-stake-program = { path = "../programs/stake", version = "1.3.5" }
 | 
			
		||||
solana-vote-program = { path = "../programs/vote", version = "1.3.5" }
 | 
			
		||||
spl-token-v1-0 = { package = "spl-token", version = "1.0.6", features = ["skip-no-mangle"] }
 | 
			
		||||
serde = "1.0.112"
 | 
			
		||||
serde_derive = "1.0.103"
 | 
			
		||||
serde_json = "1.0.56"
 | 
			
		||||
spl-token-v1-0 = { package = "spl-token", version = "1.0.8", features = ["skip-no-mangle"] }
 | 
			
		||||
thiserror = "1.0"
 | 
			
		||||
 | 
			
		||||
[package.metadata.docs.rs]
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ solana-transaction-status = { path = "../transaction-status", version = "1.3.5"
 | 
			
		||||
solana-version = { path = "../version", version = "1.3.5" }
 | 
			
		||||
solana-vote-program = { path = "../programs/vote", version = "1.3.5" }
 | 
			
		||||
solana-vote-signer = { path = "../vote-signer", version = "1.3.5" }
 | 
			
		||||
spl-token-v1-0 = { package = "spl-token", version = "1.0.6", features = ["skip-no-mangle"] }
 | 
			
		||||
spl-token-v1-0 = { package = "spl-token", version = "1.0.8", features = ["skip-no-mangle"] }
 | 
			
		||||
tempfile = "3.1.0"
 | 
			
		||||
thiserror = "1.0"
 | 
			
		||||
tokio_01 = { version = "0.1", package = "tokio" }
 | 
			
		||||
 
 | 
			
		||||
@@ -1388,9 +1388,7 @@ fn get_token_program_id_and_mint(
 | 
			
		||||
/// program_id) and decimals
 | 
			
		||||
fn get_mint_owner_and_decimals(bank: &Arc<Bank>, mint: &Pubkey) -> Result<(Pubkey, u8)> {
 | 
			
		||||
    if mint == &spl_token_v1_0_native_mint() {
 | 
			
		||||
        // Uncomment the following once spl_token is bumped to a version that includes native_mint::DECIMALS
 | 
			
		||||
        // Ok((spl_token_id_v1_0(), spl_token_v1_0::native_mint::DECIMALS))
 | 
			
		||||
        Ok((spl_token_id_v1_0(), 9))
 | 
			
		||||
        Ok((spl_token_id_v1_0(), spl_token_v1_0::native_mint::DECIMALS))
 | 
			
		||||
    } else {
 | 
			
		||||
        let mint_account = bank.get_account(mint).ok_or_else(|| {
 | 
			
		||||
            Error::invalid_params("Invalid param: could not find mint".to_string())
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ solana-sdk = { path = "../sdk", version = "1.3.5" }
 | 
			
		||||
solana-stake-program = { path = "../programs/stake", version = "1.3.5" }
 | 
			
		||||
solana-vote-program = { path = "../programs/vote", version = "1.3.5" }
 | 
			
		||||
spl-memo-v1-0 = { package = "spl-memo", version = "1.0.7", features = ["skip-no-mangle"] }
 | 
			
		||||
spl-token-v1-0 = { package = "spl-token", version = "1.0.6", features = ["skip-no-mangle"] }
 | 
			
		||||
spl-token-v1-0 = { package = "spl-token", version = "1.0.8", features = ["skip-no-mangle"] }
 | 
			
		||||
serde = "1.0.112"
 | 
			
		||||
serde_derive = "1.0.103"
 | 
			
		||||
serde_json = "1.0.56"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user