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

Fix/w3p pd #51

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.0-rc.16] - 2024-05-03
### Fixed
- `@distributedlab/w3p` - `ProviderDetector` resets pure providers list on init
- `@distributedlab/jac` - example in README

## [1.0.0-rc.15] - 2024-04-08
### Fixed
- `@distributedlab/jac` - `JsonApiResponse.createLink` method to handle client `baseUrl` with root path
Expand Down Expand Up @@ -379,7 +384,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[old repo]: https://github.com/distributed-lab/web-kit-old

[Unreleased]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.15...HEAD
[Unreleased]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.16...HEAD
[1.0.0-rc.16]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.15...1.0.0-rc.16
[1.0.0-rc.15]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.14...1.0.0-rc.15
[1.0.0-rc.14]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.13...1.0.0-rc.14
[1.0.0-rc.13]: https://github.com/distributed-lab/web-kit/compare/1.0.0-rc.12...1.0.0-rc.13
Expand Down
2 changes: 1 addition & 1 deletion packages/fetcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/fetcher",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "Fetch API wrapper with the extended functionality and simple interface",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/jac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const refreshTokenInterceptor: FetcherErrorResponseInterceptor = async (
// Add if you use a refresh token (as 'refresh_token_url' there should be refresh token endpoint)
// && config.url !== 'refresh_token_url'
)
return Promise.reject(response)
return response

// Some authentication store in the client app
const { t } = i18n.global
Expand Down
2 changes: 1 addition & 1 deletion packages/jac/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/jac",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "A library for constructing JSON-API compliant requests and responses",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/reactivity/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/reactivity",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "Implementation of the reactivity connections to propagate changes between objects",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/tools",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "Collection of common utility functions and classes",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/w3p/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@distributedlab/w3p",
"version": "1.0.0-rc.15",
"version": "1.0.0-rc.16",
"description": "Wrapper for Web3 Providers",
"repository": {
"type": "git",
Expand Down
9 changes: 6 additions & 3 deletions packages/w3p/src/provider-detector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ export class ProviderDetector<T extends keyof Record<string, string>> {
} as ProviderInstance
})

this.pureProviders = browserProviders.filter(
(el, idx, arr) => arr.findIndex(sec => sec.name === el.name) === idx,
)
this.pureProviders = [
...this.pureProviders,
...browserProviders.filter(
(el, idx, arr) => arr.findIndex(sec => sec.name === el.name) === idx,
),
]
}

getAppropriateProviderName(provider: RawProvider): PROVIDERS {
Expand Down
Loading
Loading