Skip to content

Commit

Permalink
chore: update to use bee-js 5.0.0 and support bee 1.7.0 (#503)
Browse files Browse the repository at this point in the history
* chore: update to use bee-js 5.0.0 and support bee 1.7.0

* fix: store reference to feed manifest correctly

* fix: set waitForUsable to false (#507)

Co-authored-by: Cafe137 <[email protected]>
  • Loading branch information
vojtechsimetka and Cafe137 authored Aug 1, 2022
1 parent 896f6e4 commit 72488fd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
**Warning: This project is in alpha state. There might (and most probably will) be changes in the future to its API and
working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**

This project is intended to be used with **Bee version <!-- SUPPORTED_BEE_START -->1.6.0-6ceadd35<!-- SUPPORTED_BEE_END -->**.
This project is intended to be used with **Bee version <!-- SUPPORTED_BEE_START -->1.7.0-bbf13011<!-- SUPPORTED_BEE_END -->**.
Using it with older or newer Bee versions is not recommended and may not work. Stay up to date by joining the
[official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the
[releases tab](https://github.com/ethersphere/bee-dashboard/releases).
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"url": "https://github.com/ethersphere/bee-dashboard.git"
},
"dependencies": {
"@ethersphere/bee-js": "^4.1.1",
"@ethersphere/bee-js": "^5.0.0",
"@ethersphere/manifest-js": "1.2.1",
"@ethersphere/swarm-cid": "^0.1.0",
"@material-ui/core": "4.12.3",
Expand Down Expand Up @@ -156,7 +156,7 @@
]
},
"engines": {
"node": ">=12.0.0",
"node": ">=14.0.0",
"npm": ">=6.9.0",
"bee": ">=0.6.0"
}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/stamps/PostageStampCreation.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { PostageBatchOptions } from '@ethersphere/bee-js'
import { Box, Grid, Typography } from '@material-ui/core'
import BigNumber from 'bignumber.js'
import { Form, Formik, FormikHelpers } from 'formik'
Expand Down Expand Up @@ -102,7 +103,7 @@ export function PostageStampCreation({ onFinished }: Props): ReactElement {

const amount = BigInt(values.amount)
const depth = Number.parseInt(values.depth)
const options = values.label ? { label: values.label } : undefined
const options: PostageBatchOptions = { waitForUsable: false, label: values.label || undefined }
const batchId = await beeDebugApi.createPostageBatch(amount.toString(), depth, options)
await waitUntilStampExists(batchId, beeDebugApi)
actions.resetForm()
Expand Down
2 changes: 1 addition & 1 deletion src/utils/identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export async function updateFeed(
const wallet = await getWalletFromIdentity(identity, password)

if (!identity.feedHash) {
identity.feedHash = await beeApi.createFeedManifest(stamp, 'sequence', '00'.repeat(32), wallet.address)
identity.feedHash = (await beeApi.createFeedManifest(stamp, 'sequence', '00'.repeat(32), wallet.address)).reference
}

const writer = beeApi.makeFeedWriter('sequence', '00'.repeat(32), wallet.privateKey)
Expand Down

0 comments on commit 72488fd

Please sign in to comment.