chore: update bee-js to 0.8.1 version (#78)

* chore: upgrade to bee-js 0.8.1

* refactor: removed toString on number types, Token now accepts numbers

* test: removed fromBZZbaseUnit test, makeBigNumber accepts number now

* chore: fix logic error when displaying Cashout button
This commit is contained in:
Vojtech Simetka
2021-04-23 11:43:48 +02:00
committed by GitHub
parent d77e184d6a
commit a0f1d1c50a
16 changed files with 276 additions and 210 deletions
+10 -1
View File
@@ -1,4 +1,6 @@
import { ChequebookAddressResponse } from '@ethersphere/bee-js'
import {
ChequebookBalance,
useApiChequebookAddress,
useApiChequebookBalance,
useApiHealth,
@@ -8,6 +10,11 @@ import {
useLatestBeeRelease,
} from './apiHooks'
export interface StatusChequebookHook extends StatusHookCommon {
chequebookBalance: ChequebookBalance | null
chequebookAddress: ChequebookAddressResponse | null
}
export const useStatusNodeVersion = (): StatusNodeVersionHook => {
const { latestBeeRelease, isLoadingLatestBeeRelease } = useLatestBeeRelease()
const { nodeHealth, isLoadingNodeHealth } = useDebugApiHealth()
@@ -66,7 +73,9 @@ export const useStatusChequebook = (): StatusChequebookHook => {
return {
isLoading: isLoadingChequebookAddress || isLoadingChequebookBalance,
isOk:
Boolean(chequebookAddress?.chequebookaddress) && chequebookBalance !== null && chequebookBalance.totalBalance > 0,
Boolean(chequebookAddress?.chequebookaddress) &&
chequebookBalance !== null &&
chequebookBalance?.totalBalance.toBigNumber.isGreaterThan(0),
chequebookBalance,
chequebookAddress,
}