Skip to content

Commit

Permalink
Merge pull request #186 from csfloat/fix/stall-listings
Browse files Browse the repository at this point in the history
Fixes Stall Listings Schema
  • Loading branch information
Step7750 authored Dec 14, 2023
2 parents d04ef2e + 3c6bc88 commit 4c00cc6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/lib/bridge/handlers/fetch_stall.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import {SimpleHandler} from './main';
import {Contract, User} from '../../types/float_market';
import {Contract} from '../../types/float_market';
import {RequestType} from './types';

export interface FetchStallRequest {
steam_id64: string;
}

export interface FetchStallResponse {
listings?: Contract[];
user?: User;
data?: Contract[];
}

export interface FetchStallResponseError {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/inventory/selected_item_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class SelectedItemInfo extends FloatElement {
return;
}

return (this.stall.listings || []).find((e) => e.item.asset_id === this.asset?.assetid);
return (this.stall.data || []).find((e) => e.item.asset_id === this.asset?.assetid);
}

protected render(): HTMLTemplateResult {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/services/stall_fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class StallFetcher extends SimpleCachedQueue<FetchStallRequest, FetchStallRespon
return await ClientSend(FetchStall, req);
} catch (e) {
// Stub out to prevent future calls
return {listings: []};
return {data: []};
}
}
}
Expand Down

0 comments on commit 4c00cc6

Please sign in to comment.