Skip to content

Commit

Permalink
fix: Change getRecommendedNonce to getNonces call (#140)
Browse files Browse the repository at this point in the history
* fix: Changes getRecommendedNonces to getNonces call

* chore: Bump version to v3.13.2
  • Loading branch information
usame-algan authored Nov 2, 2023
1 parent 61800fe commit 97b29c0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@safe-global/safe-gateway-typescript-sdk",
"version": "3.13.1",
"version": "3.13.2",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
SafeIncomingTransfersResponse,
SafeModuleTransactionsResponse,
SafeMultisigTransactionsResponse,
RecommendedNonceResponse,
NoncesResponse,
} from './types/transactions'
import type {
FiatCurrencies,
Expand Down Expand Up @@ -230,8 +230,8 @@ export function postSafeGasEstimation(
})
}

export function getRecommendedNonce(chainId: string, address: string): Promise<RecommendedNonceResponse> {
return getEndpoint(baseUrl, '/v1/chains/{chainId}/safes/{safe_address}/recommended-nonce', {
export function getNonces(chainId: string, address: string): Promise<NoncesResponse> {
return getEndpoint(baseUrl, '/v1/chains/{chainId}/safes/{safe_address}/nonces', {
path: { chainId, safe_address: address },
})
}
Expand Down
10 changes: 5 additions & 5 deletions src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
SafeIncomingTransfersResponse,
SafeModuleTransactionsResponse,
SafeMultisigTransactionsResponse,
RecommendedNonceResponse,
NoncesResponse,
} from './transactions'
import type { SafeInfo } from './safe-info'
import type { ChainListResponse, ChainInfo } from './chains'
Expand Down Expand Up @@ -305,8 +305,8 @@ export interface paths extends PathRegistry {
}
}
}
'/v1/chains/{chainId}/safes/{safe_address}/recommended-nonce': {
get: operations['get_recommended_nonce']
'/v1/chains/{chainId}/safes/{safe_address}/nonces': {
get: operations['get_nonces']
parameters: {
path: {
chainId: string
Expand Down Expand Up @@ -770,7 +770,7 @@ export interface operations {
}
}
}
get_recommended_nonce: {
get_nonces: {
parameters: {
path: {
chainId: string
Expand All @@ -779,7 +779,7 @@ export interface operations {
}
responses: {
200: {
schema: RecommendedNonceResponse
schema: NoncesResponse
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/types/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,9 @@ export type SafeTransactionEstimation = {
safeTxGas: string
}

export type RecommendedNonceResponse = {
nonce: number
export type NoncesResponse = {
currentNonce: number
recommendedNonce: number
}

/* Transaction estimation types end */
Expand Down

0 comments on commit 97b29c0

Please sign in to comment.