Skip to content

Commit 4e2889b

Browse files
Apply chain gas-price multiplier to MaxFee and SorobanResourceFee
1 parent 895209f commit 4e2889b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

chain/xlm/client/client.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,15 @@ func (client *Client) FetchTransferInput(ctx context.Context, args xcbuilder.Tra
184184
}
185185
}
186186

187+
// Apply chain gas-price multiplier to fees if configured.
188+
// This allows remote adjustment of fee estimates.
189+
if config.ChainGasMultiplier > 0 && config.ChainGasMultiplier != 1.0 {
190+
txInput.MaxFee = uint32(float64(txInput.MaxFee) * config.ChainGasMultiplier)
191+
if txInput.SorobanResourceFee > 0 {
192+
txInput.SorobanResourceFee = uint32(float64(txInput.SorobanResourceFee) * config.ChainGasMultiplier)
193+
}
194+
}
195+
187196
txInput.TransactionActiveTime = config.TransactionActiveTime
188197
return txInput, nil
189198
}

0 commit comments

Comments
 (0)