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: Price provider model #1084

Merged
merged 5 commits into from
Sep 21, 2023
Merged

Feat: Price provider model #1084

merged 5 commits into from
Sep 21, 2023

Conversation

tuul-wq
Copy link
Contributor

@tuul-wq tuul-wq commented Sep 20, 2023

  • Price provider model
  • Fiat service
  • Currency model

@tuul-wq tuul-wq self-assigned this Sep 20, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

Current coverage report

Summary

Lines Statements Branches Functions
Covered: 86%
87.3% (165/189) 64.28% (9/14) 89.58% (43/48)

Tests which was executed

Tests Skipped Failures Errors Time
235 0 💤 0 ❌ 0 🔥 3m 8s ⏱️
Coverage by files (86%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files87.364.2889.5886.66 
app0000 
   App.tsx000020–51
entities/price/lib100100100100 
   constants.ts100100100100 
   types.ts100100100100 
entities/price/model100100100100 
   currency-model.ts100100100100 
   price-provider-model.ts100100100100 
shared/api/local-storage100100100100 
   index.ts100100100100 
shared/api/local-storage/service8066.6610075 
   localStorageService.ts8066.661007514–16
shared/api/price-provider100100100100 
   index.ts100100100100 
shared/api/price-provider/common100100100100 
   constants.ts100100100100 
   utils.ts100100100100 
shared/api/price-provider/service100100100100 
   coingeckoService.ts100100100100 
   fiatService.ts100100100100 
shared/core100100100100 
   index.ts100100100100 
shared/core/model100100100100 
   kernel-model.ts100100100100 

@@ -22,6 +24,10 @@ const App = () => {
const appRoutes = useRoutes(routesConfig);
const { getAccounts } = useAccount();

const [assetsPrices, activeCurrency] = useUnit([priceProviderModel.$assetsPrices, currencyModel.$activeCurrency]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is added temporary, to make effector model work you need to import it somewhere.
Can be deleted after Egor's PR

@tuul-wq
Copy link
Contributor Author

tuul-wq commented Sep 20, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

Jest Unit tests results

Generic badge

Duration: 239.212 seconds
Start: 2023-09-21 06:15:37.860 UTC
Finish: 2023-09-21 06:19:37.072 UTC
Duration: 239.212 seconds
Outcome: Passed | Total Tests: 356 | Passed: 356 | Failed: 0
Total Test Suites: 144
Total Tests: 356
Failed Test Suites: 0
Failed Tests: 0
Passed Test Suites: 144
Passed Tests: 356

@tuul-wq tuul-wq changed the base branch from dev to feat/fiat_values September 20, 2023 14:07
@tuul-wq tuul-wq merged commit 0b96f2e into feat/fiat_values Sep 21, 2023
4 checks passed
@tuul-wq tuul-wq deleted the feat/coingeko_model branch September 21, 2023 11:06
egor0798 added a commit that referenced this pull request Sep 29, 2023
* Feat: Price provider model (#1084)

* Feat: Currency settings (#1076)

* Feat: fiat balance assets and staking (#1087)

* Feat: amount input currency (#1083)

* feat: currency select modal

* chore: added icon for currency

* feat: added currency mode to amount input

* feat: price provider model

* feat: load assets prices

* chore: code style, export events

* feat: integrated currency modal to currenc settings

* chore: updated crouped select semantics

* chore: fixed General Action test

* chore: fixed grouped select active state

* feat: tests for models, review fixes

* chore: fixed pr comments

* chore: added currency form model

* fix: fixed modal reload after submit

* feat: [wip] amount input currency integration

* chore: removed button disabled condition

* feat: amount input with currency integration

* fix: tests

* feat: form model, test

* chore: removed GroupedSelect

* fix: ui
fix: correct input for priceless asset

* fix: revert commented code

---------

Co-authored-by: Egor B <[email protected]>
Co-authored-by: Yaroslav Grachev <[email protected]>
Co-authored-by: asmadek <[email protected]>

* feat: added fiat amount for transfer and multisig operations

* feat: added fiat values to staking operations

---------

Co-authored-by: Yaroslav Grachev <[email protected]>
Co-authored-by: Aleksandr Makhnev <[email protected]>
Co-authored-by: Egor B <[email protected]>
stepanLav added a commit that referenced this pull request Oct 3, 2023
* Feat: Price provider model (#1084)

* Feat: Currency settings (#1076)

* Feat: fiat balance assets and staking (#1087)

* Feat: amount input currency (#1083)

* feat: currency select modal

* chore: added icon for currency

* feat: added currency mode to amount input

* feat: price provider model

* feat: load assets prices

* chore: code style, export events

* feat: integrated currency modal to currenc settings

* chore: updated crouped select semantics

* chore: fixed General Action test

* chore: fixed grouped select active state

* feat: tests for models, review fixes

* chore: fixed pr comments

* chore: added currency form model

* fix: fixed modal reload after submit

* feat: [wip] amount input currency integration

* chore: removed button disabled condition

* feat: amount input with currency integration

* fix: tests

* feat: form model, test

* chore: removed GroupedSelect

* fix: ui
fix: correct input for priceless asset

* fix: revert commented code

---------

Co-authored-by: Egor B <[email protected]>
Co-authored-by: Yaroslav Grachev <[email protected]>
Co-authored-by: asmadek <[email protected]>

* Feat: wallet fiat balance balance (#1099)

* Feat: Operations parameters fiat amount (#1098)

* Feat: Price provider model (#1084)

* Feat: Currency settings (#1076)

* Feat: fiat balance assets and staking (#1087)

* Feat: amount input currency (#1083)

* feat: currency select modal

* chore: added icon for currency

* feat: added currency mode to amount input

* feat: price provider model

* feat: load assets prices

* chore: code style, export events

* feat: integrated currency modal to currenc settings

* chore: updated crouped select semantics

* chore: fixed General Action test

* chore: fixed grouped select active state

* feat: tests for models, review fixes

* chore: fixed pr comments

* chore: added currency form model

* fix: fixed modal reload after submit

* feat: [wip] amount input currency integration

* chore: removed button disabled condition

* feat: amount input with currency integration

* fix: tests

* feat: form model, test

* chore: removed GroupedSelect

* fix: ui
fix: correct input for priceless asset

* fix: revert commented code

---------

Co-authored-by: Egor B <[email protected]>
Co-authored-by: Yaroslav Grachev <[email protected]>
Co-authored-by: asmadek <[email protected]>

* feat: added fiat amount for transfer and multisig operations

* feat: added fiat values to staking operations

---------

Co-authored-by: Yaroslav Grachev <[email protected]>
Co-authored-by: Aleksandr Makhnev <[email protected]>
Co-authored-by: Egor B <[email protected]>

* Feat: Fiat update rules (#1096)

* feat: fiat update rules

* chore: added test

* Update src/renderer/entities/price/model/__tests__/price-provider-model.test.ts

Co-authored-by: Yaroslav Grachev <[email protected]>

* chore: updated price proveder test

* chore: improved priceProvider test

---------

Co-authored-by: Egor B <[email protected]>
Co-authored-by: Yaroslav Grachev <[email protected]>

* Feat/adding dev build (#1103)

* Feat: Transaction service refactoring (#1053)

* feat: added new transaction service, extrinsic builder and changed transfer florw

* feat: removed extra components, changed get fee func

* fix: wrap tx for submit step only if account is multisig

* feat: implemented new service usage for staking transactions

* fix: fix build tx error

* chore: fixed tests, removed extrinsic service from public api

* fix: signatory error fix

* chore: renamed wrappers

* chore: renamed operation footer prop and make it optional

* Update src/renderer/entities/transaction/lib/extrinsicService.ts

Co-authored-by: Yaroslav Grachev <[email protected]>

* Update src/renderer/entities/multisig/lib/multisigTx/common/utils.ts

Co-authored-by: Yaroslav Grachev <[email protected]>

* chore: fixed pr comments

* chore: fixed linter error

* chore: removed extra props from transfer form

* chore: fix lockfile

* chore: fixed confirmation test

* fix: fixed xcm transfer fee error

* fix: fixed amount error

* chore: fixed invalid character error

---------

Co-authored-by: Egor B <[email protected]>
Co-authored-by: Yaroslav Grachev <[email protected]>

* feat: add stage build

* fix: remove config separation

* fix: change triggers

* fix: github triggers

* fix: change approach to url management

* fix: change trigger and github command

* fix: add separate webpack for internal build

* fix: eslinter

* fix: typo in yamls

* Update src/main/factories/create.ts

Co-authored-by: Aleksandr Makhnev <[email protected]>

---------

Co-authored-by: egor0798 <[email protected]>
Co-authored-by: Egor B <[email protected]>
Co-authored-by: Yaroslav Grachev <[email protected]>
Co-authored-by: Aleksandr Makhnev <[email protected]>

* Fix: Currency form value reset on close (#1107)

* fix: added form reset on close

* feat: added disabled condition for save button

* chore: fixed pr comments

---------

Co-authored-by: Egor B <[email protected]>

* fix: changed default fiat flag value to true (#1106)

Co-authored-by: Egor B <[email protected]>

* fix: wallet balance assets undefined fix (#1108)

Co-authored-by: Egor B <[email protected]>

* Fix: zero balance errors fix (#1109)

* fix: network zero balances possible fix

* fix: wallet 0 balance fix, asset display 0 fix

* fix: wallet zero balance fix

* fix: network zero balance fix

---------

Co-authored-by: Egor B <[email protected]>

* fix: removed second shimmer from assets if fiat flag is false (#1110)

Co-authored-by: Egor B <[email protected]>

---------

Co-authored-by: Yaroslav Grachev <[email protected]>
Co-authored-by: egor0798 <[email protected]>
Co-authored-by: Aleksandr Makhnev <[email protected]>
Co-authored-by: Egor B <[email protected]>
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.

4 participants