substrate-ibc icon indicating copy to clipboard operation
substrate-ibc copied to clipboard

Convert from Vec<u8> to Vec<u8> redundant?

Open livelybug opened this issue 2 years ago • 0 comments

In the file src/channel.rs, there are a few conversions from Vec to Vec, which look redundant.

			let mut data: &[u8] = &data;
			let data = Vec::<u8>::decode(&mut data).unwrap();

But removing the "redundant conversion" causes error IncorrectPacketCommitment.

Maybe related to:

        pub fn to_ibc_timestamp(self) -> IbcTimestamp {
            let value = String::from_utf8(self.time).unwrap();
            let timestamp = IbcTimestamp::from_str(&value).unwrap();
            timestamp
        }

here.

livelybug avatar Nov 17 '21 10:11 livelybug