Skip to content

Commit

Permalink
Change opg requests
Browse files Browse the repository at this point in the history
  • Loading branch information
GusevPM committed Oct 2, 2023
1 parent 8aec956 commit 5cabed6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/api/bcd.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,7 @@ export class BetterCallApi {
if (with_storage_diff) {
params.with_storage_diff = with_storage_diff;
}
if (network) {
params.network = network
}
return getCancellable(this.api, `/opg/${hash}`, {
return getCancellable(this.api, `/opg/${network}/${hash}`, {
params: params,
})
.then((res) => {
Expand Down Expand Up @@ -508,11 +505,7 @@ export class BetterCallApi {
}

getOperationsByHashAndCounter(hash, counter, network=null) {
let params = {};
if (network) {
params['network'] = network;
}
return getCancellable(this.api, `/opg/${hash}/${counter}`, params)
return getCancellable(this.api, `/opg/${network}/${hash}/${counter}`, {})
.then((res) => {
if (res.status != 200) {
throw new RequestFailedError(res);
Expand Down
2 changes: 1 addition & 1 deletion src/views/extended_search/cards/Operation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default {
if (this.loading) return;
this.loading = true;
this.api.getOPG(item.body.Hash)
this.api.getOPG(item.body.Hash, true, false, item.body.Network)
.then(opg => {
if (opg.length > 0){
this.info = opg[0];
Expand Down

0 comments on commit 5cabed6

Please sign in to comment.