Skip to content

Commit

Permalink
fix aptos ts-sdk breaking change in wallet hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelQZQ committed Mar 30, 2024
1 parent b1078ab commit a0f3563
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-mayflies-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@thalalabs/surf': patch
---

fix aptos ts-sdk breaking change in wallet hooks
4 changes: 2 additions & 2 deletions src/hooks/useSubmitTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}),
},
Expand Down

0 comments on commit a0f3563

Please sign in to comment.