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: recommended nonce response #139

Merged
merged 2 commits into from
Oct 30, 2023
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
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
Loading