Skip to content

Commit 7a4742a

Browse files
committed
update fix
Signed-off-by: Eval EXEC <[email protected]>
1 parent 6fe0d86 commit 7a4742a

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

src/traits/default_impls.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,17 @@ impl DefaultCellDepResolver {
180180
NetworkInfo::devnet()
181181
};
182182

183-
if let Some((v1_dep_hash, v1_dep_index)) = MultisigScript::V2.dep_group(network_info) {
184-
let multisig_v1_dep = CellDep::new_builder()
185-
.out_point(OutPoint::new(v1_dep_hash.pack(), v1_dep_index))
183+
if let Some((v2_dep_hash, v2_dep_index)) = MultisigScript::V2.dep_group(network_info) {
184+
let multisig_v2_dep = CellDep::new_builder()
185+
.out_point(OutPoint::new(v2_dep_hash.pack(), v2_dep_index))
186186
.dep_type(DepType::DepGroup.into())
187187
.build();
188188

189189
items.insert(
190190
MultisigScript::V2.script_id(),
191191
(
192-
multisig_v1_dep,
193-
"Secp256k1 blake160 multisig(v1) all".to_string(),
192+
multisig_v2_dep,
193+
"Secp256k1 blake160 multisig(v2) all".to_string(),
194194
),
195195
);
196196
}

src/transaction/handler/multisig.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ impl Secp256k1Blake160MultisigAllScriptHandler {
4949
Ok(ret)
5050
}
5151

52-
pub fn new_with_network(network: &NetworkInfo) -> Result<Self, TxBuilderError> {
53-
Self::new(network, MultisigScript::Legacy)
54-
}
55-
5652
pub fn new_with_customize(multisig_script: MultisigScript, cell_deps: Vec<CellDep>) -> Self {
5753
Self {
5854
multisig_script,

src/types/address.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,11 @@ impl From<Script> for AddressPayload {
267267
&& code_hash_h256 == MultisigScript::V2.script_id().code_hash
268268
&& args.len() == 20
269269
{
270-
let index = CodeHashIndex::Multisig;
271-
let hash = H160::from_slice(args.as_ref()).unwrap();
272-
AddressPayload::Short { index, hash }
270+
AddressPayload::Full {
271+
hash_type,
272+
code_hash,
273+
args,
274+
}
273275
} else if hash_type == ScriptHashType::Type
274276
&& (code_hash_h256 == ACP_TYPE_HASH_LINA || code_hash_h256 == ACP_TYPE_HASH_AGGRON)
275277
&& args.len() == 20

src/unlock/signer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ use std::{collections::HashSet, convert::TryFrom};
22

33
use anyhow::anyhow;
44
use ckb_hash::{blake2b_256, new_blake2b};
5-
use ckb_jsonrpc_types::ScriptHashType;
65
use ckb_types::{
76
bytes::{Bytes, BytesMut},
8-
core::TransactionView,
7+
core::{ScriptHashType, TransactionView},
98
error::VerificationError,
109
packed::{self, BytesOpt, Script, WitnessArgs},
1110
prelude::*,
@@ -178,7 +177,7 @@ impl MultisigConfig {
178177
let multisig_script_id = multisig_script.script_id();
179178
Ok(MultisigConfig {
180179
lock_code_hash: multisig_script_id.code_hash,
181-
lock_hash_type: multisig_script_id.hash_type.into(),
180+
lock_hash_type: multisig_script_id.hash_type,
182181
sighash_addresses,
183182
require_first_n,
184183
threshold,

0 commit comments

Comments
 (0)