Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain ID is int64 #36

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type SignersResponse struct {
}

type SignDropperRequest struct {
ChainId int `json:"chain_id"`
ChainId int64 `json:"chain_id"`
Dropper string `json:"dropper"`
TtlDays int `json:"ttl_days"`
Sensible bool `json:"sensible"`
Expand All @@ -63,7 +63,7 @@ type SignDropperRequest struct {
}

type SignDropperResponse struct {
ChainId int `json:"chain_id"`
ChainId int64 `json:"chain_id"`
Dropper string `json:"dropper"`
TtlDays int `json:"ttl_days"`
Sensible bool `json:"sensible"`
Expand Down Expand Up @@ -471,7 +471,7 @@ func (server *Server) signDropperRoute(w http.ResponseWriter, r *http.Request, s
var callRequestSpecifications []CallRequestSpecification

for i, message := range req.Requests {
messageHash, hashErr := DropperClaimMessageHash(int64(req.ChainId), req.Dropper, message.DropId, message.RequestID, message.Claimant, message.BlockDeadline, message.Amount)
messageHash, hashErr := DropperClaimMessageHash(req.ChainId, req.Dropper, message.DropId, message.RequestID, message.Claimant, message.BlockDeadline, message.Amount)
if hashErr != nil {
http.Error(w, "Unable to generate message hash", http.StatusInternalServerError)
return
Expand Down
2 changes: 1 addition & 1 deletion sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func DropperClaimMessageHash(chainId int64, dropperAddress string, dropId, reque
Domain: apitypes.TypedDataDomain{
Name: "Moonstream Dropper",
Version: "0.2.0",
ChainId: (*math.HexOrDecimal256)(big.NewInt(int64(chainId))),
ChainId: (*math.HexOrDecimal256)(big.NewInt(chainId)),
VerifyingContract: dropperAddress,
},
Message: apitypes.TypedDataMessage{
Expand Down
Loading