feat: make blockchain JSON RPC configurable from settings (#494)

* feat: make blockchain JSON RPC configurable from settings

* chore: expose the settings directly

* feat: restart bee node when blockchain RPC changes, add notification and error logging
This commit is contained in:
Vojtech Simetka
2022-07-27 08:45:03 +02:00
committed by GitHub
parent f82444f212
commit 408b565935
10 changed files with 126 additions and 78 deletions
+3 -1
View File
@@ -13,6 +13,7 @@ import { Loading } from '../../components/Loading'
import { SwarmButton } from '../../components/SwarmButton'
import { Context as BeeContext } from '../../providers/Bee'
import { Context as TopUpContext } from '../../providers/TopUp'
import { Context as SettingsContext } from '../../providers/Settings'
import { createGiftWallet } from '../../utils/desktop'
import { ResolvedWallet } from '../../utils/wallet'
import { Token } from '../../models/Token'
@@ -21,7 +22,8 @@ const GIFT_WALLET_FUND_DAI_AMOUNT = Token.fromDecimal('0.1', 18)
const GIFT_WALLET_FUND_BZZ_AMOUNT = Token.fromDecimal('0.5', 16)
export default function Index(): ReactElement {
const { giftWallets, addGiftWallet, provider } = useContext(TopUpContext)
const { giftWallets, addGiftWallet } = useContext(TopUpContext)
const { provider } = useContext(SettingsContext)
const { balance } = useContext(BeeContext)
const [loading, setLoading] = useState(false)