Compare commits

...

3 Commits

Author SHA1 Message Date
bee-worker 0603018f09 chore(master): release 0.19.3 (#527) 2022-08-24 22:23:17 +02:00
Cafe137 677b6de0f8 fix: pass isBeeDesktop from provider to hook (#525) 2022-08-24 22:02:34 +02:00
Adam Uhlíř 27f965ef63 ci: cleanup sentry removal (#523) 2022-08-24 21:25:17 +02:00
9 changed files with 26 additions and 43 deletions
-2
View File
@@ -20,8 +20,6 @@ jobs:
REACT_APP_BEE_HOST: https://api.test-node.staging.ethswarm.org/
REACT_APP_BEE_DEBUG_HOST: https://debug.test-node.staging.ethswarm.org/
REACT_APP_DEV_MODE: 1
REACT_APP_SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
REACT_APP_SENTRY_ENVIRONMENT: 'preview'
steps:
- uses: actions/checkout@v2
-13
View File
@@ -18,16 +18,3 @@ jobs:
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- id: cleanVersion
run: |
version="${{ github.event.release.release.tag_name }}"
echo "::set-output name=value::${version/v}"
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
sourcemaps: ./build/static/js
version: ${{ steps.cleanVersion.outputs.value }}
-3
View File
@@ -17,9 +17,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
env:
REACT_APP_SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
REACT_APP_SENTRY_ENVIRONMENT: 'pages'
- run: echo "dashboard.ethswarm.org" > ./build/CNAME
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
+7
View File
@@ -1,5 +1,12 @@
# Changelog
## [0.19.3](https://github.com/ethersphere/bee-dashboard/compare/v0.19.2...v0.19.3) (2022-08-24)
### Bug Fixes
* pass isBeeDesktop from provider to hook ([#525](https://github.com/ethersphere/bee-dashboard/issues/525)) ([677b6de](https://github.com/ethersphere/bee-dashboard/commit/677b6de0f82b02e1487420e3c08fbd19a949f97b))
## [0.19.2](https://github.com/ethersphere/bee-dashboard/compare/v0.19.1...v0.19.2) (2022-08-08)
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@ethersphere/bee-dashboard",
"version": "0.19.2",
"version": "0.19.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ethersphere/bee-dashboard",
"version": "0.19.2",
"version": "0.19.3",
"license": "BSD-3-Clause",
"dependencies": {
"@ethersphere/bee-js": "^5.0.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ethersphere/bee-dashboard",
"version": "0.19.2",
"version": "0.19.3",
"description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
"keywords": [
"bee",
+4 -4
View File
@@ -1,8 +1,8 @@
import { renderHook } from '@testing-library/react-hooks'
import express from 'express'
import cors from 'cors'
import express from 'express'
import type { Server } from 'http'
import { useIsBeeDesktop } from './apiHooks'
import { useBeeDesktop } from './apiHooks'
interface AddressInfo {
address: string
@@ -39,9 +39,9 @@ afterAll(async () => {
await new Promise(resolve => serverCorrect.close(resolve))
})
describe('useIsBeeDesktop', () => {
describe('useBeeDesktop', () => {
it('should not have error when connected to bee-desktop', async () => {
const { result, waitFor } = renderHook(() => useIsBeeDesktop(true, { BEE_DESKTOP_URL: serverCorrectURL }))
const { result, waitFor } = renderHook(() => useBeeDesktop(true, { BEE_DESKTOP_URL: serverCorrectURL }))
await waitFor(() => {
expect(result.current.isLoading).toBe(false)
+3 -8
View File
@@ -1,8 +1,8 @@
import axios from 'axios'
import { useEffect, useState } from 'react'
import { config } from '../config'
import { getJson } from '../utils/net'
import { getLatestBeeDesktopVersion } from '../utils/desktop'
import { getJson } from '../utils/net'
export interface LatestBeeReleaseHook {
latestBeeRelease: LatestBeeRelease | null
@@ -10,7 +10,7 @@ export interface LatestBeeReleaseHook {
error: Error | null
}
export interface IsBeeDesktopHook {
export interface BeeDesktopHook {
error: Error | null
isLoading: boolean
beeDesktopVersion: string
@@ -25,12 +25,7 @@ interface Config {
BEE_DESKTOP_URL: string
}
/**
* Detect if the dashboard is run within bee-desktop
*
* @returns isBeeDesktop true if this is run within bee-desktop
*/
export const useIsBeeDesktop = (isBeeDesktop = false, conf: Config = config): IsBeeDesktopHook => {
export const useBeeDesktop = (isBeeDesktop = false, conf: Config = config): BeeDesktopHook => {
const [desktopAutoUpdateEnabled, setDesktopAutoUpdateEnabled] = useState<boolean>(true)
const [beeDesktopVersion, setBeeDesktopVersion] = useState<string>('')
const [isLoading, setLoading] = useState<boolean>(true)
+9 -10
View File
@@ -1,21 +1,20 @@
import { ReactElement, useContext } from 'react'
import { Button } from '@material-ui/core'
import Wallet from 'remixicon-react/Wallet3LineIcon'
import { ReactElement, useContext } from 'react'
import { useNavigate } from 'react-router'
import ExchangeFunds from 'remixicon-react/ExchangeFundsLineIcon'
import Upload from 'remixicon-react/UploadLineIcon'
import Wallet from 'remixicon-react/Wallet3LineIcon'
import Card from '../../components/Card'
import ExpandableListItem from '../../components/ExpandableListItem'
import Map from '../../components/Map'
import { useBeeDesktop, useNewBeeDesktopVersion } from '../../hooks/apiHooks'
import { Context as BeeContext } from '../../providers/Bee'
import { Context as SettingsContext } from '../../providers/Settings'
import { Context as BalanceProvider } from '../../providers/WalletBalance'
import Card from '../../components/Card'
import Map from '../../components/Map'
import ExpandableListItem from '../../components/ExpandableListItem'
import { useNavigate } from 'react-router'
import { ROUTES } from '../../routes'
import { useIsBeeDesktop, useNewBeeDesktopVersion } from '../../hooks/apiHooks'
import { chainIdToName } from '../../utils/chain'
import { BEE_DESKTOP_LATEST_RELEASE_PAGE } from '../../utils/desktop'
import NodeInfoCard from './NodeInfoCard'
import { chainIdToName } from '../../utils/chain'
export default function Status(): ReactElement {
const {
@@ -30,7 +29,7 @@ export default function Status(): ReactElement {
} = useContext(BeeContext)
const { isBeeDesktop } = useContext(SettingsContext)
const { balance, error } = useContext(BalanceProvider)
const { beeDesktopVersion } = useIsBeeDesktop()
const { beeDesktopVersion } = useBeeDesktop(isBeeDesktop)
const { newBeeDesktopVersion } = useNewBeeDesktopVersion(isBeeDesktop)
const navigate = useNavigate()