From a0f3563fa4ea945826b012041d71b07e694b519d Mon Sep 17 00:00:00 2001 From: SamuelQZQ Date: Sat, 30 Mar 2024 19:55:50 +0800 Subject: [PATCH] fix aptos ts-sdk breaking change in wallet hooks --- .changeset/smooth-mayflies-suffer.md | 5 +++++ src/hooks/useSubmitTransaction.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/smooth-mayflies-suffer.md diff --git a/.changeset/smooth-mayflies-suffer.md b/.changeset/smooth-mayflies-suffer.md new file mode 100644 index 0000000..2e49643 --- /dev/null +++ b/.changeset/smooth-mayflies-suffer.md @@ -0,0 +1,5 @@ +--- +'@thalalabs/surf': patch +--- + +fix aptos ts-sdk breaking change in wallet hooks diff --git a/src/hooks/useSubmitTransaction.ts b/src/hooks/useSubmitTransaction.ts index e9d9f89..a6e08d5 100644 --- a/src/hooks/useSubmitTransaction.ts +++ b/src/hooks/useSubmitTransaction.ts @@ -53,13 +53,13 @@ export const useSubmitTransaction = () => { functionArguments: payload.functionArguments.map((arg: any) => { if (Array.isArray(arg)) { // eslint-disable-next-line @typescript-eslint/no-explicit-any - return arg.map((item: any) => item.toString()); + return arg.map((item: any) => item); } else if (typeof arg === 'object') { throw new Error( `a value of struct type: ${arg} is not supported`, ); } else { - return arg.toString(); + return arg; } }), },