feat: bee-js revamp (#690)

* chore: initial commit

* refactor: remove unnecessary wrappers

* style: add missing newline

* chore: bump bee-js

* chore: ignore any cast in fdp

* fix: remove cid import

* fix: make TextEncoder and TextDecoder available in jest

* refactor: dedupe stamp ttl second conversion

* refactor: use convenience methods from bee-js

* feat: update to bee-js for restored ens support

* fix: bump bee-js to get download fix

* fix: resolve feed before downloading reference

* fix: fix token displays

* fix: fix token input modal error message

* refactor: remove wallet balance provider

* chore: remove dead code

* refactor: upcoming bee js 0.15.0 (#692)

* chore: initial commit

* fix: do not break page when duration seconds is 0

* ci: remove cache

* chore: upgrade bee-js

* feat: bee-js and bee v2.6 compatibility

* chore: switch upcoming/bee-js to ethersphere/bee-js
This commit is contained in:
Cafe137
2025-07-16 17:10:14 +02:00
committed by GitHub
parent 082a8f52ef
commit 1249c0df71
62 changed files with 675 additions and 16303 deletions
+6 -8
View File
@@ -5,16 +5,14 @@ import ExpandableListItemActions from '../../../components/ExpandableListItemAct
import { Loading } from '../../../components/Loading'
import TroubleshootConnectionCard from '../../../components/TroubleshootConnectionCard'
import StakeModal from '../../../containers/StakeModal'
import { CheckState, Context as BeeContext } from '../../../providers/Bee'
import { Context as BalanceContext } from '../../../providers/WalletBalance'
import { Context as BeeContext, CheckState } from '../../../providers/Bee'
import { AccountNavigation } from '../AccountNavigation'
import { Header } from '../Header'
export function AccountStaking(): ReactElement {
const [loading, setLoading] = useState(false)
const { status, stake } = useContext(BeeContext)
const { balance } = useContext(BalanceContext)
const { status, stake, walletBalance } = useContext(BeeContext)
if (status.all === CheckState.ERROR) return <TroubleshootConnectionCard />
@@ -31,15 +29,15 @@ export function AccountStaking(): ReactElement {
<Header />
<AccountNavigation active="STAKING" />
<div>
{loading || stake?.toDecimal === undefined ? (
{loading || !stake ? (
<Loading />
) : (
<ExpandableList label="Staking" defaultOpen>
<ExpandableListItem label="Staked BZZ" value={`${stake?.toSignificantDigits()} xBZZ`} />
{balance?.bzz ? (
<ExpandableListItem label="Staked BZZ" value={`${stake?.toSignificantDigits(4)} xBZZ`} />
{walletBalance?.bzzBalance ? (
<ExpandableListItem
label="Available xBZZ balance"
value={`${balance?.bzz.toSignificantDigits(4)} xBZZ`}
value={`${walletBalance.bzzBalance.toSignificantDigits(4)} xBZZ`}
/>
) : null}
<ExpandableListItemActions>