@@ -72,11 +72,11 @@ impl From<PulseMetadataCompat> for PulseMetadata {
72
72
fn from ( compat : PulseMetadataCompat ) -> Self {
73
73
let url = compat. url . and_then ( |s| url:: Url :: parse ( & s) . ok ( ) ) ;
74
74
let bundle_id = compat. bundle_id . clone ( ) ;
75
- let package_name = compat. package_name . clone ( ) ;
75
+ // let package_name = compat.package_name.clone();
76
76
let sdk_version = compat. sdk_version . clone ( ) ;
77
77
let sdk_platform = compat. sdk_platform . clone ( ) ;
78
78
79
- Self { url, bundle_id, package_name , sdk_version, sdk_platform }
79
+ Self { url, bundle_id, sdk_version, sdk_platform }
80
80
}
81
81
}
82
82
@@ -113,7 +113,7 @@ impl From<CallCompat> for Call {
113
113
let to = Address :: from_str ( & compat. to ) . unwrap ( ) ;
114
114
let value = U256 :: from ( compat. value ) ;
115
115
// Convert hex string back to Bytes
116
- let input = Bytes :: from ( hex:: decode ( & compat. input [ 2 ..] ) . unwrap ( ) ) ; // Skip "0x" prefix
116
+ let input = Bytes :: from ( hex:: decode ( & compat. input [ 2 ..] ) . unwrap ( ) ) ; // Skip "0x" prefix
117
117
118
118
Call { to, value, input }
119
119
}
@@ -493,7 +493,7 @@ impl From<FeeEstimatedTransactionCompat> for FeeEstimatedTransaction {
493
493
to : Address :: from_str ( & compat. to ) . unwrap ( ) ,
494
494
value : U256 :: from_str ( & compat. value ) . unwrap ( ) ,
495
495
// Convert hex string back to Bytes
496
- input : Bytes :: from ( hex:: decode ( & compat. input [ 2 ..] ) . unwrap ( ) ) , // Skip "0x" prefix
496
+ input : Bytes :: from ( hex:: decode ( & compat. input [ 2 ..] ) . unwrap ( ) ) , // Skip "0x" prefix
497
497
gas_limit : U64 :: from_str ( & compat. gas_limit ) . unwrap ( ) ,
498
498
nonce : U64 :: from_str ( & compat. nonce ) . unwrap ( ) ,
499
499
max_fee_per_gas : U128 :: from_str ( & compat. max_fee_per_gas ) . unwrap ( ) ,
@@ -787,17 +787,18 @@ impl From<PrepareDetailedResponseSuccessCompat>
787
787
#[ frb( dart_metadata=( "freezed" ) ) ]
788
788
pub struct PrepareResponseErrorCompat {
789
789
pub error : BridgingErrorCompat ,
790
+ pub reason : String ,
790
791
}
791
792
792
793
impl From < PrepareResponseError > for PrepareResponseErrorCompat {
793
794
fn from ( original : PrepareResponseError ) -> Self {
794
- Self { error : original. error . into ( ) }
795
+ Self { error : original. error . into ( ) , reason : original . reason }
795
796
}
796
797
}
797
798
798
799
impl From < PrepareResponseErrorCompat > for PrepareResponseError {
799
800
fn from ( compat : PrepareResponseErrorCompat ) -> Self {
800
- Self { error : compat. error . into ( ) }
801
+ Self { error : compat. error . into ( ) , reason : compat . reason }
801
802
}
802
803
}
803
804
@@ -893,7 +894,7 @@ pub struct TransactionCompat {
893
894
pub from : String ,
894
895
pub to : String ,
895
896
pub value : String ,
896
- pub input : String , // Changed from Vec<u8> to String
897
+ pub input : String , // Changed from Vec<u8> to String
897
898
pub gas_limit : u64 ,
898
899
pub nonce : u64 ,
899
900
}
@@ -907,7 +908,7 @@ impl From<Transaction> for TransactionCompat {
907
908
to : original. to . to_string ( ) ,
908
909
value : original. value . to_string ( ) ,
909
910
// Convert Bytes to hex string
910
- input : hex:: encode ( original. input . 0 ) , // or format!("0x{}", hex::encode(original.input.0)) for 0x prefix
911
+ input : hex:: encode ( original. input . 0 ) , // or format!("0x{}", hex::encode(original.input.0)) for 0x prefix
911
912
gas_limit : original. gas_limit . to ( ) ,
912
913
nonce : original. nonce . to ( ) ,
913
914
}
@@ -927,7 +928,7 @@ impl From<TransactionCompat> for Transaction {
927
928
let to = Address :: from_str ( & compat. to ) . unwrap ( ) ;
928
929
let value = U256 :: from_str ( & compat. value ) . unwrap ( ) ;
929
930
// Convert hex string back to Bytes
930
- let input = Bytes :: from ( hex:: decode ( & compat. input [ 2 ..] ) . unwrap ( ) ) ; // Skip "0x" prefix
931
+ let input = Bytes :: from ( hex:: decode ( & compat. input [ 2 ..] ) . unwrap ( ) ) ; // Skip "0x" prefix
931
932
let gas_limit = U64 :: from ( compat. gas_limit ) ;
932
933
let nonce = U64 :: from ( compat. nonce ) ;
933
934
0 commit comments