+
input.onInput($event)"
@tokenKeyChanged="
diff --git a/composables/useStrategy.ts b/composables/useStrategy.ts
index 46b5d2e..f50c9ef 100644
--- a/composables/useStrategy.ts
+++ b/composables/useStrategy.ts
@@ -45,7 +45,7 @@ export function useStrategy(defineStrategy: DefineStrategy) {
strategy.onUpdated(async () => {
await nextTick();
- inputs.value = strategy.inputs;
+ // inputs.value = strategy.inputs;
console.log("onUpdated");
});
@@ -66,8 +66,6 @@ export function useStrategy(defineStrategy: DefineStrategy) {
showPendingTransaction(tx);
close();
} catch (e) {
- console.error(e);
-
error.value = e.message;
}
pending.value = false;
diff --git a/composables/useTenderly.ts b/composables/useTenderly.ts
index 753615f..05c1d2a 100644
--- a/composables/useTenderly.ts
+++ b/composables/useTenderly.ts
@@ -54,14 +54,16 @@ export function useTenderly() {
const stopSimulation = async () => {
loading.value = true;
try {
- await axios({
- method: "delete",
- url: `https://api.tenderly.co/api/v1/account/${$config.TENDERLY_FORK_PATH}/fork/${forkId.value}`,
- headers: {
- "X-Access-key": $config.TENDERLY_KEY,
- "Content-Type": "application/json"
- }
- });
+ if (forkId.value) {
+ await axios({
+ method: "delete",
+ url: `https://api.tenderly.co/api/v1/account/${$config.TENDERLY_FORK_PATH}/fork/${forkId.value}`,
+ headers: {
+ "X-Access-key": $config.TENDERLY_KEY,
+ "Content-Type": "application/json"
+ }
+ });
+ }
} catch (error) {}
forkId.value = null;
@@ -106,6 +108,6 @@ export function useTenderly() {
canSimulate,
startSimulation,
stopSimulation,
- loading,
+ loading
};
}
diff --git a/composables/useWeb3.ts b/composables/useWeb3.ts
index 9f6f1f4..75ecefc 100644
--- a/composables/useWeb3.ts
+++ b/composables/useWeb3.ts
@@ -1,4 +1,4 @@
-import { computed, onMounted, ref, watch } from "@nuxtjs/composition-api";
+import { computed, onMounted, ref } from "@nuxtjs/composition-api";
import Web3 from "web3";
import { SafeAppWeb3Modal } from "@gnosis.pm/safe-apps-web3modal";
import { Network } from "./useNetwork";
@@ -134,10 +134,6 @@ export function useWeb3() {
web3.value = newWeb3;
};
- watch(web3, () => {
- window.web3 = web3.value;
- });
-
return {
account,
chainId,
diff --git a/core/strategies/helpers/strategy.ts b/core/strategies/helpers/strategy.ts
index c1c21bd..3c52930 100644
--- a/core/strategies/helpers/strategy.ts
+++ b/core/strategies/helpers/strategy.ts
@@ -49,7 +49,13 @@ export class Strategy {
continue;
}
+ if(input.defaulted){
+ continue;
+ }
+
Object.assign(input, input.defaults(this.getBaseContext()));
+
+ input.defaulted = true;
}
this.notifyListeners();