Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/dashboard/src/@/utils/faucet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const customClaimAmounts: Record<number, number> = {
531050104: 5,
// Arc testnet
5042002: 1,
// Injective testnet
1439: 1,
Comment on lines +10 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Verify the chainId for Injective testnet.

The mapping entry follows the existing pattern correctly. Please confirm that chainId 1439 is the correct identifier for Injective testnet.


🌐 Web query:

What is the chainId for Injective testnet?

💡 Result:

Injective testnet (Cosmos native) chain-id: injective-888. [1]

If you mean the Injective EVM testnet (numeric EVM chainId for MetaMask/etc.): 1439 (0x59f). [2]



---

🏁 Script executed:

```shell
#!/bin/bash
# Inspect the full faucet.ts file to check function declaration and return type
cat apps/dashboard/src/@/utils/faucet.ts

Length of output: 376


Add explicit return type to getFaucetClaimAmount function.

The chainId 1439 for Injective testnet is verified as correct. However, the function lacks an explicit return type annotation on line 15, which violates the TypeScript coding guidelines. The function should declare : number as its return type:

export function getFaucetClaimAmount(chainId: number): number {
  return customClaimAmounts[chainId] || defaultClaimAmount;
}
🤖 Prompt for AI Agents
In apps/dashboard/src/@/utils/faucet.ts around lines 10 to 11 (function at line
15), the getFaucetClaimAmount function is missing an explicit return type;
update its signature to declare a number return type (e.g., add ": number" after
the parameters) so it becomes export function getFaucetClaimAmount(chainId:
number): number { ... } and ensure the implementation still returns a number
(using customClaimAmounts[chainId] || defaultClaimAmount).

};

const defaultClaimAmount = 0.01;
Expand Down
Loading