Skip to content

Commit

Permalink
Merge pull request #125 from blckngm/fix-deploy-address-parsing
Browse files Browse the repository at this point in the history
fix: fix address parsing
  • Loading branch information
jjyr authored Jun 16, 2023
2 parents 006cd55 + ab0101c commit 9344591
Show file tree
Hide file tree
Showing 13 changed files with 217 additions and 561 deletions.
283 changes: 203 additions & 80 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ tera = "1.2"
lazy_static = "1.4"
serde = { version = "1.0", features = [ "derive" ] }
ckb-testtool = "0.9.0"
bech32 = "0.6"
secp256k1 = "0.24"
serde_json = "1.0"
rpassword = "4.0"
Expand All @@ -38,6 +37,7 @@ chrono = { version = "0.4.24", default-features = false, features = ["std"] }
# 0.2.3 breaks color output: https://github.com/matklad/xshell/issues/63
xshell = "=0.2.2"
path_macro = "1.0.0"
ckb-sdk = "2.5.0"

[build-dependencies]
includedir_codegen = "0.6"
Expand Down
4 changes: 2 additions & 2 deletions src/bin/capsule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use ckb_capsule::recipe::get_recipe;
use ckb_capsule::signal;
use ckb_capsule::tester::Tester;
use ckb_capsule::version::Version;
use ckb_capsule::wallet::cli_types::HumanCapacity;
use ckb_capsule::wallet::{Address, Wallet, DEFAULT_CKB_CLI_BIN_NAME, DEFAULT_CKB_RPC_URL};
use ckb_capsule::wallet::{Wallet, DEFAULT_CKB_CLI_BIN_NAME, DEFAULT_CKB_RPC_URL};
use ckb_sdk::{Address, HumanCapacity};
use ckb_testtool::ckb_types::core::Capacity;

use clap::{App, AppSettings, Arg, SubCommand};
Expand Down
5 changes: 1 addition & 4 deletions src/deployment/deployment_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ impl DeploymentProcess {
self.wallet.get_cell_output(live_cell.out_point());
let wallet_lock: packed::Script = self.wallet.lock_script();
if cell_output.lock() != wallet_lock {
let address = self
.wallet
.address()
.display_with_network(self.wallet.address().network());
let address = self.wallet.address().to_string();
return Err(anyhow!("Can't unlock previously deployed cells with address '{}'\ncell '{}' uses lock:\n{}\naddress's lock:\n{}\n\nhint: update the lock field in `deployment.toml` or turn off migration with option `--migrate=off`", address, name, cell_output.lock(), wallet_lock));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/deployment/plan.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::recipe::DeploymentRecipe;
use crate::deployment::recipe::*;
use crate::wallet::cli_types::HumanCapacity;
use ckb_sdk::HumanCapacity;
use ckb_testtool::ckb_types::H256;
use serde::Serialize;

Expand Down
297 changes: 0 additions & 297 deletions src/wallet/cli_types/address.rs

This file was deleted.

Loading

0 comments on commit 9344591

Please sign in to comment.