Skip to content

Commit

Permalink
feat: establish isConnected prop internally
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermendes committed Nov 11, 2024
1 parent bef645a commit 5decd27
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Wrap your application in a `StakingProvider`:
import { StakingProvider } from '@aurora-is-near/staking';

<StakingProvider
isConnected
network="mainnet"
getStreamPrices={() => ({
prices: [100, 200],
Expand Down
4 changes: 1 addition & 3 deletions src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { config } from './config';
import { logger } from './logger';

type StakingProviderProps = {
isConnected: boolean;
network: AuroraNetwork;
children: ReactNode;
getStreamPrices: (streamNames: string[]) => Promise<{
Expand All @@ -51,7 +50,6 @@ type StakingProviderProps = {
};

export const StakingProvider = ({
isConnected,
network,
children,
getStreamPrices,
Expand Down Expand Up @@ -113,7 +111,7 @@ export const StakingProvider = ({
const [totalApr, setTotalApr] = useState(0);
const [auroraApr, setAuroraApr] = useState(0);
const [stakedPct, setStakedPct] = useState(0);
const { address: account } = useAccount();
const { isConnected, address: account } = useAccount();
const web3Provider = useWeb3Provider();
const { switchChain } = useSwitchChain();
const chainId = useChainId();
Expand Down

0 comments on commit 5decd27

Please sign in to comment.