status-go/services/wallet/requests/router_send_transactions_params.go
Sale Djenic 874da40150 chore(wallet)_: send type package simplification
- path processor constants moved to wallet constants
- FetchPrices and FindToken functions moved from send type package to router package
2024-11-22 13:32:49 +01:00

27 lines
616 B
Go

package requests
import "github.com/status-im/status-go/errors"
var (
ErrInvalidSignatureDetails = &errors.ErrorResponse{Code: errors.ErrorCode("WT-004"), Details: "invalid signature details"}
)
type RouterSendTransactionsParams struct {
Uuid string `json:"uuid"`
Signatures map[string]SignatureDetails `json:"signatures"`
}
type SignatureDetails struct {
R string `json:"r"`
S string `json:"s"`
V string `json:"v"`
}
func (sd *SignatureDetails) Validate() error {
if len(sd.R) != 64 || len(sd.S) != 64 || len(sd.V) != 2 {
return ErrInvalidSignatureDetails
}
return nil
}