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

ALL-7310 - Fix Kadena RPC double slash #1106

Merged
merged 1 commit into from
Jun 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [4.2.31] - 2024.6.3

### Fixed

- Fix Kadena rpc double slash

## [4.2.30] - 2024.5.31

### Added
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": "@tatumio/tatum",
"version": "4.2.30",
"version": "4.2.31",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
2 changes: 1 addition & 1 deletion src/e2e/rpc/other/tatum.rpc.kadena.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const networks = [
},
]

describe.skip('Kadena', () => {
describe('Kadena', () => {
networks.forEach(({ isTestnet, network, blockHash, lower, upper }) => {
describe(`${isTestnet ? 'Testnet' : 'Mainnet'}`, () => {
it('getInfo', async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/service/rpc/other/AbstractKadenaRpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@

private urlWithPrefix({ apiVersion, chain, nodeVersion }: Partial<NetworkParams>): string {
if (chain) {
return `chainweb/${apiVersion}/${nodeVersion}/chain/${chain}/`
return `/chainweb/${apiVersion}/${nodeVersion}/chain/${chain}`
}
return `chainweb/${apiVersion}/${nodeVersion}/`
return `/chainweb/${apiVersion}/${nodeVersion}`
}

private prepareRequest({ path, body, queryParams, network }: RequestI): PostI {
Expand Down Expand Up @@ -132,7 +132,7 @@
}

getBlockBranches(params: GetBlockParamsLowerUpper): Promise<BlockHashesPage> {
const { network, query, ...rest } = params

Check warning on line 135 in src/service/rpc/other/AbstractKadenaRpc.ts

View workflow job for this annotation

GitHub Actions / test

'network' is assigned a value but never used
return this.sendPost({
path: `/block/branch`,
queryParams: query,
Expand Down
Loading