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

feat(frontend): sol network derived #4001

Merged
merged 31 commits into from
Dec 18, 2024

Conversation

loki344
Copy link
Collaborator

@loki344 loki344 commented Dec 17, 2024

Motivation

Add SOL to network utils to be able to make conditional rendering of components in the application.

Changes

  • add SOL networks array in netwroks.sol.env
  • add SOL to network.derived.ts
  • add SOL methods to network.util.ts

Tests

  • Extend existing unit testing in network.util.ts with SOL cases

loki344 and others added 25 commits December 17, 2024 10:12
# Conflicts:
#	src/frontend/src/tests/lib/api/idb.api.spec.ts
- move method from sol-balance.services.ts to sol-address.services.ts
…ived' into feat(frontend)/sol-addresses-derived
…dresses-derived-2

# Conflicts:
#	src/frontend/src/sol/services/sol-address.services.ts
#	src/frontend/src/sol/types/network.ts
#	src/frontend/src/tests/sol/services/sol-address.services.spec.ts
…ding' into feat(frontend)/sol-addresses-loading

# Conflicts:
#	src/frontend/src/tests/lib/components/guard/AddressGuard.spec.ts
@loki344
Copy link
Collaborator Author

loki344 commented Dec 17, 2024

needs #4000 to be in first

Copy link
Contributor

@DenysKarmazynDFINITY DenysKarmazynDFINITY left a comment

Choose a reason for hiding this comment

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

Minor comments, approving already.

debounceLoadSolAddressDevnet();
}
}

if (LOCAL) {
debounceLoadBtcAddressRegtest();
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like, we forgot to check isNullish($btcAddressRegtest) here. Can you please add it? 😇

@@ -37,6 +44,21 @@ export const isNetworkIdBTCRegtest = (networkId: NetworkId | undefined): boolean
export const isNetworkIdSepolia = (networkId: NetworkId | undefined): boolean =>
SEPOLIA_NETWORK_ID === networkId;

export const isNetworkIdSolana = (networkId: NetworkId | undefined): boolean =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessarily for this PR, but I feel like having some common type IsNetworkIdUtil = (networkId: NetworkId | undefined): boolean is long overdue 🙈

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will follow up with a PR

@loki344 loki344 marked this pull request as ready for review December 18, 2024 08:04
@loki344 loki344 requested a review from a team as a code owner December 18, 2024 08:04
@loki344 loki344 enabled auto-merge (squash) December 18, 2024 08:05
@loki344 loki344 merged commit 5d33115 into main Dec 18, 2024
21 checks passed
@loki344 loki344 deleted the feat(frontend)/sol-addresses-integration branch December 18, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants