Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into akhil/1396/multi_…
Browse files Browse the repository at this point in the history
…user_level_authentication_poc_master
  • Loading branch information
akhil-deriv committed Sep 22, 2024
2 parents e2c1262 + 3eb3d0e commit ae4f17d
Show file tree
Hide file tree
Showing 33 changed files with 872 additions and 95 deletions.
129 changes: 129 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,135 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2024-09-20

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_mobile_chart_wrapper` - `v0.1.2`](#deriv_mobile_chart_wrapper---v012)

---

#### `deriv_mobile_chart_wrapper` - `v0.1.2`

- **FEAT**(deriv_mobile_chart_wrapper): [DRGO-81] Functionality to add dots for drawing tool. ([#810](https://github.com/regentmarkets/flutter-deriv-packages/issues/810)). ([05d5c85f](https://github.com/regentmarkets/flutter-deriv-packages/commit/05d5c85f9b5c204ec54eb3828b262fe7c0293ac0))


## 2024-09-19

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`analytics` - `v2.3.0`](#analytics---v230)
- [`deriv_passkeys` - `v0.0.4+5`](#deriv_passkeys---v0045)
- [`deriv_auth` - `v6.7.50`](#deriv_auth---v6750)

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_passkeys` - `v0.0.4+5`
- `deriv_auth` - `v6.7.50`

---

#### `analytics` - `v2.3.0`

