Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dynamic fee min bound #210

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions zp-relayer/services/fee/FeeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ export abstract class FeeManager<T extends string[] = DynamicFeeKeys> {
const feeOptions = await this._fetchFeeOptions()
const convertedFees = await feeOptions.convert(this.config.priceFeed)
const scaledFees = convertedFees.applyFactor(this.config.scaleFactor)
const boundedFees = scaledFees.applyMinBound()

return scaledFees
return boundedFees
}

async getFeeOptions(useCached = true): Promise<IFeeOptions<T>> {
Expand All @@ -198,7 +199,6 @@ export abstract class FeeManager<T extends string[] = DynamicFeeKeys> {
logger.debug('Fallback to cache fee options')
feeOptions = this.cachedFeeOptions.clone()
}
feeOptions.applyMinBound()
return feeOptions
}

Expand Down
Loading