Skip to content

Commit

Permalink
test(blue-sdk): remove asArg
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Oct 21, 2024
1 parent d5fcc16 commit 8502e8c
Showing 1 changed file with 6 additions and 24 deletions.
30 changes: 6 additions & 24 deletions packages/blue-sdk/test/e2e/Market.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Time } from "@morpho-org/morpho-ts";
import { type Address, parseUnits } from "viem";
import { parseUnits } from "viem";
import { describe, expect } from "vitest";
import { ChainId, Market, MarketParams, addresses } from "../../src/index.js";
import { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi } from "./abis.js";
Expand All @@ -17,24 +17,6 @@ const params = new MarketParams({
lltv: parseUnits("86", 16),
});

declare module "../../src/index.js" {
interface MarketParams {
asArg: {
collateralToken: Address;
loanToken: Address;
oracle: Address;
irm: Address;
lltv: bigint;
};
}
}

Object.defineProperty(MarketParams.prototype, "asArg", {
get() {
return this;
},
});

describe("Market", () => {
test("should borrow borrowable assets", async ({ client }) => {
const collateral = parseUnits("1", 18);
Expand All @@ -57,7 +39,7 @@ describe("Market", () => {
address: morpho,
functionName: "borrow",
args: [
params.asArg,
{ ...params },
parseUnits("1", 6),
0n,
client.account.address,
Expand Down Expand Up @@ -122,7 +104,7 @@ describe("Market", () => {
address: morpho,
functionName: "borrow",
args: [
params.asArg,
{ ...params },
maxBorrowable + 10n,
0n,
client.account.address,
Expand All @@ -136,7 +118,7 @@ describe("Market", () => {
address: morpho,
functionName: "borrow",
args: [
params.asArg,
{ ...params },
maxBorrowable,
0n,
client.account.address,
Expand Down Expand Up @@ -172,7 +154,7 @@ describe("Market", () => {
address: morpho,
functionName: "borrow",
args: [
params.asArg,
{ ...params },
parseUnits("1", 6),
0n,
client.account.address,
Expand Down Expand Up @@ -251,7 +233,7 @@ describe("Market", () => {
address: morpho,
functionName: "borrow",
args: [
params.asArg,
{ ...params },
maxBorrowable,
0n,
client.account.address,
Expand Down

0 comments on commit 8502e8c

Please sign in to comment.