- **FEAT**(analytics): Amend tracking events Rudderstack ([#821](https://github.com/regentmarkets/flutter-deriv-packages/issues/821)). ([bd197376](https://github.com/regentmarkets/flutter-deriv-packages/commit/bd197376cf450ec375a9759c9511563a253a0c64))


## 2024-09-19

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_auth` - `v6.7.49`](#deriv_auth---v6749)

---

#### `deriv_auth` - `v6.7.49`

- **FIX**(deriv_auth): unassigned token for account created on web ([#756](https://github.com/regentmarkets/flutter-deriv-packages/issues/756)). ([abbb8905](https://github.com/regentmarkets/flutter-deriv-packages/commit/abbb8905263517c32c1e990fdc9dbfd2fb38ae9b))


## 2024-09-18

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_mobile_chart_wrapper` - `v0.1.1`](#deriv_mobile_chart_wrapper---v011)

---

#### `deriv_mobile_chart_wrapper` - `v0.1.1`

- **FEAT**(deriv_mobile_chart_wrapper): [DRGO-74] Add drawing tools bottom sheet UI ([#815](https://github.com/regentmarkets/flutter-deriv-packages/issues/815)). ([ebd9ab92](https://github.com/regentmarkets/flutter-deriv-packages/commit/ebd9ab92707630df3bc185aab5a503399df786b4))


## 2024-09-13

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_ui` - `v0.1.0+2`](#deriv_ui---v0102)
- [`deriv_language_selector` - `v0.0.3+9`](#deriv_language_selector---v0039)
- [`deriv_widgetbook` - `v0.0.2+29`](#deriv_widgetbook---v00229)
- [`deriv_passkeys` - `v0.0.4+4`](#deriv_passkeys---v0044)
- [`deriv_auth` - `v6.7.48`](#deriv_auth---v6748)
- [`deriv_mobile_chart_wrapper` - `v0.1.0+4`](#deriv_mobile_chart_wrapper---v0104)

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_language_selector` - `v0.0.3+9`
- `deriv_widgetbook` - `v0.0.2+29`
- `deriv_passkeys` - `v0.0.4+4`
- `deriv_auth` - `v6.7.48`
- `deriv_mobile_chart_wrapper` - `v0.1.0+4`

---

#### `deriv_ui` - `v0.1.0+2`

- **FIX**(deriv-ui): [DRGO-126]call the passed onDispose method inside dispose method ([#819](https://github.com/regentmarkets/flutter-deriv-packages/issues/819)). ([2e29a1ee](https://github.com/regentmarkets/flutter-deriv-packages/commit/2e29a1eeb7dbb5c77bc04e1e7f7ee12081a1fd2d))


## 2024-09-11

### Changes
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ cp $HOME/Downloads/commit-msg $HOME/.git/hooks/commit-msg \

## Using the packages

Each package has been released as git tag with convention as **packageName-vVersionNumber**`(Example: deriv_auth-v6.7.47)`. 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.7.50)`. 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.1.0+1 #your prefered version
ref: deriv_ui-v0.1.0+2 #your prefered version
```
## Packages
| Name | Description | Version |
| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [analytics](./packages/analytics) | Used to collect and send analytical information to 'Firebase', 'Rudderstack' and 'Datadog'. | [v2.2.2](./packages/analytics/CHANGELOG.md) | | [v2.2.2](./packages/analytics/CHANGELOG.md) |
| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.7.47 ](./packages/deriv_auth/CHANGELOG.md) |
| [analytics](./packages/analytics) | Used to collect and send analytical information to 'Firebase', 'Rudderstack' and 'Datadog'. | [v2.2.2](./packages/analytics/CHANGELOG.md) | | [v2.3.0](./packages/analytics/CHANGELOG.md) |
| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.7.50 ](./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 @@ -41,22 +41,22 @@ 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.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.3+8](./packages/deriv_language_selector/CHANGELOG.md) |
| [deriv_language_selector](./packages/deriv_language_selector) | A package to handle language change of the app. | [v0.0.3+9](./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.6.0](./packages/deriv_localizations/CHANGELOG.md) |
| [deriv_numpad](./packages/deriv_numpad) | Number Pad Widget for number input. | [v1.1.8](./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.7.0](./packages/deriv_theme/CHANGELOG.md) |
| [deriv_ui](./packages/deriv_ui) | A package that contains the UI components used by Deriv products. | [v0.1.0+1](./packages/deriv_ui/CHANGELOG.md) |
| [deriv_ui](./packages/deriv_ui) | A package that contains the UI components used by Deriv products. | [v0.1.0+2](./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+3](./packages/deriv_web_view/CHANGELOG.md) |
| [deriv_widgetbook](./packages/deriv_widgetbook) | Storybook for Deriv UI Widgets and Components | [v0.0.2+28](./packages/deriv_widgetbook/CHANGELOG.md) |
| [deriv_widgetbook](./packages/deriv_widgetbook) | Storybook for Deriv UI Widgets and Components | [v0.0.2+29](./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.5.1](./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) |
| [deriv_mobile_chart_wrapper](./packages/deriv_mobile_chart_wrapper) | A wrapper package around package _**deriv_chart**_ to implement any functionality specific to mobile and can be wrapped around the main chart package. | [v0.1.0+3](./packages/deriv_mobile_chart_wrapper/CHANGELOG.md) |
| [deriv_mobile_chart_wrapper](./packages/deriv_mobile_chart_wrapper) | A wrapper package around package _**deriv_chart**_ to implement any functionality specific to mobile and can be wrapped around the main chart package. | [v0.1.2](./packages/deriv_mobile_chart_wrapper/CHANGELOG.md) |
## Environment Setup
Expand Down
4 changes: 4 additions & 0 deletions packages/analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.0

- **FEAT**(analytics): Amend tracking events Rudderstack ([#821](https://github.com/regentmarkets/flutter-deriv-packages/issues/821)). ([bd197376](https://github.com/regentmarkets/flutter-deriv-packages/commit/bd197376cf450ec375a9759c9511563a253a0c64))

## 2.2.2

- **REFACTOR**(analytics): Amend virtual n real tracking events ([#771](https://github.com/regentmarkets/flutter-deriv-packages/issues/771)). ([fc8850f0](https://github.com/regentmarkets/flutter-deriv-packages/commit/fc8850f01c1bb0a6805b41b3ff10e2a6e33b6e0f))
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics/lib/sdk/rudderstack/models/user_info.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// User info model.
/// User Info model.
class UserInfo {
/// Constructor for UserInfo model.
/// Constructor for User Info model.
UserInfo({
required this.userId,
this.countryResidence,
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: analytics
description: A new Flutter package for collecting and sending analytical information from the app.
version: 2.2.2
version: 2.3.0

homepage: https://deriv.com/
publish_to: "none"
Expand Down
12 changes: 12 additions & 0 deletions packages/deriv_auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 6.7.50

- Update a dependency to the latest release.

## 6.7.49

- **FIX**(deriv_auth): unassigned token for account created on web ([#756](https://github.com/regentmarkets/flutter-deriv-packages/issues/756)). ([abbb8905](https://github.com/regentmarkets/flutter-deriv-packages/commit/abbb8905263517c32c1e990fdc9dbfd2fb38ae9b))

## 6.7.48

- Update a dependency to the latest release.

## 6.7.47

- Update a dependency to the latest release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,30 +110,14 @@ class DerivAuthService extends BaseAuthService {

_checkAuthorizeValidity(responseAuthorizeEntity);

/// If the token is 'MULTI' then the last token in the list will be used
/// as the token for the account as this is the most recently added token.
/// Else we can used the provided token.
final String _token =
token.compareTo('MULTI') == 0 ? tokenList?.last ?? '' : token;

final AuthorizeEntity _enhancedAuthorizeEntity =
responseAuthorizeEntity!.copyWith(
signupProvider: signupProvider,
refreshToken: refreshToken,
accountList: responseAuthorizeEntity.accountList
?.map(
(AccountListItem accountListItem) => accountListItem.copyWith(
token: accounts
.where(
(AccountModel element) =>
element.accountId == accountListItem.loginid,
)
.firstOrNull
?.token ??
_token,
),
)
.toList(),
accountList: _getAccountListWithToken(
responseAuthorizeEntity.accountList,
accounts,
),
);

await authRepository.onLogin(_enhancedAuthorizeEntity);
Expand All @@ -149,6 +133,28 @@ class DerivAuthService extends BaseAuthService {
}
}

List<AccountListItem>? _getAccountListWithToken(
List<AccountListItem>? accountListItems,
List<AccountModel> accounts,
) =>
accountListItems?.map(
(AccountListItem accountListItem) {
final AccountModel? account = accounts.firstWhereOrNull(
(AccountModel element) =>
element.accountId == accountListItem.loginid,
);

if (account == null) {
throw DerivAuthException(
message: 'Login is Expired',
type: AuthErrorType.expiredAccount,
);
}

return accountListItem.copyWith(token: account.token);
},
).toList();

@override
Future<AccountModel?> getDefaultAccount() =>
authRepository.getDefaultAccount();
Expand Down
12 changes: 6 additions & 6 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.7.47
version: 6.7.50

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/analytics
ref: analytics-v2.2.2
ref: analytics-v2.3.0

deriv_theme:
git:
Expand All @@ -28,7 +28,7 @@ dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_ui
ref: deriv_ui-v0.1.0+1
ref: deriv_ui-v0.1.0+2

deriv_http_client:
git:
Expand Down Expand Up @@ -57,13 +57,13 @@ dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_passkeys
ref: deriv_passkeys-v0.0.4+3
ref: deriv_passkeys-v0.0.4+5

deriv_language_selector:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_language_selector
ref: deriv_language_selector-v0.0.3+8
ref: deriv_language_selector-v0.0.3+9

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

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.3+9

- Update a dependency to the latest release.

## 0.0.3+8

- 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.3+8
version: 0.0.3+9
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.1.0+1
ref: deriv_ui-v0.1.0+2
shared_preferences: ^2.2.2
flutter_bloc: ^8.1.4
equatable: ^2.0.5
Expand Down
Loading

0 comments on commit ae4f17d

Please sign in to comment.