refactor: debug api balances

This commit is contained in:
Vojtech Simetka
2021-04-02 11:08:00 +02:00
parent f949bdffc6
commit d2708738ce
2 changed files with 2 additions and 11 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ export const useApiPeerBalances = () => {
setLoading(true) setLoading(true)
beeDebugApi.balance.balances() beeDebugApi.balance.balances()
.then(res => { .then(res => {
setPeerBalances(res.data) setPeerBalances(res)
}) })
.catch(error => { .catch(error => {
setError(error) setError(error)
+1 -10
View File
@@ -71,16 +71,7 @@ export const beeDebugApi = {
}, },
balance: { balance: {
balances() { balances() {
return beeDebugApiClient().get(`/balances`) return beeJSDebugClient().getAllBalances()
},
peerBalance(peerId: string) {
return beeDebugApiClient().get(`/balances/${peerId}`)
},
consumed() {
return beeDebugApiClient().get(`/consumed`)
},
peerConsumed(peerId: string) {
return beeDebugApiClient().get(`/consumed/${peerId}`)
} }
}, },
chequebook: { chequebook: {