Skip to content

Commit

Permalink
Fix correct rarimo core api url for server-side client
Browse files Browse the repository at this point in the history
  • Loading branch information
napalmpapalam committed Mar 8, 2024
1 parent 4afd5c4 commit 5b631d2
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 96 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [Unreleased]

## [1.1.4] - 2024-03-08
### Fixed
- Using correct rarimo core api url for the server-side api client

## [1.1.3] - 2024-03-05
### Added
- New message locale

### Changed
- Version of js-sdk

Expand Down Expand Up @@ -78,7 +85,9 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

- Initiated project

[Unreleased]: https://gitlab.com/rarimo/scan/compare/1.1.2...HEAD
[Unreleased]: https://gitlab.com/rarimo/scan/compare/1.1.4...HEAD
[1.1.4]: https://gitlab.com/rarimo/scan/compare/1.1.3...1.1.4
[1.1.3]: https://gitlab.com/rarimo/scan/compare/1.1.2...1.1.3
[1.1.2]: https://gitlab.com/rarimo/scan/compare/1.1.1...1.1.2
[1.1.1]: https://gitlab.com/rarimo/scan/compare/1.1.0...1.1.1
[1.1.0]: https://gitlab.com/rarimo/scan/compare/1.0.9...1.1.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scan",
"version": "1.1.2",
"version": "1.1.4",
"private": true,
"gitHooks": {
"pre-commit": "yarn lint",
Expand Down
5 changes: 4 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ const baseCfg = {
}

const client = makeRarimoClient(baseCfg)
const serverClient = makeRarimoClient({ ...baseCfg, apiUrl: CONFIG.CHAIN_API_DOCKER_URL })
const serverClient = makeRarimoClient({
...baseCfg,
apiUrl: CONFIG.IS_DEV_EDITION ? CONFIG.CHAIN_API_DOCKER_URL : CONFIG.CHAIN_API_URL,
})

export const getClient = () => {
return typeof window === 'undefined' ? serverClient : client
Expand Down
Loading

0 comments on commit 5b631d2

Please sign in to comment.