diff --git a/composables/useStrategy.ts b/composables/useStrategy.ts index f50c9ef..a87be44 100644 --- a/composables/useStrategy.ts +++ b/composables/useStrategy.ts @@ -42,13 +42,9 @@ export function useStrategy(defineStrategy: DefineStrategy) { const error = ref(""); const pending = ref(false); - strategy.onUpdated(async () => { - await nextTick(); - - // inputs.value = strategy.inputs; - - console.log("onUpdated"); - }); + // strategy.onUpdated(async () => { + // await nextTick(); + // }); const submit = async () => { error.value = ""; diff --git a/core/strategies/helpers/strategy.ts b/core/strategies/helpers/strategy.ts index 3c52930..b015a41 100644 --- a/core/strategies/helpers/strategy.ts +++ b/core/strategies/helpers/strategy.ts @@ -49,12 +49,12 @@ export class Strategy { continue; } - if(input.defaulted){ - continue; + if (input.defaulted) { + continue; } Object.assign(input, input.defaults(this.getBaseContext())); - + input.defaulted = true; } diff --git a/core/strategies/protocols/aave-v2/deposit-and-borrow.ts b/core/strategies/protocols/aave-v2/deposit-and-borrow.ts index dba44c0..c85daa6 100644 --- a/core/strategies/protocols/aave-v2/deposit-and-borrow.ts +++ b/core/strategies/protocols/aave-v2/deposit-and-borrow.ts @@ -17,6 +17,8 @@ export default defineStrategy({
  • Borrow Debt
  • `, + submitText: 'Deposit & Borrow', + author: "Instadapp Team", variables: { @@ -117,6 +119,7 @@ export default defineStrategy({ stats.totalMaxBorrowLimitInEth = toBN(priceInEth) .times(factor) + .times(supply) .plus(stats.totalMaxBorrowLimitInEth) .toFixed(); diff --git a/core/strategies/protocols/aave-v2/payback-and-withdraw.ts b/core/strategies/protocols/aave-v2/payback-and-withdraw.ts index 5dcbae2..97e8542 100644 --- a/core/strategies/protocols/aave-v2/payback-and-withdraw.ts +++ b/core/strategies/protocols/aave-v2/payback-and-withdraw.ts @@ -1,3 +1,4 @@ +import BigNumber from "bignumber.js"; import tokens from "~/constant/tokens"; import { defineStrategy, @@ -12,6 +13,8 @@ export default defineStrategy({ description: "Payback debt & withdraw collateral in a single txn.", author: "Instadapp Team", + submitText: "Payback & Withdraw", + details: `

    This strategy executes: