feat: update to bee 0.6.0 and bee-js 0.9.0 (#99)

* chore: update the interfaces to latest bee-js

* chore: update to latest bee-js

* chore: removed upload page, updated to latest bee-js

* chore: typo in src/pages/files/index.tsx

Co-authored-by: Attila Gazso <agazso@gmail.com>

* chore: update to bee-js 0.9.0

Co-authored-by: Attila Gazso <agazso@gmail.com>
This commit is contained in:
Vojtech Simetka
2021-05-20 18:45:35 +02:00
committed by GitHub
parent edd4a2fc11
commit 7f5fbd3fb6
11 changed files with 70 additions and 123 deletions
+8 -8
View File
@@ -325,8 +325,8 @@ export interface Settlement {
}
export interface Settlements {
totalreceived: Token
totalsent: Token
totalReceived: Token
totalSent: Token
settlements: Settlement[]
}
@@ -345,10 +345,10 @@ export const useApiSettlements = (): SettlementsHook => {
setLoading(true)
beeDebugApi.settlements
.getSettlements()
.then(({ totalreceived, settlements, totalsent }) => {
.then(({ totalReceived, settlements, totalSent }) => {
const set = {
totalreceived: new Token(totalreceived),
totalsent: new Token(totalsent),
totalReceived: new Token(totalReceived),
totalSent: new Token(totalSent),
settlements: settlements.map(({ peer, received, sent }) => ({
peer,
received: new Token(received),
@@ -370,7 +370,7 @@ export const useApiSettlements = (): SettlementsHook => {
export interface LastCashout {
peer: string
cumulativePayout: Token
uncashedAmount: Token
}
export interface PeerLastCashoutHook {
@@ -388,8 +388,8 @@ export const useApiPeerLastCashout = (peerId: string): PeerLastCashoutHook => {
setLoading(true)
beeDebugApi.chequebook
.getPeerLastCashout(peerId)
.then(({ peer, cumulativePayout }) => {
setPeerCashout({ peer, cumulativePayout: new Token(cumulativePayout) })
.then(({ peer, uncashedAmount }) => {
setPeerCashout({ peer, uncashedAmount: new Token(uncashedAmount.toString()) })
})
.catch(error => {
setError(error)