Skip to content

Commit

Permalink
infra tzwitter: bypass the vite build bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilevos committed Aug 16, 2023
1 parent b3b4853 commit e9201dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 08_tzwitter_app/app/src/lib/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RollupClient {
async getState(path: string) {
console.log('getState called with path:', path);
const rollupUrl = this.rollupUrl;
const url = `${rollupUrl}/global/block/head/durable/wasm_2_0_0/value?key=${path}`.replace("{}/", "");
const url = `${rollupUrl}/global/block/head/durable/wasm_2_0_0/value?key=${path}`.replace("{}/", "global/");
console.log('Constructed URL for getState:', url);
const res = await fetch(url);
if (!res.ok) {
Expand All @@ -60,7 +60,7 @@ class RollupClient {
async getSubkeys(path: string) {
console.log('getSubkeys called with path:', path);
const rollupUrl = this.rollupUrl;
const url = `${rollupUrl}/global/block/head/durable/wasm_2_0_0/subkeys?key=${path}`.replace("{}/", "");
const url = `${rollupUrl}/global/block/head/durable/wasm_2_0_0/subkeys?key=${path}`.replace("{}/", "global/");
console.log('Constructed URL for getSubkeys:', url);
const res = await fetch(url);
if (!res.ok) {
Expand All @@ -76,7 +76,7 @@ class RollupClient {
async tezosLevel(): Promise<number> {
console.log('tezosLevel called');
const rollupUrl = this.rollupUrl;
const url = `${rollupUrl}/global/tezos_level`;
const url = `${rollupUrl}/global/tezos_level`.replace("{}/", "global/");
console.log('Constructed URL for tezosLevel:', url);
const res = await fetch(url);
if (!res.ok) {
Expand All @@ -92,7 +92,7 @@ class RollupClient {
async getBlock(blockHash: string): Promise<RollupBlock> {
console.log('getBlock called with blockHash:', blockHash);
const rollupUrl = this.rollupUrl;
const url = `${rollupUrl}/global/block/${blockHash}`;
const url = `${rollupUrl}/global/block/${blockHash}`.replace("{}/", "global/");
console.log('Constructed URL for getBlock:', url);
const res = await fetch(url);
if (!res.ok) {
Expand Down

0 comments on commit e9201dc

Please sign in to comment.