diff --git a/asserter/server.go b/asserter/server.go index 5895e801..6b025c45 100644 --- a/asserter/server.go +++ b/asserter/server.go @@ -319,18 +319,6 @@ func (a *Asserter) ConstructionPreprocessRequest( ) } - if err := AssertUniqueAmounts(request.MaxFee); err != nil { - return fmt.Errorf("max fee %s is invalid: %w", types.PrintStruct(request.MaxFee), err) - } - - if request.SuggestedFeeMultiplier != nil && *request.SuggestedFeeMultiplier < 0 { - return fmt.Errorf( - "suggested fee multiplier %f is invalid: %w", - *request.SuggestedFeeMultiplier, - ErrConstructionPreprocessRequestSuggestedFeeMultiplierIsNeg, - ) - } - return nil } diff --git a/asserter/server_test.go b/asserter/server_test.go index 8441e3a9..618850b8 100644 --- a/asserter/server_test.go +++ b/asserter/server_test.go @@ -914,8 +914,6 @@ func TestConstructionDeriveRequest(t *testing.T) { } func TestConstructionPreprocessRequest(t *testing.T) { - positiveFeeMultiplier := float64(1.1) - negativeFeeMultiplier := float64(-1.1) var tests = map[string]struct { request *types.ConstructionPreprocessRequest err error @@ -928,31 +926,9 @@ func TestConstructionPreprocessRequest(t *testing.T) { err: nil, }, "valid request with suggested fee multiplier": { - request: &types.ConstructionPreprocessRequest{ - NetworkIdentifier: validNetworkIdentifier, - Operations: validOps, - SuggestedFeeMultiplier: &positiveFeeMultiplier, - }, - err: nil, - }, - "valid request with max fee": { request: &types.ConstructionPreprocessRequest{ NetworkIdentifier: validNetworkIdentifier, Operations: validOps, - MaxFee: []*types.Amount{ - validAmount, - }, - }, - err: nil, - }, - "valid request with suggested fee multiplier and max fee": { - request: &types.ConstructionPreprocessRequest{ - NetworkIdentifier: validNetworkIdentifier, - Operations: validOps, - MaxFee: []*types.Amount{ - validAmount, - }, - SuggestedFeeMultiplier: &positiveFeeMultiplier, }, err: nil, }, @@ -997,25 +973,6 @@ func TestConstructionPreprocessRequest(t *testing.T) { }, err: ErrOperationStatusNotEmptyForConstruction, }, - "negative suggested fee multiplier": { - request: &types.ConstructionPreprocessRequest{ - NetworkIdentifier: validNetworkIdentifier, - Operations: validOps, - SuggestedFeeMultiplier: &negativeFeeMultiplier, - }, - err: ErrConstructionPreprocessRequestSuggestedFeeMultiplierIsNeg, - }, - "max fee with duplicate currency": { - request: &types.ConstructionPreprocessRequest{ - NetworkIdentifier: validNetworkIdentifier, - Operations: validOps, - MaxFee: []*types.Amount{ - validAmount, - validAmount, - }, - }, - err: ErrCurrencyUsedMultipleTimes, - }, } for name, test := range tests {