feat: add loading state to wallet balance (#508)

* feat: add loading state to wallet balance

* refactor: extract the wallet balance into a provider
This commit is contained in:
Vojtech Simetka
2022-08-03 14:09:24 +02:00
committed by GitHub
parent a7bd94af82
commit b9c008f019
10 changed files with 150 additions and 59 deletions
+3 -1
View File
@@ -13,13 +13,15 @@ import { SwarmButton } from '../../../components/SwarmButton'
import TroubleshootConnectionCard from '../../../components/TroubleshootConnectionCard'
import { CheckState, Context as BeeContext } from '../../../providers/Bee'
import { Context as SettingsContext } from '../../../providers/Settings'
import { Context as BalanceProvider } from '../../../providers/WalletBalance'
import { ROUTES } from '../../../routes'
import { AccountNavigation } from '../AccountNavigation'
import { Header } from '../Header'
export function AccountWallet(): ReactElement {
const { balance, nodeAddresses, nodeInfo, status } = useContext(BeeContext)
const { nodeAddresses, nodeInfo, status } = useContext(BeeContext)
const { isBeeDesktop } = useContext(SettingsContext)
const { balance } = useContext(BalanceProvider)
const navigate = useNavigate()