Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
terencehh committed Aug 14, 2024
1 parent 53f479d commit 9a397fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
2 changes: 0 additions & 2 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 14 additions & 16 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@ import {
} from 'react-router-dom';
import Wallet, { AddressPurpose, BitcoinNetworkType, type Address } from 'sats-connect';
import { Button, ConnectButtonsContainer, Header, Logo } from './App.styles';
import {
AddressDisplay,
EtchRunes,
MintRunes,
NetworkSelector,
SendBtc,
SendStx,
} from './components';
import { GetAccounts } from './components/bitcoin/GetAccounts';
import GetBtcBalance from './components/GetBtcBalance';
import GetInscriptions from './components/GetInscriptions';
import GetRunesBalance from './components/GetRunesBalance';
import SendInscription from './components/sendInscriptions';
import { SignMessage } from './components/SignMessage';
import { GetBtcBalance } from './components/bitcoin/GetBtcBalance';
import { SignMessage } from './components/bitcoin/SignMessage';
import { GetInscriptions } from './components/GetInscriptions';
import { GetRunesBalance } from './components/GetRunesBalance';
import { SendInscription } from './components/sendInscriptions';
import SignTransaction from './components/signTransaction';

import AddressDisplay from './components/AddressDisplay';
import { SendBtc } from './components/bitcoin/SendBtc';
import EtchRunes from './components/EtchRunes';
import MintRunes from './components/MintRunes';
import { NetworkSelector } from './components/NetworkSelector';
import { SendSip10 } from './components/stacks/SendSip10';
import { SendStx } from './components/stacks/SendStx';
import { WalletType } from './components/wallet/WalletType';
import { useLocalStorage } from './hooks';
import { CollapseDesktop } from './layouts/CollapseDesktop';
Expand Down Expand Up @@ -82,11 +81,10 @@ function AppWithProviders({ children }: React.PropsWithChildren<{}>) {
message: 'Cool app wants to know your addresses!',
});
if (response.status === 'success') {
setBtcAddressInfo([response.result[0], response.result[1]]);
if (response.result[2]) setStxAddressInfo([response.result[2]]);
setLegacyAddressInfo(response.result);
}
})().catch(console.error);
}, [setBtcAddressInfo, setStxAddressInfo]);
}, [setLegacyAddressInfo]);

const onConnect = useCallback(() => {
(async () => {
Expand Down

0 comments on commit 9a397fb

Please sign in to comment.