Skip to content

Commit

Permalink
Merge branch 'master' into emad/add-language-parameter_to-webview-pac…
Browse files Browse the repository at this point in the history
…kage
  • Loading branch information
emad-deriv authored Jun 25, 2024
2 parents 8637d94 + 5ac1e52 commit 96a9c1a
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 28 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,40 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2024-06-24

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_ui` - `v0.0.7+7`](#deriv_ui---v0077)
- [`deriv_auth` - `v6.6.9`](#deriv_auth---v669)
- [`deriv_passkeys` - `v0.0.2+1`](#deriv_passkeys---v0021)
- [`deriv_widgetbook` - `v0.0.2+7`](#deriv_widgetbook---v0027)
- [`deriv_language_selector` - `v0.0.2+5`](#deriv_language_selector---v0025)

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `deriv_auth` - `v6.6.9`
- `deriv_passkeys` - `v0.0.2+1`
- `deriv_widgetbook` - `v0.0.2+7`
- `deriv_language_selector` - `v0.0.2+5`

---

#### `deriv_ui` - `v0.0.7+7`

- **REFACTOR**(deriv_ui): [DERG-3500] return inputted amount based on the formatter in numpad ([#624](https://github.com/regentmarkets/flutter-deriv-packages/issues/624)). ([fdf4df19](https://github.com/regentmarkets/flutter-deriv-packages/commit/fdf4df1979ddb8710dba8925ef779cca25d60615))


## 2024-06-21

### Changes
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ This repository contains private packages & plugins that are used by the company

## Using the packages

Each package has been released as git tag with convention as **packageName-vVersionNumber**`(Example: deriv_auth-v6.6.7)`. To use the package, add the following to your pubspec.yaml file:
Each package has been released as git tag with convention as **packageName-vVersionNumber**`(Example: deriv_auth-v6.6.9)`. To use the package, add the following to your pubspec.yaml file:


```yaml
deriv_ui:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_ui
ref: deriv_ui-v0.0.7+6 #your prefered version
ref: deriv_ui-v0.0.7+7 #your prefered version
```
## Packages
| Name | Description | Version |
| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [analytics](./packages/analytics) | Used to collect and send analytical information to 'Firebase' and 'Segment'. | [v2.0.0](./packages/analytics/CHANGELOG.md) |
| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.6.7 ](./packages/deriv_auth/CHANGELOG.md) |
| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.6.9 ](./packages/deriv_auth/CHANGELOG.md) |
| [deriv_banner](./packages/deriv_banner) | A widget to show banner in apps. | [v0.0.1+1](./packages/deriv_banner/CHANGELOG.md) |
| [deriv_bloc_manager](./packages/deriv_bloc_manager) | Provides some tools to manage blocs. | [v0.0.1](./packages/deriv_bloc_manager/CHANGELOG.md) |
| [deriv_datadog](./packages/deriv_datadog) | A package that helps you monitor the performance and user interactions of your Flutter app by sending data to Datadog. | [v0.0.1](./packages/deriv_datadog/CHANGELOG.md) |
Expand All @@ -31,18 +31,18 @@ deriv_ui:
| [deriv_http_client](./packages/deriv_http_client) | A package that provides a wrapper for http package. | [v2.0.0](./packages/deriv_http_client/CHANGELOG.md) |
| [deriv_lint](./packages/deriv_lint) | A Dart package that provides lint rules for Dart and Flutter. | [v1.0.0](./packages/deriv_lint/CHANGELOG.md) |
| [deriv_live_chat](./packages/deriv_live_chat) | A plugin for live chat SDK support to dart. | [v0.0.1+2](./packages/deriv_live_chat/CHANGELOG.md) |
| [deriv_language_selector](./packages/deriv_language_selector) | A package to handle language change of the app. | [v0.0.2+4](./packages/deriv_language_selector/CHANGELOG.md) |
| [deriv_language_selector](./packages/deriv_language_selector) | A package to handle language change of the app. | [v0.0.2+5](./packages/deriv_language_selector/CHANGELOG.md) |
| [deriv_localizations](./packages/deriv_localizations) | A Package that contains the localization arb(coming from Crowdin) and dart generated files for flutter_deriv_packages. | [v1.1.1](./packages/deriv_localizations/CHANGELOG.md) | | [v1.4.4](./packages/deriv_localizations/CHANGELOG.md) |
| [deriv_numpad](./packages/deriv_numpad) | Number Pad Widget for number input. | [v1.1.5](./packages/deriv_numpad/CHANGELOG.md) |
| [deriv_rudderstack](./packages/deriv_rudderstack) | A plugin that add RudderStack SDK support to Flutter. | [v1.1.0](./packages/deriv_rudderstack/CHANGELOG.md) |
| [deriv_store_launcher](./packages/deriv_store_launcher) | A plugin to launch app stores base on platform and manufacturer. | [v0.0.1+1](./packages/deriv_store_launcher/CHANGELOG.md) |
| [deriv_technical_analysis](./packages/deriv_technical_analysis) | A Dart package for Technical Analysis. | [v0.0.1](./packages/deriv_technical_analysis/CHANGELOG.md) |
| [deriv_theme](./packages/deriv_theme) | A package that contains the theme used by Deriv products. | [v2.4.0](./packages/deriv_theme/CHANGELOG.md) |
| [deriv_ui](./packages/deriv_ui) | A package that contains the UI components used by Deriv products. | [v0.0.7+6](./packages/deriv_ui/CHANGELOG.md) |
| [deriv_ui](./packages/deriv_ui) | A package that contains the UI components used by Deriv products. | [v0.0.7+7](./packages/deriv_ui/CHANGELOG.md) |
| [deriv_utilities](./packages/deriv_utilities) | A package that contains the utilities including helper functions, mixins, and extensions. | [v1.0.0](./packages/deriv_utilities/CHANGELOG.md) |
| [deriv_websocket](./packages/deriv_web_socket_client) | A package that provides a easy to use websocket client. | [v1.0.1](./packages/deriv_web_socket_client/CHANGELOG.md) |
| [deriv_web_view](./packages/deriv_web_view) | Deriv web view package. | [v0.2.2+1](./packages/deriv_web_view/CHANGELOG.md) |
| [deriv_widgetbook](./packages/deriv_widgetbook) |Storybook for Deriv UI Widgets and Components | [v0.0.2+6](./packages/deriv_widgetbook/CHANGELOG.md) |
| [deriv_widgetbook](./packages/deriv_widgetbook) |Storybook for Deriv UI Widgets and Components | [v0.0.2+7](./packages/deriv_widgetbook/CHANGELOG.md) |
| [form_builder](./packages/form_builder) | A simpler and cleaner way to create, validate and submit forms. | [v1.0.0+1](./packages/form_builder/CHANGELOG.md) |
| [update_checker](./packages/update_checker) | Check and retrieve update information from the server for the given package. | [v1.3.0](./packages/update_checker/CHANGELOG.md) |
| [deriv_feature_flag](./packages/deriv_feature_flag) | A package to provide feature flag functionality for apps. | [v0.1.1](./packages/deriv_feature_flag/CHANGELOG.md) |
Expand Down
4 changes: 4 additions & 0 deletions packages/deriv_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.6.9

- Update a dependency to the latest release.

## 6.6.8

- Update a dependency to the latest release.
Expand Down
10 changes: 5 additions & 5 deletions packages/deriv_auth/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: deriv_auth
description: Provides deriv authentication functionalities for dart/flutter apps.
version: 6.6.8
version: 6.6.9

environment:
sdk: ">=3.0.0 <4.0.0"
Expand All @@ -22,7 +22,7 @@ dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_ui
ref: deriv_ui-v0.0.7+6
ref: deriv_ui-v0.0.7+7

deriv_http_client:
git:
Expand Down Expand Up @@ -51,13 +51,13 @@ dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_passkeys
ref: deriv_passkeys-v0.0.2
ref: deriv_passkeys-v0.0.2+1

deriv_language_selector:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_language_selector
ref: deriv_language_selector-v0.0.2+4
ref: deriv_language_selector-v0.0.2+5

flutter_bloc: ^8.1.3
flutter_svg: ^2.0.7
Expand All @@ -73,7 +73,7 @@ dependency_overrides:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_ui
ref: deriv_ui-v0.0.7+6
ref: deriv_ui-v0.0.7+7

dev_dependencies:
mocktail: ^1.0.3
Expand Down
4 changes: 4 additions & 0 deletions packages/deriv_language_selector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.2+5

- Update a dependency to the latest release.

## 0.0.2+4

- Update a dependency to the latest release.
Expand Down
4 changes: 2 additions & 2 deletions packages/deriv_language_selector/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: deriv_language_selector
description: A package to select language for the app. It provides both UI and logic for language selection.
version: 0.0.2+4
version: 0.0.2+5
publish_to: "none"

environment:
Expand All @@ -14,7 +14,7 @@ dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_ui
ref: deriv_ui-v0.0.7+6
ref: deriv_ui-v0.0.7+7
shared_preferences: ^2.2.2
flutter_bloc: ^8.1.4
equatable: ^2.0.5
Expand Down
4 changes: 4 additions & 0 deletions packages/deriv_passkeys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.2+1

- Update a dependency to the latest release.

## 0.0.2

- **REFACTOR**(deriv_passkeys): Removed deprecated linter rules ([#625](https://github.com/regentmarkets/flutter-deriv-packages/issues/625)). ([2fdc28f2](https://github.com/regentmarkets/flutter-deriv-packages/commit/2fdc28f20b8efe2ddc3a9a261c40b533307f25e3))
Expand Down
4 changes: 2 additions & 2 deletions packages/deriv_passkeys/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: deriv_passkeys
description: Deriv Passkeys Flutter Plugin
version: 0.0.2
version: 0.0.2+1
publish_to: "none"

environment:
Expand Down Expand Up @@ -32,7 +32,7 @@ dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_ui
ref: deriv_ui-v0.0.7+6
ref: deriv_ui-v0.0.7+7

deriv_http_client:
git:
Expand Down
4 changes: 4 additions & 0 deletions packages/deriv_ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.7+7

- **REFACTOR**(deriv_ui): [DERG-3500] return inputted amount based on the formatter in numpad ([#624](https://github.com/regentmarkets/flutter-deriv-packages/issues/624)). ([fdf4df19](https://github.com/regentmarkets/flutter-deriv-packages/commit/fdf4df1979ddb8710dba8925ef779cca25d60615))

## 0.0.7+6

- **REFACTOR**: update dependencies. ([af89e148](https://github.com/regentmarkets/flutter-deriv-packages/commit/af89e148dfecb6dbc8552b2b883cbad4102a56f8))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ class ExchangeController extends ChangeNotifier {
/// what user send by default in primaryCurrency when coming to numpad.)
double finalAmount() {
if (_exchangeRate.baseCurrency == primaryCurrency.currencyType) {
return primaryCurrency.amount;
return primaryCurrency.formattedAmount;
} else {
return secondaryCurrency.amount;
return secondaryCurrency.formattedAmount;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CurrencyDetail {
];

/// Available stable coin currency that Deriv supports.
static List<String> stableCurrencies = <String>[
static List<String> stableCryptoCurrencies = <String>[
'USDC',
'USDT',
'TUSDT',
Expand All @@ -37,26 +37,29 @@ class CurrencyDetail {
bool get isFiat => fiatCurrencies.contains(currencyType);

/// This will check if the currency is stable coin currency(USDC,tUSDT,eUSDT) or not.
bool get isStableCurrency =>
stableCurrencies.contains(currencyType.toUpperCase());
bool get isStableCryptoCurrency =>
stableCryptoCurrencies.contains(currencyType.toUpperCase());

/// This will give the formatted amount to do processing based on type of currency it is like fiat or crypto currency.
double get formattedAmount => double.parse(formatter.format(amount));

/// Amount that is used to display for user.
String get displayAmount {
if (amount == 0.0) {
return '';
}

return isFiat || isStableCurrency
return isFiat || isStableCryptoCurrency
? amount.toStringAsFixed(2)
: amount.toStringAsFixed(8);
}

/// This will give a specific currency formatter based on what type of currency it is like fiat or crypto currency.
NumberFormat get formatter {
if (isFiat || isStableCurrency) {
return NumberFormat.decimalPattern()..maximumFractionDigits = 2;
if (isFiat || isStableCryptoCurrency) {
return NumberFormat('#0.##', 'en_US');
} else {
return NumberFormat.decimalPattern()..maximumFractionDigits = 8;
return NumberFormat('#0.########', 'en_US');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ class _NumpadWithExchange extends NumberPad {
NumberPadCloseCallback? onClose,
}) : super(
numberPadType: NumberPadWidgetType.singleInput,
formatter: NumberFormat.decimalPattern()..maximumFractionDigits = 8,
formatter: primaryCurrency.formatter,
label: label,
firstInputTitle: title,
onClose: onClose,
Expand Down
2 changes: 1 addition & 1 deletion packages/deriv_ui/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: deriv_ui
description: A new Flutter package project.
version: 0.0.7+6
version: 0.0.7+7
publish_to: none

environment:
Expand Down
4 changes: 4 additions & 0 deletions packages/deriv_widgetbook/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.2+7

- Update a dependency to the latest release.

## 0.0.2+6

- **REFACTOR**: update dependencies. ([af89e148](https://github.com/regentmarkets/flutter-deriv-packages/commit/af89e148dfecb6dbc8552b2b883cbad4102a56f8))
Expand Down
4 changes: 2 additions & 2 deletions packages/deriv_widgetbook/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: deriv_widgetbook
description: Storybook for Deriv UI widgets and components.
publish_to: "none"
version: 0.0.2+6
version: 0.0.2+7

environment:
sdk: ">=3.0.0 <4.0.0"
Expand All @@ -16,7 +16,7 @@ dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_ui
ref: deriv_ui-v0.0.7+6
ref: deriv_ui-v0.0.7+7
deriv_theme:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
Expand Down

0 comments on commit 96a9c1a

Please sign in to comment.