Compare commits

..

10 Commits

Author SHA1 Message Date
bee-worker 786d624e18 chore(master): release 0.18.2 (#478) 2022-07-06 11:34:35 +02:00
Adam Uhlíř 33fff93cac fix: enable desktop update notifications on all platforms (#476) 2022-07-06 11:27:48 +02:00
Adam Uhlíř 498294e227 fix: don't link to latest release (#477) 2022-07-06 11:27:41 +02:00
bee-worker c8efa859df chore(master): release 0.18.1 (#469)
* chore(master): release 0.18.1

* chore: empty commit

Co-authored-by: Adam Uhlíř <adam@uhlir.dev>
2022-07-05 17:13:22 +02:00
Cafe137 afb8c31d9a fix: refresh gift wallet after swap (#465)
* fix: refresh gift wallet after swap

* fix: also refresh wallet after transfer

* chore: revert fund
2022-07-05 16:22:06 +02:00
Adam Uhlíř e5bc658327 chore: lower timeout (#472) 2022-07-05 16:14:21 +02:00
Adam Uhlíř acee8c9802 fix: status checks have timeout (#471) 2022-07-05 15:53:18 +02:00
Adam Uhlíř f297cf803f ci: sentry release version fix (#467) 2022-07-05 15:52:56 +02:00
Cafe137 477c2385b1 fix: refresh balance after dai tx (#470) 2022-07-05 15:24:18 +02:00
Cafe137 56457eb9b9 fix: refresh dai after spending gas (#468) 2022-07-05 14:01:49 +02:00
9 changed files with 43 additions and 20 deletions
+1
View File
@@ -27,3 +27,4 @@ jobs:
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
sourcemaps: ./build/static/js
version: ${{ github.ref }}
+18
View File
@@ -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)
+2 -2
View File
@@ -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
View File
@@ -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",
+3 -3
View File
@@ -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 = (
<>
+2
View File
@@ -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' }}
>
+1
View File
@@ -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
View File
@@ -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
View File
@@ -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()
}
}
}