Skip to content

Commit 1217b60

Browse files
authored
Add optional param to getDecodedData (#125)
* Add optional to param to getDecodedData * chore: Update version
1 parent 034b3eb commit 1217b60

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@safe-global/safe-gateway-typescript-sdk",
3-
"version": "3.8.0",
3+
"version": "3.8.1",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"files": [

src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,11 @@ export function getMasterCopies(chainId: string): Promise<MasterCopyReponse> {
288288
export function getDecodedData(
289289
chainId: string,
290290
encodedData: operations['data_decoder']['parameters']['body']['data'],
291+
to: operations['data_decoder']['parameters']['body']['to'],
291292
): Promise<DecodedDataResponse> {
292293
return postEndpoint(baseUrl, '/v1/chains/{chainId}/data-decoder', {
293294
path: { chainId: chainId },
294-
body: { data: encodedData },
295+
body: { data: encodedData, to },
295296
})
296297
}
297298

src/types/decoded-data.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export type DecodedDataRequest = {
22
data: string
3+
to?: string
34
}
45

56
type ParamValue = string | ParamValue[]

0 commit comments

Comments
 (0)