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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user