Skip to content

Commit cb003be

Browse files
authored
Remove depositer param from public depositTo function (#16)
1 parent fbd61e1 commit cb003be

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

contracts/Account.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ contract Account is IAccount, Ownable {
7070
* @param amount The amount of base tokens to be deposited into the Tracer Market account
7171
* @param market The address of the tracer market that the margin tokens will be deposited into
7272
* @param user the user whos account the deposit is being made into
73-
* @param depositer the address who is depositing the funds
7473
*/
75-
function depositTo(uint256 amount, address market, address user, address depositer) external override {
76-
_deposit(amount, market, user, depositer);
74+
function depositTo(uint256 amount, address market, address user) external override {
75+
_deposit(amount, market, user, msg.sender);
7776
}
7877

7978
/**

contracts/Interfaces/IAccount.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import "./Types.sol";
66
interface IAccount {
77
function deposit(uint256 amount, address market) external;
88

9-
function depositTo(uint256 amount, address market, address user, address depositer) external;
9+
function depositTo(uint256 amount, address market, address user) external;
1010

1111
function withdraw(uint256 amount, address market) external;
1212

test-ts/functional/Insurance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe("Insurance", async () => {
105105
await tracerBaseToken.transfer(insurance.address, web3.utils.toWei("5"))
106106

107107
//Deposit into insurance pool and sync holdings
108-
await account.depositTo(web3.utils.toWei("5"), tracers[0].address, insurance.address, accounts[0])
108+
await account.depositTo(web3.utils.toWei("5"), tracers[0].address, insurance.address)
109109
await insurance.updatePoolAmount(tracers[0].address)
110110

111111
//Insurance state: margin: 10, outstandingPoolTokens: 5. (2:1)
@@ -145,7 +145,7 @@ describe("Insurance", async () => {
145145
let tracerBaseToken = await TestToken.at(tracerMarginAddr)
146146

147147
//Sync the insurance pool with its margin holding
148-
await account.depositTo(web3.utils.toWei("5"), tracers[0].address, insurance.address, accounts[0])
148+
await account.depositTo(web3.utils.toWei("5"), tracers[0].address, insurance.address)
149149
await insurance.updatePoolAmount(tracers[0].address)
150150

151151
//Insurance state: margin: 10, outstandingPoolTokens: 5

0 commit comments

Comments
 (0)