Skip to content

Commit

Permalink
fix: self update is now pointing to the right archive name (near#234)
Browse files Browse the repository at this point in the history
* fix: archive name
* fix: cargo clipped
* style: fmt
  • Loading branch information
frolvanya authored Sep 1, 2023
1 parent 23bb067 commit f473269
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ shell-words = "1"
cargo-util = "0.1.1"

semver = { version = "1.0.4", optional = true }
self_update = { version = "0.36.0", features = ["archive-tar", "compression-flate2"], optional = true }
self_update = { version = "0.37.0", features = ["archive-tar", "compression-flate2"], optional = true }

color-eyre = "0.6"
thiserror = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/contract/download_wasm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl DownloadContractContext {
.blocking_call(near_jsonrpc_client::methods::query::RpcQueryRequest {
block_reference: block_reference.clone(),
request: near_primitives::views::QueryRequest::ViewCode {
account_id: account_id.clone().into(),
account_id: account_id.clone(),
},
})
.wrap_err_with(|| format!("Failed to fetch query ViewCode for <{}>", &account_id))?;
Expand Down
8 changes: 1 addition & 7 deletions src/commands/extensions/self_update/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ impl SelfUpdateCommandContext {
.repo_owner("near")
.repo_name("near-cli-rs")
.bin_path_in_archive(
format!(
"near-cli-rs-v{}-{}/{}",
get_latest_version()?,
self_update::get_target(),
BIN_NAME
)
.as_str(),
format!("near-cli-rs-{}/{}", self_update::get_target(), BIN_NAME).as_str(),
)
.bin_name(BIN_NAME)
.show_download_progress(true)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/tokens/send_ft/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ impl From<SendFtCommandContext> for crate::commands::ActionContext {

move |_network_config| {
Ok(crate::commands::PrepopulatedTransaction {
signer_id: signer_account_id.clone().into(),
receiver_id: ft_contract_account_id.clone().into(),
signer_id: signer_account_id.clone(),
receiver_id: ft_contract_account_id.clone(),
actions: vec![near_primitives::transaction::Action::FunctionCall(
near_primitives::transaction::FunctionCallAction {
method_name: "ft_transfer".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions src/commands/transaction/sign_transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ impl SignTransactionContext {
Ok(Self(crate::commands::ActionContext {
global_context: previous_context,
interacting_with_account_ids: vec![
scope.unsigned_transaction.inner.signer_id.clone().into(),
scope.unsigned_transaction.inner.receiver_id.clone().into(),
scope.unsigned_transaction.inner.signer_id.clone(),
scope.unsigned_transaction.inner.receiver_id.clone(),
],
on_after_getting_network_callback,
on_before_signing_callback: std::sync::Arc::new(
Expand Down
2 changes: 1 addition & 1 deletion src/commands/transaction/view_status/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl TransactionInfoContext {
let on_after_getting_network_callback: crate::network::OnAfterGettingNetworkCallback =
std::sync::Arc::new({
let signer_account_id = scope.signer_account_id.clone();
let transaction_hash = scope.transaction_hash.clone();
let transaction_hash = scope.transaction_hash;

move |network_config| {
let query_view_transaction_status = network_config
Expand Down

0 comments on commit f473269

Please sign in to comment.