Skip to content

Commit

Permalink
silence errors
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Oct 3, 2023
1 parent b9a877f commit 58e67fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/nitro-rpc-client/src/transport/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
RequestMethod,
RPCRequestAndResponses,
} from "../types";
import { getAndValidateNotification } from "../serde";

import { Transport } from ".";
import { getAndValidateNotification, getAndValidateResult } from "../serde";

export class HttpTransport {
Notifications: EventEmitter<NotificationMethod, NotificationParams>;
Expand Down
4 changes: 2 additions & 2 deletions packages/payment-proxy-client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export default function App() {
[hub],
initialChannelBalance
);
console.timeEnd("Create Payment Channel");

// TODO: If the objective completes fast enough, we might start waiting after it's already done
// await nitroClient.WaitForObjective(result.Id);
Expand Down Expand Up @@ -183,8 +184,7 @@ export default function App() {
selectedFile.url,
skipPayment ? 0 : costPerByte * selectedFile.size,
paymentChannelInfo.ID,
nitroClient,
() => {}
nitroClient
);
setDownloadProgress(100);
triggerFileDownload(file);
Expand Down
4 changes: 2 additions & 2 deletions packages/payment-proxy-client/src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function fetchFile(
paymentAmount: number,
channelId: string,
nitroClient: NitroRpcClient,
updateChannelCallback: () => void
updateChannelCallback?: () => void
): Promise<File> {
console.time("Create Payment Vouncher");
const voucher = await nitroClient.CreateVoucher(channelId, paymentAmount);
Expand All @@ -15,7 +15,7 @@ export async function fetchFile(
console.time("Fetch file");
const req = createRequest(url, voucher);
const fetchPromise = fetch(req);
updateChannelCallback();
updateChannelCallback && updateChannelCallback();
const response = await fetchPromise;
console.timeEnd("Fetch file");
if (response.status != 200) {
Expand Down

0 comments on commit 58e67fb

Please sign in to comment.