From 0edc89d94ddc9dafea81d2f3f02389898792bbbd Mon Sep 17 00:00:00 2001 From: SilentRhetoric Date: Sun, 21 Jan 2024 17:05:30 -0500 Subject: [PATCH] Solid reactivity work --- examples/solid-ts/package.json | 2 +- examples/solid-ts/src/Connect.tsx | 38 ++++++++++-- packages/use-wallet-solid/src/useWallet.ts | 67 ++++++++++++++-------- pnpm-lock.yaml | 2 +- 4 files changed, 80 insertions(+), 29 deletions(-) diff --git a/examples/solid-ts/package.json b/examples/solid-ts/package.json index 83e34f5..11ff22d 100644 --- a/examples/solid-ts/package.json +++ b/examples/solid-ts/package.json @@ -16,7 +16,7 @@ "@txnlab/use-wallet-solid": "workspace:*", "@walletconnect/modal": "^2.6.2", "@walletconnect/sign-client": "^2.10.2", - "algosdk": "^2.6.0", + "algosdk": "^2.7.0", "solid-js": "^1.8.7" }, "devDependencies": { diff --git a/examples/solid-ts/src/Connect.tsx b/examples/solid-ts/src/Connect.tsx index ece83de..42ebb0e 100644 --- a/examples/solid-ts/src/Connect.tsx +++ b/examples/solid-ts/src/Connect.tsx @@ -1,8 +1,23 @@ +import { NetworkId } from '@txnlab/use-wallet-js' import { useWallet } from '@txnlab/use-wallet-solid' import { For, Show } from 'solid-js' +import encoding from 'algosdk' export function Connect() { - const { wallets } = useWallet() + const { + wallets, + activeNetwork, + setActiveNetwork, + activeWallet, + activeWalletId, + walletStateMap, + activeWalletAccounts, + activeWalletAddresses, + activeAccount, + activeAddress, + algodClient, + manager + } = useWallet() return (
@@ -11,7 +26,7 @@ export function Connect() {

{wallet.metadata.name}{' '} - + [active]

@@ -29,13 +44,13 @@ export function Connect() {
- 0}> + 0}>