Skip to content

Commit

Permalink
typo+deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
clbrge committed Sep 11, 2022
1 parent 7aaa939 commit 6d37ff5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/svelte-vite-template-web3/src/Contracts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{:else}

<p>
Please first <a href="/setproviders">connect</a>
Please first <a href="/setprovider">connect</a>
connect to the görli network to be able to use this page.
</p>

Expand Down
7 changes: 5 additions & 2 deletions src/stores.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6d37ff5

Please sign in to comment.