Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Commit 8ab8563

Browse files
committed
fix udt change in Source::Claimable.
1 parent 4f0355c commit 8ab8563

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

core/rpc/core/src/impl/utils.rs

+4-11
Original file line numberDiff line numberDiff line change
@@ -2003,17 +2003,10 @@ impl<C: CkbRpc> MercuryRpcImpl<C> {
20032003
.inputs
20042004
.last()
20052005
.expect("impossible: get last input fail");
2006-
let receiver_address = Address::new(
2007-
self.network_type,
2008-
AddressPayload::from_pubkey_hash(
2009-
H160::from_slice(
2010-
&last_input_cell.cell_output.lock().args().raw_data()[0..20],
2011-
)
2012-
.unwrap(),
2013-
),
2014-
true,
2015-
)
2016-
.to_string();
2006+
let receiver_address = match self.generate_udt_ownership(ctx.clone(), last_input_cell, &IOType::Input, None).await? {
2007+
Ownership::Address(address) => address,
2008+
Ownership::LockHash(_) => return Err(CoreError::CannotFindAddressByH160.into()),
2009+
};
20172010

20182011
// find acp
20192012
if required_udt_amount < zero {

0 commit comments

Comments
 (0)