From 6d37ff5adb21a14194358a1c5e027359381d92c5 Mon Sep 17 00:00:00 2001 From: Christophe Le Bars Date: Sun, 11 Sep 2022 14:37:16 +0200 Subject: [PATCH] typo+deprecation warnings --- examples/svelte-vite-template-web3/src/Contracts.svelte | 2 +- src/stores.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/svelte-vite-template-web3/src/Contracts.svelte b/examples/svelte-vite-template-web3/src/Contracts.svelte index 24546a4..2368c4b 100644 --- a/examples/svelte-vite-template-web3/src/Contracts.svelte +++ b/examples/svelte-vite-template-web3/src/Contracts.svelte @@ -53,7 +53,7 @@ {:else}

- Please first connect + Please first connect connect to the görli network to be able to use this page.

diff --git a/src/stores.js b/src/stores.js index fd15c69..24c211f 100644 --- a/src/stores.js +++ b/src/stores.js @@ -159,7 +159,10 @@ export const createStore = () => { emit() } - const setBrowserProvider = () => setProvider() + const setBrowserProvider = () => { + console.warn('[svelte-web3] setBrowserProvider is deprecated. Please use setProvider() without argument instead.') + return setProvider() + } const disconnect = async () => { init() @@ -323,7 +326,7 @@ export const walletType = allStores.default.walletType // TODO legacy makeContractStore to be removed export const makeContractStore = (abi, address, defaults = {}) => - console.warn('makeContractStore is deprecated. Please use teh new $contracts store') + console.warn('[svelte-web3] makeContractStore is deprecated. Please use the new $contracts store') derived([web3, connected], ([$web3, $connected]) => { if ($connected && $web3.eth) { return new $web3.eth.Contract(abi, address, defaults)