diff --git a/rpc/send_transaction.go b/rpc/send_transaction.go index 80b6b14a..b7223a41 100644 --- a/rpc/send_transaction.go +++ b/rpc/send_transaction.go @@ -24,7 +24,8 @@ func (s *RPC) sendTransaction( return nil, fmt.Errorf("recovering parent wallet: %w", err) } - apiIntent := convertToAPIIntent(intent.ToIntent()) + // use original intent otherwise we may experience lose of data because of outdated struct + apiIntent := convertToAPIIntent(&intent.Intent) bundle, err := s.Wallets.GenTransaction(waasContext(ctx), apiIntent) if err != nil { return nil, fmt.Errorf("generating transaction: %w", err) diff --git a/rpc/sign_message.go b/rpc/sign_message.go index 9e0c5cb3..58d0a0aa 100644 --- a/rpc/sign_message.go +++ b/rpc/sign_message.go @@ -63,7 +63,8 @@ func (s *RPC) signMessage( }, } - apiIntent := convertToAPIIntent(intent.ToIntent()) + // use original intent otherwise we may experience lose of data because of outdated struct + apiIntent := convertToAPIIntent(&intent.Intent) res, err := s.Wallets.SignMessage(waasContext(ctx), apiIntent, signMessage, signatures) if err != nil { return nil, fmt.Errorf("signing message: %w", err)