@@ -73,8 +73,7 @@ app.post("/", async (req, res, next) => {
73
73
74
74
// Get Oval header configs if present.
75
75
const { ovalAddresses : headerOvalAddresses , errorMessage } = getOvalHeaderConfigs (
76
- req . headers [ OVAL_ADDRESSES_HEADER ] ,
77
- ovalConfigs ,
76
+ req . headers [ OVAL_ADDRESSES_HEADER ]
78
77
) ;
79
78
if ( errorMessage ) {
80
79
await handleUnsupportedRequest ( req , res , "Error parsing Oval header configs: " + errorMessage ) ;
@@ -128,7 +127,7 @@ app.post("/", async (req, res, next) => {
128
127
{
129
128
bodyIdx : 0 ,
130
129
// Next line is dependent on all Oval addresses having the same refund address
131
- percent : ovalConfigs [ headerOvalAddresses [ 0 ] ] . refundPercent ,
130
+ percent : getOvalRefundConfig ( headerOvalAddresses [ 0 ] ) . refundPercent ,
132
131
} ,
133
132
] ;
134
133
@@ -157,7 +156,7 @@ app.post("/", async (req, res, next) => {
157
156
// costs exceed refund value.
158
157
const adjustedRefundPercent = adjustRefundPercent (
159
158
unlock . simulationResponse . coinbaseDiff ,
160
- ovalConfigs [ unlock . ovalAddress ] . refundPercent ,
159
+ getOvalRefundConfig ( unlock . ovalAddress ) . refundPercent ,
161
160
) ;
162
161
if ( adjustedRefundPercent <= 0 ) {
163
162
Logger . debug ( req . transactionId , `Insufficient builder payment ${ unlock . simulationResponse . coinbaseDiff } ` ) ;
0 commit comments