diff --git a/components/sidebar/context/strategy/SidebarStrategy.vue b/components/sidebar/context/strategy/SidebarStrategy.vue index 24bcf79..294df18 100644 --- a/components/sidebar/context/strategy/SidebarStrategy.vue +++ b/components/sidebar/context/strategy/SidebarStrategy.vue @@ -24,7 +24,7 @@
-
+
{ 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();