Skip to content

Commit

Permalink
feat: decode transactionHashes
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 14, 2025
1 parent 472edd1 commit 24a274f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion screens/Trading/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ const TradingTable = ({
setStateSelectedTab("positions");
}
}, [storeSelectedTab]);
// TODOXX
useEffect(() => {
if (query?.transactionHashes && accountId) {
handleTransactionHash(query?.transactionHashes);
Expand Down
1 change: 0 additions & 1 deletion screens/Trading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ const Trading = () => {
};

useEffect(() => {
// TODOXX
if (query?.transactionHashes && accountId) {
handleTransactionHash(query?.transactionHashes);
}
Expand Down
2 changes: 1 addition & 1 deletion services/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const handleTransactionHash = async (
// Parsing transactions
const txhash = Array.isArray(transactionHashes)
? transactionHashes
: transactionHashes.split(",");
: decodeURIComponent(decodeURIComponent(transactionHashes)).split(",");
const results = await Promise.all(
txhash.map(async (txHash: string): Promise<ITransactionResult> => {
const result: any = await getTransactionResult(txHash);
Expand Down

0 comments on commit 24a274f

Please sign in to comment.