File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 33
44## [ v0.0.24-alpha] - 2023-12-4
55- fix walletconnect 2.0 send_tx
6+ - add from_address for walletconnect 2.0 sendtx
67
78## [ v0.0.23-alpha] - 2023-8-7
89- add mac universal binary (arm64 + x86_64)
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ mod ffi {
129129 /// wallet connect cronos(eth) eip155-tx signing info
130130 #[ derive( Debug , Default ) ]
131131 pub struct WalletConnectTxEip155 {
132+ pub from : String , // hexstring, "0x..."
132133 pub to : String , // hexstring, "0x..."
133134 pub value : String , // decimal string, in wei units
134135 pub data : Vec < u8 > , // data, as bytes
Original file line number Diff line number Diff line change @@ -300,6 +300,11 @@ impl Walletconnect2Client {
300300
301301 let mut tx = Eip1559TransactionRequest :: new ( ) ;
302302
303+ if !userinfo. from . is_empty ( ) {
304+ // from address is necessary for wc.20 , metamask
305+ tx = tx. from ( Address :: from_str ( & userinfo. from ) ?) ;
306+ }
307+
303308 if !userinfo. to . is_empty ( ) {
304309 tx = tx. to ( NameOrAddress :: Address ( Address :: from_str ( & userinfo. to ) ?) ) ;
305310 }
You can’t perform that action at this time.
0 commit comments