Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Add new redo method to enable transaction tracking #298

Open
wants to merge 2 commits into
base: dev
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
10 changes: 8 additions & 2 deletions packages/dai-plugin-liquidations/src/LiquidationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export default class LiquidationService extends PublicService {
bytes calldata data // Data to pass in external call; if length 0, no call is done
*/
@tracksTransactions
async take(ilk, auctionId, amount, maxPrice, address, { promise }) {
async take(ilk, auctionId, amount, maxPrice, address, data = nullBytes, { promise }) {
const id = numberToBytes32(auctionId);

const amt = BigNumber(amount)
Expand All @@ -252,7 +252,7 @@ export default class LiquidationService extends PublicService {
amt,
max,
address,
nullBytes,
data,
{
promise
}
Expand Down Expand Up @@ -337,6 +337,12 @@ export default class LiquidationService extends PublicService {
// return await this._clipperContract().yank(id, { promise });
// }

@tracksTransactions
async redo(ilk, auctionId, address, { promise }) {
const id = numberToBytes32(auctionId);
return await this._clipperContractByIlk(ilk).redo(id, address, { promise });
}

@tracksTransactions
async joinDaiToAdapter(amount, { promise }) {
const address = this.get('web3').currentAddress();
Expand Down