Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #142

Open
wants to merge 119 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
6a96d50
move fossil job status req on the server side
eugenPtr Dec 19, 2024
7add041
Merge branch 'develop' into fossil-req-server-side
eugenPtr Dec 19, 2024
e782e5f
Merge branch 'main' into fossil-req-server-side
eugenPtr Jan 17, 2025
70a6f23
remove unused env vars from production dockerfile & make clear which …
eugenPtr Jan 17, 2025
966e72d
Merge pull request #71 from OilerNetwork/fossil-req-server-side
eugenPtr Jan 20, 2025
31f6842
Disable in pending roundState
dhruv035 Jan 21, 2025
1308852
wrapped help mode elements with Hoverable component
0xDegenDeveloper Jan 22, 2025
6b2a8a2
rm old file
0xDegenDeveloper Jan 22, 2025
100a5aa
created hoverable wrapper component
0xDegenDeveloper Jan 22, 2025
86d216f
size bug fix
0xDegenDeveloper Jan 22, 2025
a163f1c
created context for help texts
0xDegenDeveloper Jan 22, 2025
904f519
created help box and toggle button
0xDegenDeveloper Jan 22, 2025
127446d
add icons
0xDegenDeveloper Jan 22, 2025
4fe4e97
add help panel into tree
0xDegenDeveloper Jan 22, 2025
73ca622
simplified hoverable use
0xDegenDeveloper Jan 22, 2025
e6b5711
added hoverability (and delay) to chart points
0xDegenDeveloper Jan 22, 2025
c6d1217
started help doc
0xDegenDeveloper Jan 22, 2025
94c91ec
Added dockerfile, nginx config and workflow file to deploy
adityaNth Jan 21, 2025
abd2836
pnpm install
0xDegenDeveloper Jan 23, 2025
132b8d7
Update help box to use json file
0xDegenDeveloper Jan 23, 2025
a71a860
Update HelpBoxPanel.tsx
0xDegenDeveloper Jan 23, 2025
6b4b720
only show help box button on vault page
0xDegenDeveloper Jan 23, 2025
1a03379
added additional hoverable items
0xDegenDeveloper Jan 23, 2025
f21d0b1
remove unused code
0xDegenDeveloper Jan 23, 2025
59a9153
build fixes
0xDegenDeveloper Jan 23, 2025
756ac10
Modified workflow
adityaNth Jan 23, 2025
d55730d
Added workflow to run tests
adityaNth Jan 23, 2025
4d5b7c0
added blur overlay for login/change network dropdown
0xDegenDeveloper Jan 23, 2025
ebfbc6e
fix pending button not disabled
0xDegenDeveloper Jan 23, 2025
f4629c5
update packages
0xDegenDeveloper Jan 23, 2025
05395be
Merge pull request #123 from OilerNetwork/feat/deploy_pitchlake_ui
eugenPtr Jan 24, 2025
07dbba5
Merge branch 'develop' of github.com:OilerNetwork/pitchlake-ui-new in…
dhruv035 Jan 24, 2025
120aaf8
Merge pull request #125 from OilerNetwork/feat/info-box
dhruv035 Jan 24, 2025
a7d3065
Merge branch 'develop' into feat/issue-121
dhruv035 Jan 24, 2025
76b7c15
pnpm install
0xDegenDeveloper Jan 25, 2025
deba77b
Update text for time remaining panel
0xDegenDeveloper Jan 25, 2025
468771d
build fix
0xDegenDeveloper Jan 25, 2025
bf68326
update remaining time panel text
0xDegenDeveloper Jan 25, 2025
658d768
added hoverable component to edit bid toggle
0xDegenDeveloper Jan 25, 2025
3c2a294
added better help texts
0xDegenDeveloper Jan 25, 2025
8c3c51b
moved help texts location
0xDegenDeveloper Jan 25, 2025
b8cfb35
build fixes
0xDegenDeveloper Jan 25, 2025
e6fe032
use context for dropdown balances
0xDegenDeveloper Jan 25, 2025
03b3c27
update hover bounds on vault and round info btn
0xDegenDeveloper Jan 25, 2025
b45c0b7
formatting
0xDegenDeveloper Jan 25, 2025
2ac9862
update help box bottom text
0xDegenDeveloper Jan 25, 2025
179b720
Merge pull request #122 from OilerNetwork/feat/issue-121
dhruv035 Jan 26, 2025
74907e8
Refresh error, build error fix
dhruv035 Jan 26, 2025
fa9469a
Chain ID
dhruv035 Jan 26, 2025
bd2d246
Merge pull request #129 from OilerNetwork/feat/patches
dhruv035 Jan 26, 2025
4b23d96
Merge branch 'develop' into feat/update-texts
dhruv035 Jan 26, 2025
8b13089
Merge pull request #128 from OilerNetwork/feat/update-texts
dhruv035 Jan 26, 2025
04a07f9
Is valid 64 fix
dhruv035 Jan 26, 2025
a11f7f6
Bug fix
dhruv035 Jan 26, 2025
a22d55a
Remove log
dhruv035 Jan 26, 2025
e11bc41
Merge pull request #130 from OilerNetwork/feat/bugFixRefreshes
dhruv035 Jan 26, 2025
9f3977c
Rollback (#127)
dhruv035 Jan 26, 2025
1e67b3e
made time remaining text update faster
0xDegenDeveloper Jan 26, 2025
b33e191
fix placing bid bug
0xDegenDeveloper Jan 26, 2025
17d8c03
update bid multicall fix
0xDegenDeveloper Jan 27, 2025
d1432d0
tried refreshing gas data in real time
0xDegenDeveloper Jan 27, 2025
2f9150b
Feat/testing components (#133)
dhruv035 Jan 29, 2025
071c901
build error (#135)
dhruv035 Jan 30, 2025
671ad91
Remove .cursor
dhruv035 Jan 30, 2025
6ee2fed
Update .gitignore
dhruv035 Jan 30, 2025
397ed0d
Page margin
dhruv035 Jan 30, 2025
b2b7e64
Added build command
adityaNth Feb 3, 2025
fd906c2
removed testing branch
adityaNth Feb 3, 2025
8eedb4e
Merge pull request #137 from OilerNetwork/feat/update-ci
eugenPtr Feb 4, 2025
0fd362b
Feat/unconfirmed block data (#134)
dhruv035 Feb 7, 2025
d049210
updated demo data for ghost (reset-er) round
0xDegenDeveloper Feb 9, 2025
2fd7542
formatting
0xDegenDeveloper Feb 9, 2025
cae5b8d
created api endpoint to send mocked fossil callback
0xDegenDeveloper Feb 9, 2025
9282c78
created new state transition component
0xDegenDeveloper Feb 9, 2025
b08d026
update alchemy key
0xDegenDeveloper Feb 11, 2025
77d767c
Update demo site contract address
0xDegenDeveloper Feb 11, 2025
acb551b
updated contract abi imports
0xDegenDeveloper Feb 11, 2025
9d6051d
update vault actions
0xDegenDeveloper Feb 11, 2025
711b73e
moved round actions to vault and update types/tests
0xDegenDeveloper Feb 11, 2025
14ac736
Update file name
0xDegenDeveloper Feb 11, 2025
9c61019
Move demo fossil callback to vault actions
0xDegenDeveloper Feb 11, 2025
4157fef
update tests
0xDegenDeveloper Feb 11, 2025
9ae8df8
build fixes
0xDegenDeveloper Feb 11, 2025
681d4fa
Icon updates
0xDegenDeveloper Feb 11, 2025
edc0d5f
icon style updates
0xDegenDeveloper Feb 11, 2025
0e6ae28
update exercisable options text
0xDegenDeveloper Feb 11, 2025
5e740a1
Update docker configs for new env vars
0xDegenDeveloper Feb 11, 2025
2b52832
update logic for exercisable option count
0xDegenDeveloper Feb 11, 2025
4c8e4e1
rm logs/formatting
0xDegenDeveloper Feb 11, 2025
bde9aeb
unconfirmed data bug fix
0xDegenDeveloper Feb 11, 2025
76efba4
update typings for state trans. actions
0xDegenDeveloper Feb 11, 2025
902f1bc
comment out old StateTransition
0xDegenDeveloper Feb 11, 2025
4a6121e
moved send fossil req to vault actions
0xDegenDeveloper Feb 11, 2025
a98ba9d
build fixes
0xDegenDeveloper Feb 11, 2025
ab902c9
formatting
0xDegenDeveloper Feb 11, 2025
f5944fa
fix mock vault build err
0xDegenDeveloper Feb 11, 2025
1c48f3a
made tests compile
0xDegenDeveloper Feb 11, 2025
6932ab7
formatting
0xDegenDeveloper Feb 11, 2025
566b1bd
Merge pull request #143 from OilerNetwork/feat/demo-fossil-call
0xDegenDeveloper Feb 11, 2025
0f43d43
hard code fix till devops updats vars
0xDegenDeveloper Feb 11, 2025
6328c94
bug fix
0xDegenDeveloper Feb 11, 2025
9eba42c
style fix
0xDegenDeveloper Feb 12, 2025
43b8a94
Modified workflow for all deployments (#144)
adityaNth Feb 12, 2025
7c0e258
strip/cleanup components
0xDegenDeveloper Feb 12, 2025
a781aed
move chart tooltip component out of main component
0xDegenDeveloper Feb 12, 2025
33540cd
refined left panel items
0xDegenDeveloper Feb 12, 2025
682a54b
comment out hover logic for chart
0xDegenDeveloper Feb 12, 2025
33cdb7b
update text
0xDegenDeveloper Feb 12, 2025
d456824
formatting
0xDegenDeveloper Feb 12, 2025
ee76cb9
round performance bug
0xDegenDeveloper Feb 12, 2025
65aa344
Modified CICD (#145)
adityaNth Feb 13, 2025
9b989dd
updated demo reserve price
0xDegenDeveloper Feb 13, 2025
e046d2a
update left panel item ordering
0xDegenDeveloper Feb 13, 2025
4ecddb7
Merge branch 'develop' of https://github.com/OilerNetwork/pitchlake-u…
0xDegenDeveloper Feb 13, 2025
9186a42
Changed env vars (#146)
adityaNth Feb 13, 2025
be1bd1f
Merge branch 'develop' of https://github.com/OilerNetwork/pitchlake-u…
0xDegenDeveloper Feb 13, 2025
682b849
rm fossil delay, update help texts and time countdown texts
0xDegenDeveloper Feb 13, 2025
5e916eb
noticed test bug
0xDegenDeveloper Feb 13, 2025
7fbdad0
Merge pull request #147 from OilerNetwork/feat/updating-texts
0xDegenDeveloper Feb 13, 2025
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
62 changes: 62 additions & 0 deletions .cursor/rules/clean-up.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
description: Rules for cleaning up test files while maintaining functionality
globs:
---
---
description: Rules for cleaning up test files while maintaining functionality
globs:
- "src/__tests__/**/*.test.tsx"
- "src/__tests__/**/*.test.ts"
---
# Test Clean-up Rules

Core Rule: Clean up tests while maintaining their effectiveness and readability.

## Component Mocking Rules

1. Avoid Mocking Child Components Unless Necessary
- Only mock components that are complex or have external dependencies
- Test with actual components when possible for better integration testing
- Exception: Mock components that cause test instability or are irrelevant to the test

2. Mock Management
- Keep all mocks in a centralized object/constant for easy maintenance
- Group related mocks together (e.g., all hook mocks in one object)
- Document mock values that represent specific states (e.g., "Future date", "Past date")

## Element Selection Rules

1. Prefer Semantic Queries
- Use `getByRole` for interactive elements (buttons, inputs)
- Use `getByText` for text content and error messages
- Use `getByLabelText` for form controls with labels
- Only use `getByTestId` as a last resort

2. Type Safety
- Properly type HTML elements when accessing properties
- Use type assertions only when TypeScript can't infer the type
- Example: `(element as HTMLInputElement).value`


## Test Organization Rules

1. Setup Functions
- Create reusable setup functions for common test scenarios
- Allow overrides for test-specific requirements
- Document the purpose of setup function parameters

2. Test Structure
- Group related tests together
- Use clear, descriptive test names
- Follow the Arrange-Act-Assert pattern


## Post Cleanup
1. Run tests
-Ensure that the tests are passing by running the tests after the cleanup and the cleanup doesnt leave the tests broken
## Decision Process
Before cleaning up tests, ask:
1. "Will this change make the tests more maintainable?"
2. "Does this preserve the test's original intent?"
3. "Is the cleanup making the test more readable?"
4. "Are we maintaining proper test coverage?"
61 changes: 61 additions & 0 deletions .cursor/rules/test-changes.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
description: Rules for handling test changes and verifying test status
globs:
---
---
description: Rules for handling test changes and verifying test status
globs:
- "src/__tests__/**/*.test.tsx"
- "src/__tests__/**/*.test.ts"
---

# Test Changes Rules

Core Rule: Never consider a prompt complete until all tests are passing and the test file is clean.

## Test Verification Process

1. After ANY edit to test files:
- Run the tests immediately
- If tests fail, analyze the failures and fix them
- Continue this process until all tests pass
- Only then move to the cleanup phase

2. For Test Modifications:
- Run tests before making changes to establish baseline
- Make the necessary changes
- Run tests again to verify changes
- If tests fail, fix and repeat
- Once passing, perform cleanup
- Document any unexpected test behavior

3. For New Tests:
- Add the test
- Run the full test suite
- Verify both new and existing tests pass
- Fix any failures before moving on
- Once passing, perform cleanup

## Test Cleanup Process

1. After Tests Pass:
- Review and apply clean-up rules from clean-up.mdc
- Focus on improving:
- Component mocking strategy
- Element selection methods
- Asynchronous testing patterns
- Test organization and structure
- Run tests again after cleanup to ensure no regressions

2. Cleanup Priorities:
- Replace non-semantic selectors with semantic ones
- Consolidate and organize mocks
- Improve type safety
- Enhance test readability
- Remove redundant or unnecessary code
- Add missing documentation

## Decision Process
Always ask:
1. "Have I run the tests and confirmed they all pass?" before moving to cleanup
2. "Have I followed all clean-up rules thoroughly?" before considering the task complete
45 changes: 45 additions & 0 deletions .cursor/rules/test-placement.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
description: Rules for determining which test file a test should belong to
globs:
---
---
description: Rules for determining which test file a test should belong to
globs:
- "src/__tests__/**/*.test.tsx"
- "src/__tests__/**/*.test.ts"
---

# Test Placement Rules

Core Rule: Tests belong in the test file of the component that CONTROLS the behavior/logic, not necessarily where the rendered output appears.

## Rules for Different Test Types

1. Conditional Rendering Tests
- Identify which component contains the IF/ELSE or conditional logic
- Place the test in that component's test file, even if it's testing what appears/doesn't appear elsewhere
- Example: If App.tsx decides when to show MobileScreen, the test belongs in App.test.tsx

2. Feature/Behavior Tests
- Place tests with the component that implements the behavior
- Example: If Header.tsx implements mobile hiding with !isMobile, the "doesn't show on mobile" test belongs in Header.test.tsx

3. Integration/Flow Tests
- Place tests with the highest-level component that orchestrates the flow
- Example: If a page component controls the flow between different states/views, put the flow tests there

4. Context/Provider Tests
- Tests for how context affects rendering belong with the component using the context
- Tests for context logic itself belong with the context provider tests

5. External Dependencies
- DO NOT test the behavior of external library functions/hooks
- Focus on testing your code's interaction with these dependencies
- Mock only the minimum required response from external dependencies
- Example: For hooks like useContractRead from external libraries, don't test their internal behavior
- Exception: You may test your wrapper/adapter around external dependencies if you've created one

## Decision Process
Always ask:
1. "Which component is making the decision?" - That's where the test belongs
2. "Is this testing our code or an external dependency?" - Focus on our code
16 changes: 13 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
## PUBLIC ##
NEXT_PUBLIC_VAULT_ADDRESSES=""
NEXT_PUBLIC_ENVIRONMENT=""
NEXT_PUBLIC_RPC_URL_MAINNET=""
NEXT_PUBLIC_RPC_URL_SEPOLIA=""
NEXT_PUBLIC_RPC_URL_DEVNET=""
NEXT_PUBLIC_RPC_URL_JUNO_DEVNET=""
NEXT_PUBLIC_FOSSIL_API_URL=""
NEXT_PUBLIC_WS_URL=""

## SECRETS ##
FOSSIL_API_KEY=""
FOSSIL_DB_URL=""
PORT=
NEXT_PUBLIC_FOSSIL_USE_MOCK_PRICING_DATA=true
# ⬇️⬇️⬇️ This env var is used only in the devenv. Doesn't need to be set in prod
ALCHEMY_API_KEY=""
# DEMO
DEMO_ACCOUNT_ADDRESS=""
DEMO_PRIVATE_KEY=""

# ⬇️⬇️⬇️ MANDATORY FOR DEVELOPMENT ENVIRONMENT - NOT NEEDED IN PRODUCTION
JUNO_DOCKER_HOST=
NEXT_PUBLIC_RPC_URL_DEVNET=""
NEXT_PUBLIC_RPC_URL_JUNO_DEVNET=""


6 changes: 0 additions & 6 deletions .github/workflows/deploy_pitchlake_ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ env:
NODE_ENV: production
PORT: ${{vars.PORT}}
NEXT_PUBLIC_VAULT_ADDRESSES: ${{vars.VAULT_ADDRESSES}}
NEXT_PUBLIC_API_URL: ${{vars.API_URL}}
NEXT_PUBLIC_ENVIRONMENT: ${{vars.ENVIRONMENT}}
NEXT_PUBLIC_RPC_URL_MAINNET: ${{secrets.RPC_URL_MAINNET}}
NEXT_PUBLIC_RPC_URL_SEPOLIA: ${{secrets.RPC_URL_SEPOLIA}}
NEXT_PUBLIC_RPC_URL_DEVNET: ${{secrets.RPC_URL_DEVNET}}
NEXT_PUBLIC_RPC_URL_JUNO_DEVNET: ${{vars.RPC_URL_JUNO_DEVNET}}
NEXT_PUBLIC_WS_URL: ${{vars.WS_URL}}
FOSSIL_API_KEY: ${{secrets.FOSSIL_API_KEY}}
FOSSIL_DB_URL: ${{secrets.FOSSIL_DB_URL}}
Expand Down Expand Up @@ -73,12 +70,9 @@ jobs:
--platform=linux/amd64 \
--build-arg PORT=${{ env.PORT }} \
--build-arg NEXT_PUBLIC_VAULT_ADDRESSES=${{ env.NEXT_PUBLIC_VAULT_ADDRESSES }} \
--build-arg NEXT_PUBLIC_API_URL=${{ env.NEXT_PUBLIC_API_URL }} \
--build-arg NEXT_PUBLIC_ENVIRONMENT=${{ env.NEXT_PUBLIC_ENVIRONMENT }} \
--build-arg NEXT_PUBLIC_RPC_URL_MAINNET=${{ env.NEXT_PUBLIC_RPC_URL_MAINNET }} \
--build-arg NEXT_PUBLIC_RPC_URL_SEPOLIA=${{ env.NEXT_PUBLIC_RPC_URL_SEPOLIA }} \
--build-arg NEXT_PUBLIC_RPC_URL_DEVNET=${{ env.NEXT_PUBLIC_RPC_URL_DEVNET }} \
--build-arg NEXT_PUBLIC_RPC_URL_JUNO_DEVNET=${{ env.NEXT_PUBLIC_RPC_URL_JUNO_DEVNET }} \
--build-arg NEXT_PUBLIC_WS_URL=${{ env.NEXT_PUBLIC_WS_URL }} \
--build-arg FOSSIL_API_KEY=${{ env.FOSSIL_API_KEY }} \
--build-arg FOSSIL_DB_URL=${{ env.FOSSIL_DB_URL }} \
Expand Down
Loading
Loading