Skip to content

Commit

Permalink
chore: remove rails around inverting capital cost config (#703)
Browse files Browse the repository at this point in the history
Signed-off-by: james-a-morris <[email protected]>
  • Loading branch information
james-a-morris authored Aug 16, 2024
1 parent 02c86f9 commit 609cf4a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@across-protocol/sdk",
"author": "UMA Team",
"version": "3.1.24",
"version": "3.1.25",
"license": "AGPL-3.0",
"homepage": "https://docs.across.to/reference/sdk",
"files": [
Expand Down
1 change: 0 additions & 1 deletion src/relayFeeCalculator/relayFeeCalculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export class RelayFeeCalculator {
*/
static validateCapitalCostsConfig(capitalCosts: CapitalCostConfig): void {
assert(toBN(capitalCosts.upperBound).lt(toBNWei("0.01")), "upper bound must be < 1%");
assert(toBN(capitalCosts.lowerBound).lte(capitalCosts.upperBound), "lower bound must be <= upper bound");
assert(capitalCosts.decimals > 0 && capitalCosts.decimals <= 18, "invalid decimals");
}

Expand Down
30 changes: 3 additions & 27 deletions test/relayFeeCalculator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
toGWei,
TransactionCostEstimate,
bnOne,
bnZero,
getCurrentTime,
spreadEvent,
isMessageEmpty,
Expand Down Expand Up @@ -194,29 +193,6 @@ describe("RelayFeeCalculator", () => {
}),
/upper bound must be </
);
assert.throws(
() =>
new RelayFeeCalculator({
queries,
capitalCostsConfig: {
WBTC: {
...testCapitalCostsConfig["WBTC"],
upperBound: toBNWei("0.001").toString(),
lowerBound: toBNWei("0.002").toString(),
},
},
}),
/lower bound must be <= upper bound/
);
assert.throws(
() =>
RelayFeeCalculator.validateCapitalCostsConfig({
...testCapitalCostsConfig["WBTC"],
upperBound: toBNWei("0.001").toString(),
lowerBound: toBNWei("0.002").toString(),
}),
/lower bound must be <= upper bound/
);
assert.throws(
() =>
new RelayFeeCalculator({
Expand Down Expand Up @@ -359,11 +335,11 @@ describe("RelayFeeCalculator: Composable Bridging", function () {
originChainId: 10,
destinationChainId: 1,
message: message || EMPTY_MESSAGE,
relayerFeePct: bnZero,
realizedLpFeePct: bnZero,
exclusiveRelayer: ZERO_ADDRESS,
fillDeadline: getCurrentTime() + 60000,
exclusivityDeadline: 0,
fromLiteChain: false,
toLiteChain: false,
},
1,
false,
Expand Down Expand Up @@ -448,7 +424,7 @@ describe("RelayFeeCalculator: Composable Bridging", function () {
originChainId: 1,
message: "0xabcdef",
exclusiveRelayer: ZERO_ADDRESS,
fillDeadline: getCurrentTime() + 60,
fillDeadline: getCurrentTime() + 600,
exclusivityDeadline: 0,
},
10
Expand Down

0 comments on commit 609cf4a

Please sign in to comment.