Closed secretshardul closed 3 years ago
Same thing here. Also when attempting to reinstall spl-token-cli I get build errors.
cargo install spl-token-cli
error[E0308]: mismatched types
--> /Users/ysavchenko/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-cli-2.0.6/src/main.rs:435:41
|
435 | let ui_amount = ui_amount.unwrap_or(sender_balance);
| ^^^^^^^^^^^^^^ expected `f64`, found struct `std::string::String`
error[E0308]: mismatched types
--> /Users/ysavchenko/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-cli-2.0.6/src/main.rs:441:20
|
441 | if ui_amount > sender_balance {
| ^^^^^^^^^^^^^^ expected `f64`, found struct `std::string::String`
error[E0277]: can't compare `std::string::String` with `{float}`
--> /Users/ysavchenko/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-cli-2.0.6/src/main.rs:730:79
|
730 | if !source_account.is_native && source_account.token_amount.ui_amount > 0.0 {
| ^ no implementation for `std::string::String < {float}` and `std::string::String > {float}`
|
= help: the trait `PartialOrd<{float}>` is not implemented for `std::string::String`
error[E0308]: mismatched types
--> /Users/ysavchenko/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-cli-2.0.6/src/main.rs:880:33
|
880 | ... ui_token_account.token_amount.ui_amount,
|error[E0308]: mismatched types
--> /Users/ysavchenko/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-cli-2.0.6/src/main.rs:435:41
|
435 | let ui_amount = ui_amount.unwrap_or(sender_balance);
| ^^^^^^^^^^^^^^ expected `f64`, found struct `std::string::String`
error[E0308]: mismatched types
--> /Users/ysavchenko/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-cli-2.0.6/src/main.rs:441:20
|
441 | if ui_amount > sender_balance {
| ^^^^^^^^^^^^^^ expected `f64`, found struct `std::string::String`
error[E0277]: can't compare `std::string::String` with `{float}`
--> /Users/ysavchenko/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-cli-2.0.6/src/main.rs:730:79
|
730 | if !source_account.is_native && source_account.token_amount.ui_amount > 0.0 {
| ^ no implementation for `std::string::String < {float}` and `std::string::String > {float}`
|
= help: the trait `PartialOrd<{float}>` is not implemented for `std::string::String`
error[E0308]: mismatched types
--> /Users/ysavchenko/.cargo/registry/src/github.com-1ecc6299db9ec823/spl-token-cli-2.0.6/src/main.rs:880:33
|
880 | ... ui_token_account.token_amount.ui_amount,
|
@secretshardul @ysavchenko Thanks for quick reporting. it seems that we released v1.5.9 a bit before.
it seems that this caused by https://github.com/solana-labs/solana/pull/15447
Is there any temporary fix? I downgraded to Solana 1.3.22
, but then it showed that spl-token-cli
is not installed. Tried reinstalling it but now it shows the error posted by @ysavchenko
we're now fixing this: https://github.com/solana-labs/solana/pull/15535
@secretshardul @ysavchenko Hi thanks for quick reporting; we believe this is now solved in full. Please report if you're still seeing any problems. :)
Getting this error when checking token balance using CLI.
Problematic commands
First and second commands throw this error
The third command throws
Error remains even after minting tokens.
Versions:
Environment: Intel MacOS Catalina Terminal: zsh