Skip to content

Commit

Permalink
fix: recommended nonce response (#139)
Browse files Browse the repository at this point in the history
* fix: Recommended nonce response type

* chore: Bump version to v3.13.1
  • Loading branch information
usame-algan committed Oct 30, 2023
1 parent c75a737 commit 61800fe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 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.0",
"version": "3.13.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
SafeIncomingTransfersResponse,
SafeModuleTransactionsResponse,
SafeMultisigTransactionsResponse,
RecommendedNonceResponse,
} from './types/transactions'
import type {
FiatCurrencies,
Expand Down Expand Up @@ -229,7 +230,7 @@ export function postSafeGasEstimation(
})
}

export function getRecommendedNonce(chainId: string, address: string): Promise<number> {
export function getRecommendedNonce(chainId: string, address: string): Promise<RecommendedNonceResponse> {
return getEndpoint(baseUrl, '/v1/chains/{chainId}/safes/{safe_address}/recommended-nonce', {
path: { chainId, safe_address: address },
})
Expand Down
3 changes: 2 additions & 1 deletion src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
SafeIncomingTransfersResponse,
SafeModuleTransactionsResponse,
SafeMultisigTransactionsResponse,
RecommendedNonceResponse,
} from './transactions'
import type { SafeInfo } from './safe-info'
import type { ChainListResponse, ChainInfo } from './chains'
Expand Down Expand Up @@ -778,7 +779,7 @@ export interface operations {
}
responses: {
200: {
schema: number
schema: RecommendedNonceResponse
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/types/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ export type SafeTransactionEstimation = {
safeTxGas: string
}

export type RecommendedNonceResponse = {
nonce: number
}

/* Transaction estimation types end */

export type SafeIncomingTransfersResponse = Page<IncomingTransfer>
Expand Down

0 comments on commit 61800fe

Please sign in to comment.