-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from morpho-org/feat/batch-optimization
Feat/batch optimization
- Loading branch information
Showing
7 changed files
with
666 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { TransactionType } from "../types"; | ||
|
||
export const reverseTransactionType = (txType: TransactionType) => { | ||
switch (txType) { | ||
case TransactionType.borrow: | ||
return TransactionType.repay; | ||
case TransactionType.supply: | ||
return TransactionType.withdraw; | ||
case TransactionType.supplyCollateral: | ||
return TransactionType.withdrawCollateral; | ||
case TransactionType.repay: | ||
return TransactionType.borrow; | ||
case TransactionType.withdraw: | ||
return TransactionType.supply; | ||
case TransactionType.withdrawCollateral: | ||
return TransactionType.supplyCollateral; | ||
} | ||
}; |
Oops, something went wrong.