Skip to content

Commit

Permalink
Replace: NewFloat64Pointer -> NewFloatPtr
Browse files Browse the repository at this point in the history
  • Loading branch information
dwasse committed Jul 24, 2024
1 parent cc7e012 commit 429dfaf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions services/rfq/relayer/relconfig/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func TestChainGetters(t *testing.T) {
L1FeeOriginGasEstimate: 30000,
L1FeeDestGasEstimate: 40000,
MinGasToken: "1000",
QuotePct: relconfig.NewFloat64Pointer(0),
QuotePct: relconfig.NewFloatPtr(0),
QuoteWidthBps: 10,
QuoteFixedFeeMultiplier: relconfig.NewFloat64Pointer(1.1),
QuoteFixedFeeMultiplier: relconfig.NewFloatPtr(1.1),
},
},
BaseChainConfig: relconfig.ChainConfig{
Expand All @@ -49,9 +49,9 @@ func TestChainGetters(t *testing.T) {
L1FeeOriginGasEstimate: 30001,
L1FeeDestGasEstimate: 40001,
MinGasToken: "1001",
QuotePct: relconfig.NewFloat64Pointer(51),
QuotePct: relconfig.NewFloatPtr(51),
QuoteWidthBps: 11,
QuoteFixedFeeMultiplier: relconfig.NewFloat64Pointer(1.2),
QuoteFixedFeeMultiplier: relconfig.NewFloatPtr(1.2),
},
}
cfg := relconfig.Config{
Expand All @@ -69,9 +69,9 @@ func TestChainGetters(t *testing.T) {
L1FeeOriginGasEstimate: 30000,
L1FeeDestGasEstimate: 40000,
MinGasToken: "1000",
QuotePct: relconfig.NewFloat64Pointer(50),
QuotePct: relconfig.NewFloatPtr(50),
QuoteWidthBps: 10,
QuoteFixedFeeMultiplier: relconfig.NewFloat64Pointer(1.1),
QuoteFixedFeeMultiplier: relconfig.NewFloatPtr(1.1),
Tokens: map[string]relconfig.TokenConfig{
"USDC": {
Address: usdcAddr,
Expand Down Expand Up @@ -320,9 +320,9 @@ func TestGetQuoteOffset(t *testing.T) {
L1FeeOriginGasEstimate: 30000,
L1FeeDestGasEstimate: 40000,
MinGasToken: "1000",
QuotePct: relconfig.NewFloat64Pointer(50),
QuotePct: relconfig.NewFloatPtr(50),
QuoteWidthBps: 10,
QuoteFixedFeeMultiplier: relconfig.NewFloat64Pointer(1.1),
QuoteFixedFeeMultiplier: relconfig.NewFloatPtr(1.1),
Tokens: map[string]relconfig.TokenConfig{
"USDC": {
Address: usdcAddr,
Expand Down
10 changes: 5 additions & 5 deletions services/rfq/relayer/relconfig/getters.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ var DefaultChainConfig = ChainConfig{
OriginGasEstimate: 160000,
DestGasEstimate: 100000,
MinGasToken: "100000000000000000", // 1 ETH
QuotePct: NewFloat64Pointer(100),
QuotePct: NewFloatPtr(100),
QuoteWidthBps: 0,
QuoteFixedFeeMultiplier: NewFloat64Pointer(1),
RelayFixedFeeMultiplier: NewFloat64Pointer(1),
QuoteFixedFeeMultiplier: NewFloatPtr(1),
RelayFixedFeeMultiplier: NewFloatPtr(1),
}

// NewFloat64Pointer returns a pointer to a float64.
func NewFloat64Pointer(val float64) *float64 {
// NewFloatPtr returns a pointer to a float64.
func NewFloatPtr(val float64) *float64 {
return &val
}

Expand Down

0 comments on commit 429dfaf

Please sign in to comment.