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

Feature: Adaptive default token #4

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

nemoforte
Copy link
Collaborator

This branch introduces adaptive default token queried from the network, and thus specific to each network. Until now, default token was hardcoded, which was removed in this branch. It also prepares a model for the default bech32 prefix, which has analogous purpose and was initially intended to implement together. However, due to work organization purposes, the Adaptive Bech32 Address Prefix feature will be introduced separately.

List of changes:

  • deleted hardcoded "defaultFeeTokenAliasModel" from app_config.dart in order to replace it with queried values
  • created query_kira_token_aliases_req.dart to enable using query parameters introduced in interx v0.4.43 - pagination and querying by denomination name
  • updated query_kira_token_aliases_resp.dart with new parameters "defaultDenom" and "bech32Prefix", added in interx v0.4.43
  • created token_default_denom_model.dart which is a business model representing default token alias. It also contains default bech32 prefix, which will be used later in the analogous feature Adaptive Bech32 Address Prefix.
  • created "getTokenDefaultDenomModel()" method in query_kira_token_aliases_service.dart, which is called with every network change and conditions its status - if TokenDefaultDenomModel is missing, network is unhealthy
  • added "tokenDefaultDenomModel" field to classes extending ANetworkOnlineModel to enable passing the new parameters to the network
  • replaced every usage of hardcoded default token with the queried values, accessed via NetworkModuleBloc with the variable "tokenDefaultDenomModel"
  • unrelated with the branch's specific domain: modified token_avatar.dart to handle both .svg and .png logo images

@nemoforte nemoforte requested review from dpajak99 and kronikarz March 6, 2024 12:05
This branch introduces adaptive default token queried from the network, and thus specific to each network. Until now, default token was hardcoded, which was removed in this branch. It also prepares a model for the default bech32 prefix, which has analogous purpose and was initially intended to implement together. However, due to work organization purposes, the Adaptive Bech32 Address Prefix feature will be introduced separately.

List of changes:
- deleted hardcoded "defaultFeeTokenAliasModel" from app_config.dart in order to replace it with queried values
- created query_kira_token_aliases_req.dart to enable using query parameters introduced in interx v0.4.43 - pagination and querying by denomination name
- updated query_kira_token_aliases_resp.dart with new parameters "defaultDenom" and "bech32Prefix", added in interx v0.4.43
- created token_default_denom_model.dart which is a business model representing default token alias. It also contains default bech32 prefix, which will be used later in the analogous feature Adaptive Bech32 Address Prefix.
- created "getTokenDefaultDenomModel()" method in query_kira_token_aliases_service.dart, which is called with every network change and conditions its status - if TokenDefaultDenomModel is missing, network is unhealthy
- added "tokenDefaultDenomModel" field to classes extending ANetworkOnlineModel to enable passing the new parameters to the network
- replaced every usage of hardcoded default token with the queried values, accessed via NetworkModuleBloc with the variable "tokenDefaultDenomModel"
- unrelated with the branch's specific domain: modified token_avatar.dart to handle both .svg and .png logo images
@nemoforte nemoforte force-pushed the mj-feature/adaptive-default-token branch from 9c0f4f9 to f36d882 Compare March 6, 2024 12:41
@kronikarz kronikarz merged commit 59b0045 into dev Mar 6, 2024
3 checks passed
@kronikarz kronikarz deleted the mj-feature/adaptive-default-token branch March 6, 2024 12:53
nemoforte added a commit that referenced this pull request Mar 6, 2024
This branch introduces adaptive default token queried from the network, and thus specific to each network. Until now, default token was hardcoded, which was removed in this branch. It also prepares a model for the default bech32 prefix, which has analogous purpose and was initially intended to implement together. However, due to work organization purposes, the Adaptive Bech32 Address Prefix feature will be introduced separately.

List of changes:
- deleted hardcoded "defaultFeeTokenAliasModel" from app_config.dart in order to replace it with queried values
- created query_kira_token_aliases_req.dart to enable using query parameters introduced in interx v0.4.43 - pagination and querying by denomination name
- updated query_kira_token_aliases_resp.dart with new parameters "defaultDenom" and "bech32Prefix", added in interx v0.4.43
- created token_default_denom_model.dart which is a business model representing default token alias. It also contains default bech32 prefix, which will be used later in the analogous feature Adaptive Bech32 Address Prefix.
- created "getTokenDefaultDenomModel()" method in query_kira_token_aliases_service.dart, which is called with every network change and conditions its status - if TokenDefaultDenomModel is missing, network is unhealthy
- added "tokenDefaultDenomModel" field to classes extending ANetworkOnlineModel to enable passing the new parameters to the network
- replaced every usage of hardcoded default token with the queried values, accessed via NetworkModuleBloc with the variable "tokenDefaultDenomModel"
- unrelated with the branch's specific domain: modified token_avatar.dart to handle both .svg and .png logo images
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.

3 participants