Skip to content

Commit

Permalink
Merge branch 'master' into check-versioning-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
sahani-deriv authored Jun 28, 2024
2 parents 667d29f + f616dfc commit a8b6977
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 15 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2024-06-27

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`deriv_passkeys` - `v0.0.2+7`](#deriv_passkeys---v0027)
- [`deriv_auth` - `v6.7.5`](#deriv_auth---v675)

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.7.5`

---

#### `deriv_passkeys` - `v0.0.2+7`

- **FIX**(deriv_passkeys): Fix_logout_issue_by_fetching_refresh_token ([#630](https://github.com/regentmarkets/flutter-deriv-packages/issues/630)). ([282278ae](https://github.com/regentmarkets/flutter-deriv-packages/commit/282278aeb27256eaa37660f58eff704d27e92c93))


## 2024-06-26

### Changes
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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.7.4)`. 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.5)`. To use the package, add the following to your pubspec.yaml file:


```yaml
Expand All @@ -20,7 +20,7 @@ deriv_ui:
| 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.7.4 ](./packages/deriv_auth/CHANGELOG.md) |
| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.7.5 ](./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 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.7.5

- Update a dependency to the latest release.

## 6.7.4

- Update a dependency to the latest release.
Expand Down
4 changes: 2 additions & 2 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.4
version: 6.7.5

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down Expand Up @@ -57,7 +57,7 @@ dependencies:
git:
url: [email protected]:regentmarkets/flutter-deriv-packages.git
path: packages/deriv_passkeys
ref: deriv_passkeys-v0.0.2+6
ref: deriv_passkeys-v0.0.2+7

deriv_language_selector:
git:
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+7

- **FIX**(deriv_passkeys): Fix_logout_issue_by_fetching_refresh_token ([#630](https://github.com/regentmarkets/flutter-deriv-packages/issues/630)). ([282278ae](https://github.com/regentmarkets/flutter-deriv-packages/commit/282278aeb27256eaa37660f58eff704d27e92c93))

## 0.0.2+6

- Update a dependency to the latest release.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class DerivPasskeysMapper {
DerivPasskeysVerifyCredentialsResponseModel model) =>
DerivPasskeysVerifyCredentialsResponseEntity(
token: (model.response['tokens'] as List<dynamic>).first['token'],
refreshToken: model.response['refresh_token'] as String,
);

/// Maps [ConnectionInfoEntity] to [PasskeysConnectionInfoModel].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ final class DerivPasskeysVerifyCredentialsResponseEntity extends Equatable {
/// Creates a [DerivPasskeysVerifyCredentialsResponseEntity].
const DerivPasskeysVerifyCredentialsResponseEntity({
required this.token,
required this.refreshToken,
});

/// contains the token from the REST API to verify credentials.
/// App token from the REST API to verify credentials.
final String token;

/// Refresh token from the REST API to verify credentials.
final String refreshToken;

@override
List<Object?> get props => <Object?>[token];
List<Object?> get props => <Object?>[token, refreshToken];
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class DerivPasskeysBloc extends Bloc<DerivPasskeysEvent, DerivPasskeysState> {
emit(
DerivPasskeysCredentialVerifiedState(
token: derivPasskeysVerifyCredentialsResponseEntity.token,
refreshToken:
derivPasskeysVerifyCredentialsResponseEntity.refreshToken,
),
);
}).catchError((Object error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@ class DerivPasskeysCreatedSuccessfullyState extends DerivPasskeysState {}
/// [DerivPasskeysCredentialVerifiedState] represents the credential verified state within the DerivPasskeys flow.
class DerivPasskeysCredentialVerifiedState extends DerivPasskeysState {
/// Creates a [DerivPasskeysCredentialVerifiedState].
const DerivPasskeysCredentialVerifiedState({required this.token});
const DerivPasskeysCredentialVerifiedState({
required this.token,
required this.refreshToken,
});

/// The response.
/// App token from the response.
final String token;

/// Refresh token from the response.
final String refreshToken;

@override
List<Object?> get props => <Object?>[token];
List<Object?> get props => <Object?>[token, refreshToken];
}

/// [DerivPasskeysNotSupportedState] represents the not supported state within the DerivPasskeys flow.
Expand Down
2 changes: 1 addition & 1 deletion 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+6
version: 0.0.2+7
publish_to: "none"

environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ const DerivPasskeysVerifyCredentialsResponseModel
<String, dynamic>{
'token': 'token',
},
]
],
'refresh_token': 'refresh_token',
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ void main() {
<String, dynamic>{
'token': '',
}
]
],
'refresh_token': 'refresh_token',
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ void setupDerivPasskeysBloc() {

void setupSuccessDerivPasskeysVerifyCredentialEvent() {
const DerivPasskeysVerifyCredentialsResponseEntity mockResponseEntity =
DerivPasskeysVerifyCredentialsResponseEntity(token: 'token');
DerivPasskeysVerifyCredentialsResponseEntity(
token: 'token',
refreshToken: 'refresh_token',
);

when(() => mockDerivPasskeysService.verifyCredential(
jwtToken: any(named: 'jwtToken'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ void main() {
group('DerivPasskeysCredentialVerifiedState', () {
test('props should contain token', () {
const String token = 'example_token';
const DerivPasskeysState state =
DerivPasskeysCredentialVerifiedState(token: token);
const String refreshToken = 'example_refresh_token';
const DerivPasskeysState state = DerivPasskeysCredentialVerifiedState(
token: token,
refreshToken: refreshToken,
);
expect(state.props, contains(token));
});
});
Expand Down

0 comments on commit a8b6977

Please sign in to comment.