Skip to content

Commit 2e0ca67

Browse files
committed
Feat: unsupported currencies
1 parent bc1e053 commit 2e0ca67

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

.soliumignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
contracts/Migrations.sol

.soliumrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": "solium:recommended",
3+
"plugins": [
4+
"security"
5+
],
6+
"rules": {
7+
"quotes": [
8+
"error",
9+
"double"
10+
],
11+
"indentation": [
12+
"error",
13+
4
14+
],
15+
"linebreak-style": [
16+
"error",
17+
"unix"
18+
]
19+
}
20+
}

contracts/Paycrest.sol

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ contract Paycrest is IPaycrest, PaycrestSettingManager {
127127
// get the settled percent that is scheduled for this amount
128128
liquidityProviderAmount = (amount * _settlePercent) / MAX_BPS;
129129
// deduct protocol fees from the new total amount
130-
protocolFee = (liquidityProviderAmount * protocolFeePercent) * MAX_BPS;
130+
protocolFee = (liquidityProviderAmount * protocolFeePercent) / MAX_BPS;
131131
// substract total fees from the new amount after getting the scheduled amount
132132
liquidityProviderAmount = (liquidityProviderAmount - protocolFee);
133133
// get primary validators fees primaryValidatorsReward
@@ -178,10 +178,7 @@ contract Paycrest is IPaycrest, PaycrestSettingManager {
178178
uint64,
179179
uint256
180180
) {
181-
protocolFeePercent;
182-
primaryValidatorFeePercent;
183-
secondaryValidatorFeePercent;
184-
MAX_BPS;
181+
return(protocolFeePercent, primaryValidatorFeePercent, secondaryValidatorFeePercent, MAX_BPS);
185182
}
186183

187184
/** @dev See {getLiquidityAggregator-IPaycrest}. */

test/paycrest.test.js renamed to test/Paycrest/paycrest.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const {
77
FEE_BPS,
88
Errors,
99
Events,
10-
} = require("./utils/utils.manager.js");
10+
} = require("../utils/utils.manager.js");
1111
const { expect } = require("chai");
1212

1313
describe("Ownable settings", function () {
@@ -23,7 +23,7 @@ describe("Ownable settings", function () {
2323
] = await ethers.getSigners();
2424

2525
this.mockUSDC = await deployContract("MockUSDC");
26-
this.mockUSDCT = await deployContract("MockUSDC");
26+
this.mockUSDT = await deployContract("MockUSDC");
2727
this.paycrest = await deployContract("Paycrest", [this.mockUSDC.address]);
2828
this.paycrestValidator = await deployContract("PaycrestValidator", [
2929
this.paycrest.address,

0 commit comments

Comments
 (0)