Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 786d624e18 | |||
| 33fff93cac | |||
| 498294e227 | |||
| c8efa859df | |||
| afb8c31d9a | |||
| e5bc658327 | |||
| acee8c9802 | |||
| f297cf803f | |||
| 477c2385b1 | |||
| 56457eb9b9 |
@@ -27,3 +27,4 @@ jobs:
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
with:
|
||||
sourcemaps: ./build/static/js
|
||||
version: ${{ github.ref }}
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# Changelog
|
||||
|
||||
## [0.18.2](https://github.com/ethersphere/bee-dashboard/compare/v0.18.1...v0.18.2) (2022-07-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* don't link to latest release ([#477](https://github.com/ethersphere/bee-dashboard/issues/477)) ([498294e](https://github.com/ethersphere/bee-dashboard/commit/498294e227baa52c59adecf9c4cfd205061ddf75))
|
||||
* enable desktop update notifications on all platforms ([#476](https://github.com/ethersphere/bee-dashboard/issues/476)) ([33fff93](https://github.com/ethersphere/bee-dashboard/commit/33fff93cac31ec54b02f9c7d0c90c13c8d3763c7))
|
||||
|
||||
## [0.18.1](https://github.com/ethersphere/bee-dashboard/compare/v0.18.0...v0.18.1) (2022-07-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* refresh balance after dai tx ([#470](https://github.com/ethersphere/bee-dashboard/issues/470)) ([477c238](https://github.com/ethersphere/bee-dashboard/commit/477c2385b1d06da499facebf630338eb90ad22e7))
|
||||
* refresh dai after spending gas ([#468](https://github.com/ethersphere/bee-dashboard/issues/468)) ([56457eb](https://github.com/ethersphere/bee-dashboard/commit/56457eb9b989ed00c3b87555a43da7024654667d))
|
||||
* refresh gift wallet after swap ([#465](https://github.com/ethersphere/bee-dashboard/issues/465)) ([afb8c31](https://github.com/ethersphere/bee-dashboard/commit/afb8c31d9a022033cee14ff9a951f87cb992636f))
|
||||
* status checks have timeout ([#471](https://github.com/ethersphere/bee-dashboard/issues/471)) ([acee8c9](https://github.com/ethersphere/bee-dashboard/commit/acee8c9802318deb64d2bd8e701fae15c10d5fcf))
|
||||
|
||||
## [0.18.0](https://github.com/ethersphere/bee-dashboard/compare/v0.17.0...v0.18.0) (2022-07-04)
|
||||
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@ethersphere/bee-dashboard",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ethersphere/bee-dashboard",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.2",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@ethersphere/bee-js": "^4.1.1",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ethersphere/bee-dashboard",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.2",
|
||||
"description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
|
||||
"keywords": [
|
||||
"bee",
|
||||
|
||||
@@ -29,12 +29,12 @@ const Dashboard = (props: Props): ReactElement => {
|
||||
const classes = useStyles()
|
||||
|
||||
const { isLoading } = useContext(Context)
|
||||
const { isBeeDesktop, desktopAutoUpdateEnabled } = useIsBeeDesktop()
|
||||
const { isBeeDesktop } = useIsBeeDesktop()
|
||||
const { newBeeDesktopVersion } = useNewBeeDesktopVersion(isBeeDesktop)
|
||||
const { enqueueSnackbar, closeSnackbar } = useSnackbar()
|
||||
|
||||
useEffect(() => {
|
||||
if (!desktopAutoUpdateEnabled && newBeeDesktopVersion !== '') {
|
||||
if (newBeeDesktopVersion !== '') {
|
||||
enqueueSnackbar(`There is new Swarm Dashboard version ${newBeeDesktopVersion}!`, {
|
||||
variant: 'warning',
|
||||
preventDuplicate: true,
|
||||
@@ -61,7 +61,7 @@ const Dashboard = (props: Props): ReactElement => {
|
||||
),
|
||||
})
|
||||
}
|
||||
}, [enqueueSnackbar, closeSnackbar, newBeeDesktopVersion, desktopAutoUpdateEnabled])
|
||||
}, [enqueueSnackbar, closeSnackbar, newBeeDesktopVersion])
|
||||
|
||||
const content = (
|
||||
<>
|
||||
|
||||
@@ -112,6 +112,7 @@ export default function Status(): ReactElement {
|
||||
variant="outlined"
|
||||
href={BEE_DESKTOP_LATEST_RELEASE_PAGE}
|
||||
target="_blank"
|
||||
disabled={newBeeDesktopVersion === ''}
|
||||
style={{ height: '26px' }}
|
||||
>
|
||||
{newBeeDesktopVersion === '' ? 'latest' : 'update'}
|
||||
@@ -133,6 +134,7 @@ export default function Status(): ReactElement {
|
||||
size="small"
|
||||
variant="outlined"
|
||||
href={latestBeeVersionUrl}
|
||||
disabled={isLatestBeeVersion}
|
||||
target="_blank"
|
||||
style={{ height: '26px' }}
|
||||
>
|
||||
|
||||
@@ -107,6 +107,7 @@ export function Swap({ header }: Props): ReactElement {
|
||||
} catch (error) {
|
||||
enqueueSnackbar(`Failed to swap: ${error}`, { variant: 'error' })
|
||||
} finally {
|
||||
balance?.refresh()
|
||||
setLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
+13
-12
@@ -21,6 +21,7 @@ import { Context as TopUpContext } from './TopUp'
|
||||
|
||||
const REFRESH_WHEN_OK = 30_000
|
||||
const REFRESH_WHEN_ERROR = 5_000
|
||||
const TIMEOUT = 3_000
|
||||
|
||||
export enum CheckState {
|
||||
OK = 'OK',
|
||||
@@ -270,7 +271,7 @@ export function Provider({ children }: Props): ReactElement {
|
||||
|
||||
// Wrap the chequebook balance call to return BZZ values as Token object
|
||||
const chequeBalanceWrapper = async () => {
|
||||
const { totalBalance, availableBalance } = await beeDebugApi.getChequebookBalance()
|
||||
const { totalBalance, availableBalance } = await beeDebugApi.getChequebookBalance({ timeout: TIMEOUT })
|
||||
|
||||
return {
|
||||
totalBalance: new Token(totalBalance),
|
||||
@@ -280,14 +281,14 @@ export function Provider({ children }: Props): ReactElement {
|
||||
|
||||
// Wrap the balances call to return BZZ values as Token object
|
||||
const peerBalanceWrapper = async () => {
|
||||
const { balances } = await beeDebugApi.getAllBalances()
|
||||
const { balances } = await beeDebugApi.getAllBalances({ timeout: TIMEOUT })
|
||||
|
||||
return balances.map(({ peer, balance }) => ({ peer, balance: new Token(balance) }))
|
||||
}
|
||||
|
||||
// Wrap the settlements call to return BZZ values as Token object
|
||||
const settlementsWrapper = async () => {
|
||||
const { totalReceived, settlements, totalSent } = await beeDebugApi.getAllSettlements()
|
||||
const { totalReceived, settlements, totalSent } = await beeDebugApi.getAllSettlements({ timeout: TIMEOUT })
|
||||
|
||||
return {
|
||||
totalReceived: new Token(totalReceived),
|
||||
@@ -303,55 +304,55 @@ export function Provider({ children }: Props): ReactElement {
|
||||
const promises = [
|
||||
// API health
|
||||
beeApi
|
||||
.isConnected()
|
||||
.isConnected({ timeout: TIMEOUT })
|
||||
.then(setApiHealth)
|
||||
.catch(() => setApiHealth(false)),
|
||||
|
||||
// Debug API health
|
||||
beeDebugApi
|
||||
.getHealth()
|
||||
.getHealth({ timeout: TIMEOUT })
|
||||
.then(setDebugApiHealth)
|
||||
.catch(() => setDebugApiHealth(null)),
|
||||
|
||||
// Node Addresses
|
||||
beeDebugApi
|
||||
.getNodeAddresses()
|
||||
.getNodeAddresses({ timeout: TIMEOUT })
|
||||
.then(setNodeAddresses)
|
||||
.catch(() => setNodeAddresses(null)),
|
||||
|
||||
// NodeInfo
|
||||
beeDebugApi
|
||||
.getNodeInfo()
|
||||
.getNodeInfo({ timeout: TIMEOUT })
|
||||
.then(setNodeInfo)
|
||||
.catch(() => setNodeInfo(null)),
|
||||
|
||||
// Network Topology
|
||||
beeDebugApi
|
||||
.getTopology()
|
||||
.getTopology({ timeout: TIMEOUT })
|
||||
.then(setNodeTopology)
|
||||
.catch(() => setNodeTopology(null)),
|
||||
|
||||
// Peers
|
||||
beeDebugApi
|
||||
.getPeers()
|
||||
.getPeers({ timeout: TIMEOUT })
|
||||
.then(setPeers)
|
||||
.catch(() => setPeers(null)),
|
||||
|
||||
// Chequebook address
|
||||
beeDebugApi
|
||||
.getChequebookAddress()
|
||||
.getChequebookAddress({ timeout: TIMEOUT })
|
||||
.then(setChequebookAddress)
|
||||
.catch(() => setChequebookAddress(null)),
|
||||
|
||||
// Cheques
|
||||
beeDebugApi
|
||||
.getLastCheques()
|
||||
.getLastCheques({ timeout: TIMEOUT })
|
||||
.then(setPeerCheques)
|
||||
.catch(() => setPeerCheques(null)),
|
||||
|
||||
// Chain state
|
||||
beeDebugApi
|
||||
.getChainState()
|
||||
.getChainState({ timeout: TIMEOUT })
|
||||
.then(setChainState)
|
||||
.catch(() => setChainState(null)),
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,4 @@
|
||||
import { providers, Wallet } from 'ethers'
|
||||
import { sleepMs } from '.'
|
||||
import { BzzToken } from '../models/BzzToken'
|
||||
import { DaiToken } from '../models/DaiToken'
|
||||
import { estimateNativeTransferTransactionCost, Rpc } from './rpc'
|
||||
@@ -61,7 +60,7 @@ export class ResolvedWallet {
|
||||
public async transfer(destination: string, jsonRpcProvider: string): Promise<void> {
|
||||
if (this.bzz.toDecimal.gt(0.05)) {
|
||||
await Rpc.sendBzzTransaction(this.privateKey, destination, this.bzz.toString, jsonRpcProvider)
|
||||
await sleepMs(5_000)
|
||||
await this.refresh()
|
||||
}
|
||||
|
||||
const { gasPrice, totalCost } = await estimateNativeTransferTransactionCost(this.privateKey, jsonRpcProvider)
|
||||
@@ -74,6 +73,7 @@ export class ResolvedWallet {
|
||||
jsonRpcProvider,
|
||||
gasPrice,
|
||||
)
|
||||
await this.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user