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

Listtokeninfodetails #575

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Listtokeninfodetails #575

merged 2 commits into from
Sep 29, 2023

Conversation

waelhanfi04
Copy link
Contributor

Pull Request Description

Summary:

This pull request includes several changes across different parts of the application to enhance the crypto-related functionality. The key changes are as follows:

1. src/app/campaigns/campaigns.module.ts

  • Imported cryptoReducerList from '@app/core/store/crypto-prices/reducer/crypto.reducer'.
  • Imported CryptoEffectsList from '@app/core/store/crypto-prices/effects/crypto.effects'.
  • Added SharedModule, StoreModule.forFeature('cryptoPriceList', cryptoReducerList), and EffectsModule.forFeature([CryptoEffectsList]) to the @NgModule decorator.

2. src/app/campaigns/services/format-data.service.ts

  • Imported various dependencies including map, take, and takeUntil from 'rxjs/operators'.
  • Imported necessary items from '../../core/store/crypto-prices/actions/crypto.actions', @ngrx/store, '@app/core/store/crypto-prices/selectors/crypto.selectors', and '@app/shared/service/SharedDataService'.
  • Added cryptoPriceList: any[] | null | undefined; declaration.
  • Modified the constructor to include walletFacade, store, and sharedDataService.
  • Added logic to dispatch CryptoActionsList.fetchCryptoPriceList() and handle the store's crypto price list data.

3. src/app/core/services/crypto-info.service.ts

  • Imported Observable, IResponseWallet, and sattUrl from appropriate locations.
  • Added a method getCharts(id:any, range:any) for fetching charts data.

4. Created Files

src/app/core/store/crypto-prices/actions/crypto.actions.ts

  • Created a file for crypto-related actions including fetchCryptoPriceList, fetchCryptoPriceListSuccess, and fetchCryptoPriceListFailure.

src/app/core/store/crypto-prices/effects/crypto.effects.ts

  • Created a file for crypto-related effects, including fetchCryptoPriceList$ effect that handles the fetching of crypto price list data.

src/app/core/store/crypto-prices/reducer/crypto.reducer.ts

  • Created a file for crypto-related reducers, including cryptoReducerList and the necessary state handling logic.

src/app/core/store/crypto-prices/selectors/crypto.selectors.ts

  • Created a file for crypto-related selectors, including selectCryptoPriceList.

src/app/shared/service/SharedDataService.ts

  • Created a file for a shared service to manage crypto-related data.

5. src/app/wallet/components/crypto-info/crypto-info.component.html

  • Made changes to the HTML template.

6. src/app/wallet/components/crypto-info/crypto-info.component.ts

  • Imported various dependencies and items.
  • Added class properties and initialized them.
  • Modified the ngOnInit method to handle crypto-related data.
  • Added a method handleCryptoList to fetch crypto charts.
  • Added a method translateNetwork for translating network names.
  • Modified the drawChart method for chart data processing.
  • Made changes to the goToSend and goToReceive methods.

7. src/app/wallet/store/actions/crypto-info.actions.ts

  • Created a file for crypto-related actions including cryptoListLoaded, loadCryptoList, loadCryptoListSuccess, and loadCryptoListFailure.

8. src/app/wallet/store/effects/crypto-info.effects.ts

  • Created a file for crypto-related effects, including loadCryptoList$ effect that handles loading crypto lists.

9. src/app/wallet/store/reducers/crypto-info.reducer.ts

  • Created a file for crypto-related reducers, including cryptoInfoReducer.

10. src/app/wallet/store/selectors/crypto-info.selectors.ts

  • Created a file for crypto-related selectors, including selectCryptoInfoState and selectCryptoList.

11. src/app/wallet/wallet.module.ts

  • Imported cryptoInfoReducer and CryptoInfoEffects.
  • Added StoreModule.forFeature('cryptoInfo', cryptoInfoReducer) and EffectsModule.forFeature([CryptoInfoEffects]) to the @NgModule decorator.

Testing:

I have tested these changes to ensure that they work as intended and do not introduce any new issues. These enhancements improve the crypto-related functionality in the application.

Please review and merge this pull request.

@waelhanfi04 waelhanfi04 linked an issue Sep 28, 2023 that may be closed by this pull request
@waelhanfi04 waelhanfi04 merged commit 2a9b7d5 into develop Sep 29, 2023
@waelhanfi04 waelhanfi04 deleted the listtokeninfodetails branch September 29, 2023 10:50
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.

Token Info Optimization and API Replacement
3 participants