Skip to content

Commit

Permalink
chore: remove some 'TODO' comments (#1618)
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelBreslaw authored May 13, 2024
1 parent 68024a9 commit 32381fb
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 25 deletions.
1 change: 0 additions & 1 deletion minifier/next_gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ function stripImageUrl(url: string): string {
return shortUrl;
}

// TODO: Update to retry a couple of times instead of failing right away
async function downloadJsonFile(url: string): Promise<any> {
try {
const response = await fetch(url);
Expand Down
2 changes: 1 addition & 1 deletion native/app/UI/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function LocalWebLogin() {
);
}

export default function Login({ navigation }: { navigation: NavigationProp<ReactNavigation.RootParamList> }) {
export default function Login({ navigation }: { readonly navigation: NavigationProp<ReactNavigation.RootParamList> }) {
const colorScheme = useColorScheme();
const authenticated = useGGStore((state) => state.authenticated);
const createAuthenticatedAccount = useGGStore((state) => state.createAuthenticatedAccount);
Expand Down
1 change: 0 additions & 1 deletion native/app/core/ApiResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export type BungieManifest = Output<typeof bungieManifestSchema>;
// Authenticated API Responses
// -------------------------------

// TODO: Should this also have 'Response'?
export const bungieResponseSchema = object({
ErrorCode: number(),
ErrorStatus: string(),
Expand Down
9 changes: 0 additions & 9 deletions native/app/core/BungieDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export const StatGroupSchema = record(
),
}),
),
// TODO: Fill in whatever this unknown is?
overrides: unknown(),
hash: number(),
index: number(),
Expand All @@ -163,13 +162,10 @@ export const StatGroupSchema = record(
export const MiniStatGroupSchema = record(
string(),
object({
// maximumValue: number(),
// uiPosition: number(),
scaledStats: array(
object({
statHash: number(),
maximumValue: number(),
// displayAsNumeric: boolean(),
displayInterpolation: array(
object({
value: number(),
Expand All @@ -178,12 +174,7 @@ export const MiniStatGroupSchema = record(
),
}),
),
// TODO: Fill in whatever this unknown is?
// overrides: unknown(),
// hash: number(),
// index: number(),
redacted: boolean(),
// blacklisted: boolean(),
}),
);

Expand Down
12 changes: 0 additions & 12 deletions native/app/inventory/logic/Sockets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ enum IconType {
Plug = 1,
TopLevel = 2,
}
// // TODO: Add values, I made these up
// enum ModType {
// Normal = 1,
// Artifact = 2,
Expand All @@ -80,7 +79,6 @@ export type SocketEntry = {
iconType: IconType; // default is.Plug
// modType: ModType; // default is.Normal

// TODO: The itemHash should not be here. SocketEntries are a type of destinyItem and maybe should be
// extending that type? But right now it's not been needed.
itemHash: number;
plugSources: number; // This is a bitmask
Expand Down Expand Up @@ -114,7 +112,6 @@ export type SocketEntry = {
/// Used for perk objectives such as forge weapon materials and also kill counters <ObjectiveHash, Amount>
// plugObjectiveValues: Record<string, number>;

// TODO: Is this mode needed? It was in Ishtar
// mode: .SocketEntry

def?: DestinyItemDefinition;
Expand Down Expand Up @@ -161,18 +158,12 @@ export function createSockets(destinyItem: DestinyItem): Sockets | null {

addSocketCategoryDefinition(sockets);

// TODO: The categories now have an 'index' property gained from the definition. Should this be used
// to sort the visual order the categories are displayed in?

updateSocketEntriesWithLiveData(sockets, destinyItem);

updateSocketCategoriesWithData(sockets, destinyItem);

addDefinitionsToTopLevelSockets(sockets, destinyItem);

// TODO: addMasterworkInvestments() should be added. But it presumes addDefinitionsToTopLevelSockets has done
// it's job and right now some research is needed to see if it's really needed.

// TODO: addDeepsightResonance() should all be added.
const p2 = performance.now();
console.log("createSockets", `${(p2 - p1).toFixed(4)} ms`);
Expand Down Expand Up @@ -356,7 +347,6 @@ function updateSocketCategoriesWithData(sockets: Sockets, destinyItem: DestinyIt

switch (plugSourceEnum) {
case SocketPlugSources.InventorySourced: {
// TODO: Check if anything is using these. At one point shaders and mods did, but they seem to be in the api now.
break;
}
case SocketPlugSources.ReusablePlugItems: {
Expand Down Expand Up @@ -466,7 +456,6 @@ function addDefinitionsToTopLevelSockets(sockets: Sockets, _destinyItem: Destiny
socketEntry.socketTypeHash = category.socketMaps[columnIndex]?.socketTypeHash ?? null;
socketEntry.socketIndex = category.socketMaps[columnIndex]?.socketIndex ?? null;

// TODO: add back when this extends destinyItem?
// socketEntry.itemInstanceId = destinyItem.itemInstanceId

// let characterIdArg = "";
Expand All @@ -476,7 +465,6 @@ function addDefinitionsToTopLevelSockets(sockets: Sockets, _destinyItem: Destiny
// } else {
// characterIdArg = destinyItem.characterId;
// }
// TODO: add back when this extends destinyItem?

// socketEntry.characterId = characterIdArg
}
Expand Down
1 change: 0 additions & 1 deletion native/app/inventory/logic/Transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ async function pullFromPostmaster(transferItem: TransferItem): Promise<[JSON, De
membershipType,
itemReferenceHash: transferItem.destinyItem.itemHash,
itemId: transferItem.destinyItem?.itemInstanceId ? transferItem.destinyItem.itemInstanceId : "0",
// TODO: If the quantity is larger than can be moved should there be some logic to set it to the max possible?
stackSize: transferItem.destinyItem.quantity,
characterId: transferItem.destinyItem.characterId,
};
Expand Down

0 comments on commit 32381fb

Please sign in to comment.