Skip to content

Commit

Permalink
decode return chain id
Browse files Browse the repository at this point in the history
  • Loading branch information
jj1980a committed Sep 5, 2024
1 parent 918c4f7 commit c5f41ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions types/user_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ func NewUserOperationPartialRaw(chainId uint64, userOp *UserOperation, hints []c
}

type UserOperationWithHintsRaw struct {
ChainId *hexutil.Big `json:"chainId" validate:"required"`
UserOperation *UserOperationRaw `json:"userOperation" validate:"required"`
Hints []common.Address `json:"hints"` // Optional
ChainId *hexutil.Big `json:"chainId"`
UserOperation *UserOperationRaw `json:"userOperation"`
Hints []common.Address `json:"hints"`
}

func (uop *UserOperationWithHintsRaw) Decode() (*UserOperation, []common.Address) {
return uop.UserOperation.Decode(), uop.Hints
func (uop *UserOperationWithHintsRaw) Decode() (uint64, *UserOperation, []common.Address) {
return uop.ChainId.ToInt().Uint64(), uop.UserOperation.Decode(), uop.Hints
}

0 comments on commit c5f41ad

Please sign in to comment.